Linux userland API discussions
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Meng Zhuo <mengzhuo1203@gmail.com>
Cc: linux-api@vger.kernel.org, bpf@vger.kernel.org
Subject: Re: Please remove all bit fields in bpf uapi
Date: Fri, 18 Dec 2020 11:31:22 +0100	[thread overview]
Message-ID: <X9yE+hJpT73PdKjG@kroah.com> (raw)
In-Reply-To: <CACt3ES3NTRZF4jbCjgHybGHofNypQ3EPnYvuJi-eZZXJtonQUg@mail.gmail.com>

On Fri, Dec 18, 2020 at 05:09:58PM +0800, Meng Zhuo wrote:
> Hi, Greg
> 
> Thank you for your reply
> It's fine to do compile bit fields "by hand".

Surely Go has something like "if (field & 0x01)", right?  That's all you
need for a bitfield.

Look at the most common syscall, open(2)?  It uses bitfields, why
can't Go handle that?

> However is it possible to setup a guideline that forrbid "bit fields"
> in uapi in the future?

Where would that guideline go and who would enforce it?  :)

thanks,

greg k-h

  reply	other threads:[~2020-12-18 10:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-18  8:52 Please remove all bit fields in bpf uapi Meng Zhuo
2020-12-18  8:56 ` Greg KH
2020-12-18  9:09   ` Meng Zhuo
2020-12-18 10:31     ` Greg KH [this message]
2020-12-18 11:04       ` Florian Weimer
2020-12-18 13:05         ` Daniel Borkmann

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=X9yE+hJpT73PdKjG@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=bpf@vger.kernel.org \
    --cc=linux-api@vger.kernel.org \
    --cc=mengzhuo1203@gmail.com \
    /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