STRUCT RSEQ_EVENT(9)
π struct rseq_event
okay so bestie, welcome to the <purple>struct rseq_event</purple> page from the Kernel API Manual β this is the little storage blob that keeps track of all the rseq-related event management business. it's giving "tiny struct, huge responsibilities" and honestly? iconic. β¨
π¦ NAME
struct rseq_event β Storage for rseq related event management π
πΈ SYNOPSIS
struct rseq_event {
union {
u64 all;
struct {
union {
u32 events;
struct {
u8 sched_switch;
u8 ids_changed;
u8 user_irq;
};
};
u8 has_rseq;
u8 __pad;
union {
u16 error;
struct {
u8 fatal;
u8 slowpath;
};
};
};
};
};
likeβ¦ look at all those anonymous unions. nested. layered. all on top, little u8s down at the bottom. it's a whole vibe pyramid π
π«Ά MEMBERS
okay so here's the tour, member by member, no skips π
{unnamed_union}β anonymous π«§ (yes really, that's the whole description, she's mysterious)allβ Compound to initialize and clear the data efficiently. this is the "grab the whole thing in one go" field, bestie. efficient queen π{unnamed_struct}β anonymous πΈ{unnamed_union}β anonymous β¨ (we love a recurring bit)eventsβ Compound to access events with a single load/store. one load, one store, no mess π₯{unnamed_struct}β anonymous π¦sched_switchβ True if the task was scheduled and needs update on exit to user. so like, "hey you got scheduled, remember to update when you go back to userspace" πids_changedβ Indicator that IDs need to be updated. the IDs are changing, the IDs are changing π«user_irqβ True on interrupt entry from user mode. loud and interrupting, we stan β‘has_rseqβ Greater than 0 if the task has a rseq pointer installed. Contains the RSEQ version number. so it's a bool and a version field, she contains multitudes π{unnamed_union}β anonymous πerrorβ Compound error code for the slow path to analyze. the slow path is gonna read this and figure out what went wrong π{unnamed_struct}β anonymous π§fatalβ User space data corrupted or invalid. bad vibes only, this one's serious πslowpathβ Indicator that slow path processing viaTIF_NOTIFY_RESUMEis required. "notify me when you resume," basically π¬
π DESCRIPTION
so the actual rules of the house: sched_switch and ids_changed must be adjacent, and the combo must be 16bit aligned β all of that so the scheduler can do a single store when both of them get set at the same time. one store. both flags. chefs kiss πβ¨
like don't be reordering them, bestie, the whole single-store trick falls apart. respect the layout fr fr.
β SEE ALSO
- Kernel file
./include/linux/rseq_types.h struct rseq_ids(9)union rseq_slice_state(9)struct rseq_slice(9)struct rseq_data(9)struct sched_mm_cid(9)struct mm_cid_pcpu(9)struct mm_mm_cid(9)
go read them, iykyk π¦π
and that's the page!! brought to you by ./include/linux, dated October 2026 β mwah, ily, go read your structs π
ππ«Ά
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms