frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Re: [PATCH] OOM_pardon, a.k.a. don't kill my xlock

https://lwn.net/Articles/104185/
26•luu•2h ago

Comments

sedatk•1h ago
I’d say, let the one who tried to allocate memory crash, and if you’re a critical process like xlock, use statically allocated memory and don’t alloc again.
LoganDark•1h ago
This is only a viable answer when overcommit is disabled. The problem comes when overcommit is enabled and you find yourself in a position where many programs think they already have memory and yet there is none to give them. If you simply kill the first piece of code that encounters the end of available memory you might take down anything including the kernel itself.

Nothing like statically allocating memory can work when overcommit is enabled because the kernel is free to compress memory, page it out and etc. and then murder you the next time you try to perform any operation that it doesn't have the space for, no matter how safe and static your initialization was.

Note that overcommit is very useful in many cases including the ones where swap saves the stability of the system under conditions that would otherwise completely lock up or panic, so it's also not viable to just prevent it from being used.

sedatk•1h ago
I’m not against taking down the kernel if the situation is that catastrophic. Better than killing the lock screen for sure.
LoganDark•50m ago
IMO if the security of a system depends on the lock screen not crashing then the system is not very secure. Security protocols should never fail open like that; a lock screen should never simply be a layer on top of the authenticated desktop. Windows and macOS get this right. I believe Wayland display managers are also able to get this right (but I haven't checked).
josefx•44m ago
Shouldn't desktop environments detect if a lock screen terminated abnormaly anyway? The OOM killer is just one of many possible causes.
feelamee•56m ago
> if you’re a critical process like xlock, use statically allocated memory and don’t alloc again.

This doesn't save you if someone other allocates and OOM killer chooses you as victim

hkolk•53m ago
What is proposed is to not have an OOM killer with a selection process, meaning that the "someone other allocates" would be the one dying.
sedatk•50m ago
Yes, don’t have OOM roulette.
tux3•31m ago
The problem is that Linux has memory overcommit and it will OOM when a process faults a page in, not just when someone allocates memory.

So the OOM condition can hit any random process, not necessarily one that just tried to allocate. If you don't have some sort of selection, then you would still have an OOM killer, only it will be killing completely at random.

Retr0id•41m ago
Statically allocated memory can still OOM on access, due to overcommit and lazy page table population. What you really want is mlockall(2) (probably with MCL_CURRENT|MCL_ONFAULT followed by madvise with MADV_POPULATE_*)
amluto•29m ago
The fact that xlock crashing unlocks an X11 session is, IMO, pathetic.
gjvc•24m ago
looking forward to your other insights
cwillu•50m ago
(2004)
jml7c5•31m ago
Thanks. I was confused for a bit, given these days you can do

    echo "-1000" > /proc/<pid>/oom_score_adj
to disable OOM killing for a process.

https://github.com/torvalds/linux/blob/master/include/uapi/l...

rwmj•37m ago
It's 2026 and I still can't configure the OOM killer to kill firefox before anything else.
dvh•27m ago
This. It's always browser running amok. I configured win+k shortcut key to: killall -9 chrome
EdSchouten•17m ago
I still remember following Andries’s “Linux kernel hacker’s hut” course he taught at the Eindhoven University of Technology (TU/e) back in 2010. Every week we’d get an assignment where we had to write exploits for commonly occurring security vulnerabilities (e.g., buffer overflows, bad printf format). It was one of the most enjoyable courses I ever followed. Thanks for that, Andries!
lelandfe•16m ago
I never pay for the OOF insurance, it seems like a waste of money and I've never met anyone that's had it happen.

Cloudflare Turnstile requiring fingerprintable WebGL

https://hacktivis.me/articles/cloudflare-turnstile-webgl-fingerprinting
325•HypnoticOcelot•5h ago•183 comments

1-Bit Bonsai Image 4B Image Generation for Local Devices

https://prismml.com/news/bonsai-image-4b
170•modinfo•5h ago•61 comments

Dav2d

https://jbkempf.com/blog/2026/dav2d/
346•captain_bender•8h ago•117 comments

Creatine raise brain energy levels and slow Alzheimer's cognitive decline by 30%

https://thesciverse.org/scientists-found-that-the-creatine-supplement-millions-take-for-muscle-ga...
307•MrJagil•3h ago•225 comments

The Speed of Prototyping in the Age of AI

https://darylcecile.net/notes/speed-of-prototyping-age-of-ai
58•mooreds•3h ago•40 comments

Codex just found a "workaround" of not having sudo on my PC

https://twitter.com/i/status/2060746160558543217
91•thunderbong•1h ago•31 comments

United Airlines 767 returns to Newark after Bluetooth name sparks alert

https://simpleflying.com/united-airlines-767-returns-newark-bluetooth-name-alert/
152•Eridanus2•7h ago•227 comments

Restartable Sequences

https://justine.lol/rseq/
120•grappler•5h ago•30 comments

Re: [PATCH] OOM_pardon, a.k.a. don't kill my xlock

https://lwn.net/Articles/104185/
27•luu•2h ago•18 comments

Show HN: Streambed – Stream Postgres to Iceberg on S3, Supports Postgres Wire

https://github.com/viggy28/streambed
12•vira28•1h ago•0 comments

Linux/M68k

http://www.linux-m68k.org/
18•doener•2d ago•3 comments

London's Free Roof Terraces

https://diamondgeezer.blogspot.com/2026/05/londons-free-roof-terraces.html
234•zeristor•12h ago•128 comments

The Website Specification

https://specification.website/
384•k1m•12h ago•163 comments

Steam Deck sells out in North America within 24 hours of price hike

https://arstechnica.com/gaming/2026/05/despite-price-hike-steam-deck-is-already-sold-out-in-north...
20•frutiger•56m ago•6 comments

Having your insulin pump die while you're on vacation

https://blog.lauramichet.com/what-its-like-to-have-the-machine-that-keeps-you-alive-die-while-you...
89•speckx•3d ago•107 comments

Deflock hits 100k ALPRs Mapped in USA

https://deflock.org/
84•pilingual•3h ago•24 comments

What if remote working, not AI, is to blame for weak junior hiring?

https://www.ft.com/content/2205e2d0-50dc-4e80-9bf7-78d0272276c0
5•uxhacker•2d ago•2 comments

Backpressure is all you need

https://www.lucasfcosta.com/blog/backpressure-is-all-you-need
90•lucasfcosta•7h ago•69 comments

'Backrooms' Stuns with $81M Debut

https://variety.com/2026/film/box-office/backrooms-box-office-record-opening-weekend-obsession-ju...
14•mindcrime•40m ago•0 comments

Daily pill can double survival time for deadliest cancer, trial shows

https://www.theguardian.com/society/2026/may/31/daily-pill-daraxonrasib-double-survival-time-panc...
108•c-oreills•4h ago•20 comments

FROST: Fingerprinting Remotely using OPFS-based SSD Timing [pdf]

https://hannesweissteiner.com/pdfs/frost.pdf
30•simjnd•5h ago•12 comments

Security Envelope Pattern collection – S.E.C.R.E.T

https://secret-archive.org/
76•ColinWright•2d ago•8 comments

Websites have a new way to spy on visitors: analyzing their SSD activity

https://arstechnica.com/security/2026/05/websites-have-a-new-way-to-spy-on-visitors-analyzing-the...
39•Brajeshwar•3d ago•13 comments

I put a datacenter GPU in my gaming PC

https://blog.tymscar.com/posts/v100localllm/
211•birdculture•6h ago•139 comments

You weren't meant to have a boss (2008)

https://paulgraham.com/boss.html
90•downbad_•7h ago•92 comments

Telli (YC F24) is hiring in engineering, design, and GTM [Berlin, on-site]

https://hi.telli.com/join-us
1•sebselassie•13h ago

Show HN: Atomic Editor – Obsidian-style live preview for CodeMirror 6

https://kenforthewin.github.io/atomic-editor/
37•kenforthewin•7h ago•11 comments

A Gentle Introduction to Lattice-Based Cryptography [pdf]

https://cryptography101.ca/wp-content/uploads/lattice-based-cryptography.pdf
155•jayhoon•2d ago•16 comments

One year of Roto, a compiled scripting language for Rust

https://blog.nlnetlabs.nl/one-year-of-roto-the-compiled-scripting-language-for-rust/
102•Hasnep•2d ago•26 comments

Avian Visitors

https://theodore.net/projects/AvianVisitors/
108•fdb•13h ago•12 comments