bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Will Hawkins <hawkinsw@obs.cr>
To: bpf@vger.kernel.org, "jemarch@gnu.org" <jemarch@gnu.org>
Subject: [RFC] Interest in additional endianness documentation
Date: Mon, 26 Jun 2023 17:44:51 -0400	[thread overview]
Message-ID: <CADx9qWgHCC4MML2d+mq25-aeTn+20qxjeTZSHMGPQrMq65a+bQ@mail.gmail.com> (raw)

Hello all!

Thank you to everyone in the community for building/working on such a
great tool! I am helping build a userspace implementation of eBPF and
following Dave's standardization process closely.

I was investigating how endianness affects the order of the components
of instructions in memory. In particular, the order of the src/dest
fields. In the IETF mailing list archives I found Jose's excellent
pointer to the implementation-defined nature of the order of bit
fields (https://mailarchive.ietf.org/arch/msg/bpf/I7abyqaiXj_DYuoLln5joMw90k0/)
and spent the better part of today digging through gcc's source code
to find the *actual* logic that controls the order (yes, I believe
that I ultimately found it!).

Nevertheless, given that there is a reliance on the behavior of gcc
and clang, would you be interested in having additional documentation
about it? I would love to write it but don't want to waste your time.
I was thinking:

1. Adding documentation about field order to include/uapi/linux/bpf.h
where the insn struct is defined.
2. Adding documentation to the design QA (Documentation/bpf/bpf_design_QA.rst)
3. Anything else that others might want.

I apologize for the long email and I just want to be helpful. If this
seems worthwhile, please let me know. Otherwise, I will defer and not
bother you all further.

Thanks!
Will

                 reply	other threads:[~2023-06-26 21:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=CADx9qWgHCC4MML2d+mq25-aeTn+20qxjeTZSHMGPQrMq65a+bQ@mail.gmail.com \
    --to=hawkinsw@obs.cr \
    --cc=bpf@vger.kernel.org \
    --cc=jemarch@gnu.org \
    /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;
as well as URLs for NNTP newsgroup(s).