Better HN
topnewbestaskshowjobs
Log inSign up

aliceryhl

749 karma · joined Apr 23, 2019 (7y ago) · 307 submissions

I'm a maintainer of Tokio. I work on Rust for Linux.

Website: https://ryhl.io/

GitHub: https://github.com/Darksonn

[ my public key: https://keybase.io/aliceryhl; my proof: https://keybase.io/aliceryhl/sigs/4XnrKMF2tmZZw8k0hEZ9EOvyl7KKQ0x9FUICXUtxzbo ]

Submissions

comment 3w ago · link · parent

Yet the authors of crypt did not use them. The C language is not designed in a way to encourage people to write code that correctly uses tagged unions (or nullable pointers for that matter).

comment 7mo ago · link · parent

This is not psychosis.

comment 8mo ago · link · parent

Interesting. Though looking at the code, it does still check VM_MAYWRITE, so the mapping needs to be something you could remap as writable.

comment 9mo ago · link · parent

Ah thanks for clarifying.

comment 9mo ago · link · parent

Thank you. I was wondering about that.

comment 9mo ago · link · parent

Hmm, I read some of the decision, and now I'm not sure what to make of all of it.

When I came to the opinion from Jackson, J., I found it extremely compelling. He says this:

... But some of TWEA’s sections delegating this authority had lapsed, and “there [was] doubt as to the effectiveness of other sections.” Accordingly, Congress amended TWEA in 1941, adding the subsection that includes the “regulate ... importation” language on which the President relies today. The Reports explained Congress’s primary purpose for the 1941 amendment: shoring up the President’s ability to control foreign-owned property by maintaining and strengthening the “existing system of foreign property control (commonly known as freezing control).”

When Congress enacted IEEPA in 1977, limiting the circumstances under which the President could exercise his emergency authorities, it kept the “regulate ... importation” language from TWEA. The other two relevant pieces of legislative history—the Senate and House Reports that accompanied IEEPA—demonstrate that Congress’s intent regarding the scope of this statutory language remained the same. As the Senate Report explained, Congress’s sole objective for the “regulate ... importation” subsection was to grant the President the emergency authority “to control or freeze property transactions where a foreign interest is involved.” The House Report likewise described IEEPA as empowering the President to “regulate or freeze any property in which any foreign country or a national thereof has any interest.”

However, then I read Kavanaugh, J. who writes the following:

In 1971, President Nixon imposed 10 percent tariffs on almost all foreign imports. He levied the tariffs under IEEPA’s predecessor statute, the Trading with the Enemy Act (TWEA), which similarly authorized the President to “regulate ... importation.” The Nixon tariffs were upheld in court.

When IEEPA was enacted in 1977 in the wake of the Nixon and Ford tariffs and the Algonquin decision, Congress and the public plainly would have understood that the power to “regulate ... importation” included tariffs. If Congress wanted to exclude tariffs from IEEPA, it surely would not have enacted the same broad “regulate ... importation” language that had just been used to justify major American tariffs on foreign imports.

And I also find this compelling.

To add onto this, Roberts, C. J. says: IEEPA’s grant of authority to “regulate ... importation” falls short. IEEPA contains no reference to tariffs or duties. The Government points to no statute in which Congress used the word “regulate” to authorize taxation. And until now no President has read IEEPA to confer such power.

This seems directly contradictory to Kavanaugh, J.'s dissent! Kavanaugh, J. claims that Nixon used the word “regulate” to impose tarrifs. And apparently the word isn't just in some random other statute — Nixon did so from TWEA, the predecessor of IEEPA: when Congress enacted IEEPA in 1977 it kept the “regulate ... importation” language from TWEA. (from Jackson, J.) So the point that no President has read IEEPA to confer such power seems pretty weak, when Nixon apparently did so from TWEA.

I have no conclusion from this, but IMO both Jackson, J. and Kavanaugh, J. have pretty strong points in opposing directions.

comment 11mo ago · link · parent

I asked about this when they presented the project at the Linux Plumbers conference. They replied that it's not really intended to be a security boundary, and that you should not let anyone malicious load these programs.

Given this thread model, I think their project is entirely reasonable. Safe Rust will prevent accidental mistakes even if you could technically circumvent it if you really try.

comment 11mo ago · link · parent

I have no insight into the Asahi project, but the LKML link goes to an email from James Calligeros containing code written by Hector Martin and Sven Peter. The code may have been written a long time ago.

comment 11mo ago · link · parent

That's an email from James Calligeros. All this patch says is that the author is Hector Martin (and Sven Peter). The code could have been written a long time ago.

comment 11mo ago · link · parent

Where I'm from, it probably would not be stolen by anyone.

comment 12mo ago · link · parent

How?

comment 1y ago · link · parent

It never made it into upstream Linux, but there is already a sample implementation that Wedson wrote in 2022: https://github.com/Rust-for-Linux/linux/pull/798

comment 1y ago · link · parent

It won't be different from Tokio. When you pass a future to tokio::spawn, that will also eagerly execute the future right away.

comment 1y ago · link · parent

It's trivial to implement an async runtime in the kernel. The kernel's workqueue is already essentially a runtime.

comment 1y ago · link · parent

> IIRC Alice from the tokio team also suggested there hasn't been much interest in pushing through these difficulties more recently, as the current performance is "good enough".

Well, I think there is interest, but mostly for file IO.

For file IO, the situation is pretty simple. We already have to implement that using spawn_blocking, and spawn_blocking has the exact same buffer challenges as io_uring does, so translating file IO to io_uring is not that tricky.

On the other hand, I don't think tokio::net's existing APIs will support io_uring. Or at least they won't support the buffer-based io_uring APIs; there is no reason they can't register for readiness through io_uring.

comment 1y ago · link · parent

I'm quite careful to tightly control the dependencies of Tokio. All dependencies are under control by members of the Tokio team or others that I trust.

comment 2y ago · link · parent

The caption for the picture says this:

> The six planets orbit their central star HD 110067 in a harmonic rhythm with planets aligning every few orbits.

comment 2y ago · link · parent

Regarding the review process ... one thing that I find challenging and don't know a good solution to is documentation. I've received many PRs where the change itself is fine, but the PR is dragging out because the documentation is lacking, and getting the PR author to improve it sometimes takes a lot of review rounds.

What would you do to avoid this?

Sometimes the same situation comes up with tests, but it is not as common in my experience.

comment 2y ago · link · parent

It's well known that what is being stabilized today is lacking the Send bounds stuff. In fact, there was a lot of discussion about whether they should completely block this feature until the Send bounds stuff was ready. Ultimately I think it is good that they shipped this part of the feature even though the other part isn't ready yet - Tower isn't able to use this yet, but other crates can.

comment 2y ago · link · parent

If you pay too much in bounties, you risk having your own red-team employees leave so that they can report bugs externally and get paid much more via bounties.

comment 3y ago · link · parent

I'm surprised that CLN-003 made the list even as low severity. It's intended to make reverse engineering of the binary harder, but the code is already freely accessible (and CLN-003 also acknowledges this).

comment 3y ago · link · parent

In Denmark, there's a national system for authentication used for government sites and banks. I have a small device with a single button on it that shows a 6-digit code when you press it. I enter that code along with a password any time I make a purchase online.

(There's also an app that most people use. But I like the hardware thingy better.)

comment 3y ago · link · parent

The best tool for voice-to-text for programmers is Talon.

https://talonvoice.com/

comment 3y ago · link · parent

Running the experiment until you have a specific pre-determined number of observations is okay.

However, the deceptively similar scheme of running it until the results are statistical significant is not okay!

comment 3y ago · link · parent

That's my understanding as well.

comment 3y ago · link · parent

Dual licensing should be fine. (IANAL)

comment 3y ago · link · parent

No, that's a bad take. The unlicense makes your code impossible to use for many people e.g., those in countries like Germany where you're not allowed to dedicate works to the public domain. Similarly, many companies don't allow you to use code with the unlicense because of its unclear legal status.

See [1] and [2] for more discussion on this.

If you don't care about licenses, the MIT license is a much better choice.

[1]: https://web.archive.org/web/20170301020915/https://lists.ope...

[2]: https://softwareengineering.stackexchange.com/questions/1471...

comment 3y ago · link · parent

Being good for the consumer is not necessarily the same as being good for the company selling the device.

comment 3y ago · link · parent

Most browsers have a vim emulation plugin that provide a feature like this when you press `f`. So really, it's "browser-vim-emulator-like".

comment 3y ago · link · parent

A BPP algorithm can be seen as a deterministic algorithm that takes a string of random bits as part of its input. One way to derandomize a BPP algorithm is to run it with every possible random string and pick the answer that the majority of random strings lead to. This blows up the running time by 2^r with r being the length of the random string, making the running time exponential.

If the PRNG can take a seed of length log(n) and generate a random string from it, then you might try to take a BBP algorithm and reduce the length of the random input to log(n) using the PRNG. We assume that the PRNG being good enough means that this new algorithm still has the usual BBP guarantee that it gives the correct answer for at least 2/3 of the seeds.

However, now the derandomization of running it on every possible seed just gives a slowdown of 2^log(n) = n, which means that the running time stays polynomial.

12345
11