BPF List
 help / color / mirror / Atom feed
From: Eduard Zingerman <eddyz87@gmail.com>
To: Alan Maguire <alan.maguire@oracle.com>,
	bpf@vger.kernel.org, ast@kernel.org
Cc: andrii@kernel.org, daniel@iogearbox.net, martin.lau@linux.dev,
	 kernel-team@fb.com, yonghong.song@linux.dev,
	jose.marchesi@oracle.com
Subject: Re: [PATCH bpf-next 0/1] use preserve_static_offset in bpf uapi headers
Date: Fri, 08 Dec 2023 17:39:36 +0200	[thread overview]
Message-ID: <6261d017f25d687f294f462ca0c0539d8b1cd436.camel@gmail.com> (raw)
In-Reply-To: <b8ae795d-b010-f451-38d9-8357da66a291@oracle.com>

On Fri, 2023-12-08 at 15:35 +0000, Alan Maguire wrote:
[...]
> > Tbh, I like the decl tag approach a bit more too.
> > Although macro definition would be somewhat ridiculous:
> > 
> >     #if __has_attribute(preserve_static_offset) && defined(__bpf__)
> >     #define __bpf_ctx __attribute__((preserve_static_offset)) \
> >                       __attribute__((btf_decl_tag("preserve_static_offset")))
> >     #else
> >     #define __bpf_ctx
> >     #endif
> > 
> 
> As macro definitions go, that's not that ridiculous ;-)

Fair enough :)

> If we add it to vmlinux.h, would be good to have a
> 
> #ifdef BPF_NO_PRESERVE_STATIC_OFFSET
> #undef __bpf_ctx
> #define __bpf_ctx
> #endif
> 
> ...too, just in case the user wanted to use CO-RE with any of the types
> covered. Thanks!

Will do.

Thanks,
Eduard.

      reply	other threads:[~2023-12-08 15:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-08  0:05 [PATCH bpf-next 0/1] use preserve_static_offset in bpf uapi headers Eduard Zingerman
2023-12-08  0:05 ` [PATCH bpf-next 1/1] bpf: Mark virtual BPF context structures as preserve_static_offset Eduard Zingerman
2023-12-08  3:36   ` Yonghong Song
2023-12-08 14:23     ` Eduard Zingerman
2023-12-08  2:28 ` [PATCH bpf-next 0/1] use preserve_static_offset in bpf uapi headers Yonghong Song
2023-12-08 14:34   ` Eduard Zingerman
2023-12-08 17:19     ` Yonghong Song
2023-12-08 20:54       ` Eduard Zingerman
2023-12-08 17:30     ` Yonghong Song
2023-12-08 17:46       ` Alexei Starovoitov
2023-12-08 20:35         ` Eduard Zingerman
2023-12-08 12:27 ` Alan Maguire
2023-12-08 14:21   ` Eduard Zingerman
2023-12-08 15:35     ` Alan Maguire
2023-12-08 15:39       ` Eduard Zingerman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6261d017f25d687f294f462ca0c0539d8b1cd436.camel@gmail.com \
    --to=eddyz87@gmail.com \
    --cc=alan.maguire@oracle.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=jose.marchesi@oracle.com \
    --cc=kernel-team@fb.com \
    --cc=martin.lau@linux.dev \
    --cc=yonghong.song@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox