Personal channel of @lancern
Topics: programming, hacking, memes, life, and more. Forward anything as you wish.
Join the discussion group for more fun.
Discord: https://discord.gg/RwUx9et7
Topics: programming, hacking, memes, life, and more. Forward anything as you wish.
Join the discussion group for more fun.
Discord: https://discord.gg/RwUx9et7
What Every Hacker Should Know About TLB Invalidation [pdf] https://grsecurity.net/h2hc_2024_what_every_hacker_should_know_TLB_invalidation.pdf
P0149R1: Generalised member pointers
一个有趣的语言提案,简单来说就是允许数据成员指针指向成员的成员。给定一段代码:
如果我们要构造一个类型为
由于非虚基类也可以看作是子类中的一个成员,因此本提案还额外支持这样的类型转换:
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p0149r1.pdf
一个有趣的语言提案,简单来说就是允许数据成员指针指向成员的成员。给定一段代码:
struct Foo { int a; };
struct Bar { Foo x; int y; };
如果我们要构造一个类型为
int Bar::*
的数据成员指针,目前只能得到一个指向 Bar::y
成员的指针。这篇提案说我们不妨扩展一下数据成员指针的能力让一个 int Bar::*
也可以指向 Bar::x::a
。具体的做法是让数据成员指针能参与获取成员运算,即可以作为点操作符、-> 操作符和 [] 操作符的左操作数,例如:Foo Bar::*p1 = &Bar::x;
int Bar::*p2 = p1.a; // <--
由于非虚基类也可以看作是子类中的一个成员,因此本提案还额外支持这样的类型转换:
struct A {};
struct B : A {};
struct C { B b; };
A C::*ptr = &C::b; // B C::* to A C::* conversion
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p0149r1.pdf
Homomorphic Encryption in iOS 18 https://boehs.org/node/homomorphic-encryption
Page-table hardening with memory protection keys
https://lwn.net/SubscriberLink/1004029/cfef7018513ca3ac/
https://lwn.net/SubscriberLink/1004029/cfef7018513ca3ac/
开摆