L
> cPython has been trying for a long time to "have its cake and eat it too" in that any JIT they add needs to have minimal impact on c/binary/native modules. [...] > Honestly, I don't know if cPython should even bother with JIT/perf that much anymore considering the amount of incomplete efforts, though I know this specific effort is by far the closest (and is likely to return). Since the whole P3K conversion era, there are so many more options for writing "performant psudo code", though I get…
L
Ouch! Indeed. Thanks! Fixed now: <https://git.kernel.org/pub/scm/docs/man-pages/man-pages.g...>
L
Is this the longest "daily security updates" post in LWN history?
L
This man page says that aprintf returns -1 on error. Should that not be NULL?
L
You can do that with the following code (using malloc(3) memory instead of alloca(3)): ``` tc = tar_cmd[X_DIR]; dir = aprintf("%s%s%s", tc, strsuffix(tc, "/") ? "" : "/", HCA_PATH); if (dir == NULL) goto fail; ``` You only need to define strsuffix(), but that's a good investment. aprintf(3) is defined in gnulib, and I'm trying to get it into glibc.
L
The current implementation does not support nesting; I suspect that would be necessary in the long run, though.
L
I think it's fair to assume it comes from a jail cell because it calls the processes in the cell "inmate" processes.
L
> but humans are certainly pretty bad at it on average too (and I include myself in that too). Before the LLM era I would see tons of comments saying "what idiot wrote this, oh it was me" current comme il faut is to pretend humans are always perfect.
L
If you found this article via an external search, also look here: https://lwn.net/Articles/1079407/
L
Or perhaps aioctl or ioctl_ring?
L
For one thing, pypy only suppports Python 3.12, 3.11 and 2.7. More significantly, pypy isn't CPython - it's an alternative implementation that is mostly compatible but with a few noticeable differences (the pypy website lists these). This would have added a JIT to CPython (the reference implementation) directly, meaning all new Python versions - and all included modules, etc. - get access to JIT compilation. In the PEP 836 authors' own words: Alternative Python implementations, such as PyPy and…
L
I don't know if an attacker can switch the bus without the application noticing I may not be understanding, but why would it need to switch the bus if it started trojaned at the time you unlocked it? That said, if you have access to start KeePass with a trojan session bus, I'm not sure there is anything that could prevent the attacker from accessing creds that you manually unlock while they have remote access to your desktop, it might be a moot point.
L
What was the advantage over pypy ?
L
Even if they do have no better name, there is nothing preventing you from writing e.g. this: #[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)] enum Bounded { One, Two, Three, Four, // etc. } impl From<Bounded> for u32 { fn from(value: Bounded) -> u32 { match value { One => 1, Two => 2, Three => 3, Four => 4, // etc. } } }
L
This reads to me like everyone was civil and acting in good faith and that a problem of process was acknowledged and addressed without acrimony or drama. That's really nice to see, and speaks well of the Python community. Hopefully this won't be the end of the work, because Python can always benefit from better performance.
L
One design option is to leave kernel stacks big, but reclaim them for sleeping userspace tasks in freezable sleep. So each task starts out with a 16K stack, but the shrinker can free kernel stack memory below the stack pointer, and mark in task->state that the stack was partially reclaimed. Then when a task without a full stack is woken, the scheduler can kick off a workqueue item to asynchronously allocate more stack memory again. This has the advantage that it requires almost no low-level…
L
>as far as they're concerned, tainting implies something bad has happened This is wrong, though. It basically only means that subsequent kernel messages have to be analyzed more carefully and take the tainting-action into consideration for analyzing the root cause of the kernel message.
L
There's the existing panic_on_taint kernel command line option; if your system has that set, then this now means that using unbind/bind via sysfs causes a panic. And some big entities run with panic_on_taint because, as far as they're concerned, tainting implies something bad has happened, and they want a tainting to result in a reboot (which external monitoring will pick up, along with the kernel logs).
L
Why does it break anything? Doesn't tainting just emit a kernel warning add a perma-flag to oopses and panics and that's it?
L
Most users don't need any new features, just an up to date version that can be shipped by the distros. I don't have any idea who would prefer having a package with deprecated dependencies outside main repositories just to have more features.
L
> There's only 3 good limits: 0, 1, unlimited. Experience shows that to be untrue. For example, comment depth. LWN gets unreadable after a depth of about five (and we've seen some threads go very, very deep). I believe Stack Exchange has a limit of two, which means people find alternative ways of having conversations that don't require infinite nesting depth. Reddit and Substack take a different approach where you have to click through to a new page after a depth of five which tends to limit…
L
What are those non-swap use cases for zram?
L
>If we know the few points where we are likely going to need more stack memory and these happen only in special situations, why not allocate more stack at these points (only) and free it again on return? Probably because those "special situations" happen to be ones where the kernel is already in the process of freeing up memory because it doesn't have enough.
L
> Run ulimit -n on your machine, because, guess what? It's 1024. It is > ulimit -Hn is probably 4096, so you can't set it higher than that unless you're root. It's 1048576 > cat /proc/sys/fs/file-max will tell you how many open file descriptors across all running processes Linux will allow before just not letting anyone create any new file descriptors. It's probably somewhere between 600,000 and 3 million. 9223372036854775807 actually. Anyway, there's a very big difference between setting a…
L
It breaks SR-IOV and PCI as well.
L
> No, that's ridiculous. There's only 3 good limits: 0, 1, unlimited. Stuff breaking because of too many handles isn't reasonable. The only reasonable maximum for anything is std::numeric_limits<decltype(var)>::max() Run ulimit -n on your machine, because, guess what? It's 1024. ulimit -Hn is probably 4096, so you can't set it higher than that unless you're root. cat /proc/sys/fs/file-max will tell you how many open file descriptors across all running processes Linux will allow before just not…
L
Underlying this is that dynamic linking works well when the ABI surface is carefully thought through, and only expands (or contracts, where necessary) very deliberately (see glibc or the kernel's userspace ABIs for examples of a considered ABI here, even though neither of them are perfect). If you just take a random version's exposed symbols and deem them the exported ABI, you have an "exciting" time ahead of you in the future.
L
In practice if you want to guarantee the code actually behaves as written dynamic linking just doesn't work anywhere near 100% reliably. In practice, every application for a non-embedded [1] operating system uses some degree of dynamic linking, because the alternative is to ship the *entire* OS, drivers and all, with every. single. application. (And even then, outside of MMU-less microcontrollers, it is rare to ship something in the form of a single static binary) [1] ie general-purpose, where…
L
> if you have lots of small ones it is easier to spread that out and it naturally spreads out since those don't all do their breaking updates at the same time (and many don't ever have breaking updates). Meanwhile, in the real world, if you have lots of small dependencies (to say nothing of sub-dependencies) you end up spending a considerable amount of time (on an ongoing basis, mind you) chasing breaking updates multiple times a week. Ask me how I know this.
L
Actually the useless shell quirk is that nonsense about interpreting numbers starting with a zero as octal. The fact that bash had to add a workaround for that is far from useless.