frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Ask HN: How to handle kernel struct changes (e.g. iov_iter) in eBPF?

3•morolis•6h ago
I used the kernel vmlinux header file(6.10 version) from pwru to compile, but my actual kernel version was 6.6. the iov field name in iov_iter become an internal anonymous structure __iov file on kernel changing(6.10->6.6), so the led to that if I extracted and compiled according to the field name of version 6.10, I could not run in my current system, and vice versa. I would like to ask what is a more formal or official solution to deal with this change in kernel structure? My current solution is to directly customize two different versions of iov anonymous structures to judge whether two ways to obtain iov are compatible through bpf_core_field_exists.

Comments

morolis•6h ago
I define structt iov_iter___old and struct iov_iter___new, and then use bpf_core_field_exists(((struct iov_iter___new )0)->__iov) to judge whether to use struct iov_iter___new iter = (void )&msg->msg_iter or struct iov_iter___old iter = (void *)&msg->msg_iter
morolis•5h ago
I should add that I am in the kprobe tcp_sendmsg function and need to get the contents of the iov field in msg_iter.

Ask HN: Are people optimistic about the future?

15•JohnDSDev•1h ago•19 comments

Ask HN: Will programmers write more efficient code during the memory shortage?

138•amichail•21h ago•230 comments

Ask HN: What technique do you use to make Claude Code deterministic?

3•hbarka•4h ago•4 comments

Ask HN: Due to spam on GitHub, what platforms can I move my projects?

46•ciwolex•2h ago•48 comments

Ask HN: What do you care about? What is your joy and purpose?

7•bix6•6h ago•14 comments

Ask HN: How to handle kernel struct changes (e.g. iov_iter) in eBPF?

3•morolis•6h ago•2 comments

Ask HN: Is anyone using the A2A protocol?

92•asim•2d ago•41 comments

Ask HN: Need advice on distributing and testing what I build

3•darth-pixit•9h ago•2 comments

Ask HN: What tools are you using for AI-assisted code review?

21•agos•2d ago•21 comments

Forked CozoDB to give agents cognitive primitives

3•shanrizvi•17h ago•0 comments

Ask HN: What is the coolest tech progress outside AI?

12•vantareed•1d ago•7 comments

Ask HN: Is anyone else leaving AUR?

7•lordkrandel•1d ago•6 comments

Ask HN: What's a simple app you'd build if you had a weekend?

4•akashwadhwani35•15h ago•7 comments

Ask HN: I'm lost. How can I define ICP (Ideal Customer Profile)?

5•snowhy•2d ago•6 comments

Ask HN: Open-Source Intelligence

3•silent_butagrim•1d ago•5 comments

Ask HN: Is there a recognized standard for swarm intelligence benchmarking?

5•stephanieriggs•1d ago•1 comments

Ask HN: Is there a way to stop the animated Google Doodles?

11•arnejenssen•2d ago•13 comments

Self-adapting and mutating LLM based viruses/worms

3•rozumbrada•1d ago•4 comments

Ask HN: Using OPA/Rego to secure MCP tool execution. Does it make sense?

5•wmolino•14h ago•1 comments

Ask HN: How do you effectively communicate or present?

10•hnthrow10282910•2d ago•7 comments

Trillions of dollars spent just to work on customer services?

8•YihaoZhang•1d ago•3 comments

Ask HN: Conflicted about founding engineer role

8•gondolin1683•2d ago•18 comments

Ask HN: Do you find vibe coding / agentic engineering to be fulfilling?

10•uejfiweun•2d ago•13 comments

Ask HN: What's a prompt you've written that you're genuinely proud of?

11•akashwadhwani35•2d ago•7 comments

Meetup.com login appears to be exceeding its reCAPTCHA Enterprise quota

4•infl8ed•1d ago•0 comments

Ask HN: Has anyone had success with SBIR grants and what is the process like?

11•lyfeninja•2d ago•8 comments

Ask HN: Are other people seeing a spike in IT problems with businesses?

14•PaulHoule•3d ago•11 comments

Anthropic pauses credit change for Claude Code

36•fabianlindfors•5d ago•12 comments

Reviews have become expensive, rewrites have become cheap

82•_z6bq•4d ago•74 comments

Ask HN: How do you find new books to read?

5•ahmedfromtunis•2d ago•6 comments