Better HN
topnewbestaskshowjobs
Log inSign up

devit

4,235 karma · joined Sep 10, 2015 (11y ago) · 1,525 submissions

Submissions

comment 3y ago · link · parent

Well, it's going to look like normal Doom.

comment 3y ago · link · parent

Seems easily avoidable by having the modules rendezvous in one of the myriad ways that are possible given that both run in kernel mode with full privileges.

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

You might be dead before 60.

comment 3y ago · link · parent

Rust is the best programming language, so the question is more why you wouldn't use it.

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

The article claims that Apple's compiler doesn't use the instruction, so it seems like the compiler author did indeed forget or never learn about it.

comment 3y ago · link · parent

On Google Pixel devices you can load your own verified boot key into the "avb_custom_key" partition and then it will only boot OSes signed by it (it will also say that you are running a different operating system in the boot screen).

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

I assume Firefox doesn't have Chrome's arbitrary limit on the number of filtering rules, right?

comment 3y ago · link · parent

Trucks drive just fine with no rear view at all other than side mirrors, so cars can do that as well.

comment 3y ago · link · parent

That also suffers from integer overflow if they implement it naively as they seem to show in the blog with a `pub trait Modification: PartialEq + Default + Add<Output = Self>` and using primitive integers.

comment 3y ago · link · parent

T&& doesn't run the T destructor when it's destroyed, which is the whole point of unique_ptr.

comment 3y ago · link · parent

I guess their issue might be that if people listen to white noise 8 hours while asleep every night and Spotify distributes their monthly fee weighted by time listened, then a lot of their fee will go to the white noise for sleep and thus the total fee distributed to their daytime music would be unexpectedly significantly reduced.

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

This code implements the most important feature of the editor in question: https://github.com/Cube9999/vi/blob/master/vax/ex_cmds.c#L45...

comment 3y ago · link · parent

That's obviously infeasible (either it would be bad or it would cost too much time/money).

However, maintaining a variant of Ungoogled Chromium or Vanadium targeted at desktop Linux would be feasible.

comment 3y ago · link · parent

"continuous" (in this actually incorrect usage, since the correct term is "dense")

->

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

Seems ineffective with abstract concepts.

"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

Yes, Zen 2+ can execute 4 two-operand LEAs per cycles (according to Agner Fog), and apparently Sapphire Rapids can execute 5 LEAs of any 32/64-bit kind per cycle (according to Intel).

comment 3y ago · link · parent

Why does Ocaml need to tag types? (as opposed to statically knowing the type of everything)

Do they not monomorphize generics?

comment 3y ago · link · parent

Apparently the perpetrator who sold out their users to the highest bidder is named Benjamin Kramser and they even freely admit the deed on their homepage! (https://www.kramser.xyz/)

comment 3y ago · link · parent

The author doesn't seem to have much experience in writing Rust.

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

It's just Perl 6 renamed.

comment 3y ago · link · parent

It seems you can get a diagram of the actual circuit like this:

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

Do they offer shared IPv4 addresses with routing by HTTPS SNI?

comment 3y ago · link · parent

Not the crypto, but rather the getpass() function, which simply reads a password from standard input without echoing it.

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

Wouldn't it have the opposite effect, of massive centralization?

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

In case it's not obvious, here is how the attack works:

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

In a lot of places there is either a formal ban on phones and cameras or at least of taking photos, or people simply are used to live simply or in the moment and don't use them (at least not for non-essential things).

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

Google Pixel, install GrapheneOS on it

comment 3y ago · link · parent

LineageOS, GrapheneOS and others will mantain those apps or a replacement, so this is a non-issue.

comment 3y ago · link · parent

As long as you have two metal end caps connected by metal poles, and you lay the carbon fiber in the direction that connects the end caps, then it seems that the hull would become concave/"bulge inward" and the fiber would hold pressure by tension.

Not sure whether this would actually work in practice though or whether it would be better than the simple metal sphere design.

1
91011
51