Posts
4328
Following
312
Followers
445
Software Engineer at Opinsys Oy
Entrepreneur at Siltakatu Solutions Oy

OpenPGP: 3AB05486C7752FE1
@Conan_Kudo There's this irony in shared data (in general) that even if your blob lives for the whole power cycle, it must be prepared for sudden death that could happen in the next time quantum :-)
1
0
0
@Conan_Kudo This work is for key_put() :-) How to make it less sensitive overall.
1
0
0
In the case of procfs I'll check if this strategy would allow to relax locking requirements for /proc/keys.
1
0
0

Jarkko Sakkinen

Anyone interested on keyring:

https://web.git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git/commit/?h=keys-graveyard

If this would work out then possibly also radiate to /proc/keys.

I.e. it could also similarly "knock for reference" but that is not within scope of this patch.

#linux #kernel #keyring
1
0
0

Happy International Asexuality Day!

0
6
3
@liw retooted because want to try it out some day...
0
0
1

My fourth Obnam 3 development session. Put into place the scaffolding to add chunk encryption, but didn't have the time to actually implement the encryption.

Small steps and tea is the way to reach goals while having fun.

(Obnam 3 is my Sunday project to experiment with implementing fundamental components for backup software.)

https://obnam.org/blog/2025/obnam3-04

1
1
0

vitaut 🤍❤️🤍 🇺🇦

BREAKING: The C++ committee imposes tariffs on non-US locales.

3
5
2

Jarkko Sakkinen

Telegram asked me pin, which was 26214, which is same as the number of colors on #Amiga 1200 ;-)

That at least what I recall...
0
1
0

Jarkko Sakkinen

Edited 15 days ago

Quite cool, I have to say. fwupdmgr managed to update my HP USB-C Dock G5.

1
0
0
with refcount_inc_not_zero() trial in GC to fully sequence the time window of key_put(): https://lore.kernel.org/keyrings/20250403153809.213535-1-jarkko@kernel.org/
0
0
0

Jarkko Sakkinen

recycle is now free, the program to create .rex loops: https://www.reasonstudios.com/recycle
0
0
1
Edited 17 days ago

fun Linux fact: because MAP_SHARED|MAP_ANONYMOUS is actually a file-backed mapping under the hood, unmapping part of such a mapping does not discard the data stored in that part:

$ cat mremap.c
#define _GNU_SOURCE
#include <err.h>
#include <stdio.h>
#include <sys/mman.h>
int main(void) {
char *p = mmap(NULL, 0x2000, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0);
if (p == MAP_FAILED) err(1, "mmap");
p[0x1000] = 'X';
if (munmap(p+0x1000, 0x1000)) err(1, "munmap");
// that 'X' we just wrote... is it gone?
// nope, let's bring it back!
p = mremap(p, 0x1000, 0x2000, MREMAP_MAYMOVE);
if (p == MAP_FAILED) err(1, "mremap");
printf("p[0x1000]='%c'\n", p[0x1000]);
}
$ gcc -o mremap mremap.c
$ ./mremap
p[0x1000]='X'
$
1
3
0
It's actually somewhat similar concurrency dance as with SGX driver's page reclaimer... I think that refcount_inc_not_zero(&key->usage) should balance shit out but have to wait and see what David thinks...
1
0
0

Jarkko Sakkinen

0
2
3
@noodles Cloud access is destined to fail at some point when doing kernel testing or cap to some limitation, which you cannot simply achieve with that type of access. It does not really compare to a local machine...
1
0
0
@noodles This is true, not just a money question really :-) Would be nice to have something smaller scale and efficient.
1
0
0

Jarkko Sakkinen

Edited 20 days ago
@oleksandr i’d compare key idiomatically maybe more like task_struct because it is memory with type (like task is) 🙂 graveyard is just keys no longer used, ready for freed.

Or like, you have memory with identity (UID/PID vs serial). And in a memory reclaimer isolation is afaik more like when you pick passive victims. Here the list is a dead ramp, nothing comes back alive.
0
0
0
Show older