4,235 karma · joined Sep 10, 2015 (11y ago) · 1,525 submissions
comment 3y ago · link · parent
For example, you can walk the kernel-only page tables, find all executable pages, and scan them for a magic string that the other module puts in their text section.
comment 3y ago · link · parent
And the answer is you wouldn't use it if there's a library or existing codebase in another language that is much better than the Rust equivalent, and the program is short enough that it's simpler to directly use that language rather than writing a binding or RPC interface.
Or if you need the software to be written by someone who doesn't know Rust and doesn't want to learn (but in that case, they might not be able to write a correct program in any language, so this strategy is probably best reserved when a program that only works properly sometimes is acceptable).
comment 3y ago · link · parent
GrapheneOS for instance uses this mechanism.
Unfortunately you can only register one key and you have to wipe the device to change it, but that's still fine for most use cases.
comment 3y ago · link · parent
The easy fix would be to cap track time weight, although that is susceptible to an attack of splitting the white noise in many parts and publishing a playlist.
I guess a possibility could be to somehow compute "song variety" (i.e. entropy in a model where the decoder can generate noise/randomness) and weight by that, but not sure if the available lossy codecs are good enough to do that.
comment 3y ago · link · parent
comment 3y ago · link · parent
->
said of an algebraic structure such that for every x != y there exists z such that x < z and z < y
->
characteristic ("nimi"?) of a set ("poki") where for ("tawa?") all ("ale") thing ("ijo") different ("ante" + "lon"?) than other ("ante" + "nimi"?) thing ("ito") there exists ("lon") a new ("sin") thing ("ijo") such that the first ("wan" + "nimi" + "ito"?) thing is less ("lili") than the new thing ("sin" + "ito"?) and the new thing ("sin" + "ito"?) is less ("lili") that the second thing ("tu" + "nimi" + "ito"?)
Would need some way to join into a grammatical structure and probably a preamble that establishes that the context is mathematics.
comment 3y ago · link · parent
"In mathematics, a real number is a number that can be used to measure a continuous one-dimensional quantity such as a distance, duration or temperature. Here, continuous means that pairs of values can have arbitrarily small differences. Every real number can be almost uniquely represented by an infinite decimal expansion."
->
"toki pi nanpa, nanpa lon li nanpa li ken lukin e suli tawa wan. lon ni la, nanpa tu li ken ala li poka li ken lili. nanpa lon ali li ken lukin kepeken nimi nanpa mute tawa pini ala"
->
"Talking about numbers, when a number is present, it can be seen to be important or significant to an individual."
"In this context, the number two might not be significant or might be seen as small or lesser."
"All numbers can be seen using many number names endlessly or without an end."
ChatGPT 4, obviously in separate chats: as you can see a complete failure to convey and roundtrip the original message.
comment 3y ago · link · parent
comment 3y ago · link · parent
For instance, passing RefCell<u32> by value as their code does makes no sense (just use u32...), and the code seems to have a lot of clones, most of which are probably unnecessary, while not having a single instance of the "mut" keyword.
In fact, I'm pretty sure it's completely broken, since their gensym doesn't do what they want, due to their wrong use of clones and refcells (it should take an &mut u32 and just increment it).
And definitely not idiomatic at all.
comment 3y ago · link · parent
1. Go to https://edaplayground.com
2. Paste the code in the right pane labeled "design.sv"; it's probably a good idea to reduce the number of registers to 2 to make the output more readable
3. On the left, select "Yosys" in tools and simulators (it seems to be the only one that works without additional configuration or fiddling) and enable "Show diagram after run"
4. Click "Run" and it should open an image with a graph rendering showing the circuit. If it doesn't work, try to disable adblockers or popup blockers (it opens the output as a pop-up apparently)
You can also presumably run yosys locally.
In this case, it implements every register as a D flip-flop; the rs outputs are implemented with muxes from the flip flops, and the D flip-flop value is set to either the current value of the register or to data depending whether write_ctrl is set and rd is equal to the register number.
comment 3y ago · link · parent
Since the function uses a static buffer, there is a limit on the password length, which apparently on Solaris was set to the absurdly low value of 8 (glibc uses a more reasonable value: 8192).
comment 3y ago · link · parent
If you can make a perfectly superconducting electric grid, then it's better to build power plants in a single optimal location (e.g. nuclear power plants in an isolated area with no environmental risks) and deliver to the whole world via superconducting wires.
comment 3y ago · link · parent
1. The attacker manufactures a device, such as a smartphone, generates a keypair for it, stores it on an HSM on the device (generally called a "trusted enclave"), and signs the public key of the keypair with a master key
2. The device runs the attacker's software and is designed so that whenever non-attacker software is run with elevated privileges, the HSM is informed of that fact in a way that can't be reset without rebooting (and starting again with the attacker's software). For instance, the device might use a verified boot scheme, send the key the OS is signed with to the HSM in a way that is unchangeable until reboot, and it might employ hardening like having the CPU encrypt RAM or apply an HMAC to RAM
3. The HSM produces signatures of messages that contain statements that the device is running the attacker's software, plus whatever the attacker's software wants to communicate and it won't produce them if it's running software of the user's choice as opposed to the attacker's software as established above. It also includes the signature of its public key with the master keypair, allowing accomplices to check that the device is indeed not under the user's control, but rather under the control of someone they trust to effectively limit the user's freedom
4. Optionally, that attestation is passed through the attacker's servers, which check it and return another attestation signed by themselves, allowing to anonymize the device and apply arbitrary other criteria
5. Conniving third parties can thus use this scheme to ensure that they are interacting with a device running the attacker's software, and thus that the device is restricting the user behavior as the attacker specifies. For instance, it can ensure that the device is running the accomplice's code unmodified, preventing the user from being able to run software of their choice, and it can ensure that the user is using device as desired by the attacker and their accomplices.
This attack is already running against Android smartphone users (orchestrated by Google, in the form of SafetyNet and the Play Integrity API) and iOS smartphone users (orchestrated by Apple) and this extends the attack to the web.
comment 3y ago · link · parent
This holds for writing and stories as well, so it's best to rely on personal experience and not assume that you can use the Internet to predict the details of the experiences you can have in the world.
comment 3y ago · link · parent
Not sure whether this would actually work in practice though or whether it would be better than the simple metal sphere design.