STRUCT MSC_WIN_TO_USER_STRUCT(9)
β¨ struct msc_win_to_user_struct β from the Kernel API Manual, bestie β¨
Okay so we're looking at struct msc_win_to_user_struct(9) today and honestly? It's a little guy. A tiny two-field struct that exists for exactly one reason and it's serving main character energy in the copy_to_user() callback department. Let's get into it π
π NAME π
struct msc_win_to_user_struct β literally just the data you need for the copy_to_user() callback. That's it. That's the whole vibe.
πΈ SYNOPSIS πΈ
struct msc_win_to_user_struct {
char __user *buf;
unsigned long offset;
};
Yes bestie, that closing brace is indented exactly like that in the source. Not a typo on my end. We keep it real here. π«Ά
π Members π
bufβ the userspace buffer where your data is headed. It's achar __user *, so you know it's living over there on the other side of the userspace/kernel boundary. Be respectful to it. πoffsetβ a running offset, anunsigned long. It keeps track of where you are as you go. Iconic lowkey bookkeeping behaviour. β¨
π¦ SEE ALSO π¦
All the friends in the group chat, no cap:
- Kernel file
./drivers/hwtracing/intel_th/msu.c struct msc_window(9)struct msc_iter(9)struct msc(9)struct msu_buffer_entry(9)msc_is_last_win(9)msc_next_window(9)msc_find_window(9)msc_oldest_window(9)msc_win_oldest_sg(9)msc_buffer_iterate(9)msc_buffer_clear_hw_header(9)msc_configure(9)msc_disable(9)msc_buffer_contig_alloc(9)msc_buffer_contig_free(9)msc_buffer_contig_get_page(9)msc_buffer_win_alloc(9)msc_buffer_win_free(9)msc_buffer_relink(9)msc_buffer_free(9)msc_buffer_alloc(9)msc_buffer_unlocked_free_unless_used(9)msc_buffer_free_unless_used(9)msc_buffer_get_page(9)msc_win_to_user(9)intel_th_msc_window_unlock(9)
Like, the entire intel_th MSC extended universe is right there. Go read them all, I'll wait π
Okay that's the whole page, bestie β short, sweet, two members and a dream. π§
This lil' cutie lives in ./drivers/hwtracing/intel_th and the page is dated October 2026 β so mark your calendar, future girlies. πβπ
Slay, and happy hacking πβ¨
π¦ 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