netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: "David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>, Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Michal Kubecek <mkubecek@suse.cz>, Jens Axboe <axboe@kernel.dk>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Networking <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next v2 1/2] ethtool: improve compat ioctl handling
Date: Fri, 25 Sep 2020 20:42:53 +0200	[thread overview]
Message-ID: <CAK8P3a1zBgFbx8ZeqFUXok2WsOha+72zXpFZ60Sv+9=wwaqe4w@mail.gmail.com> (raw)
In-Reply-To: <20200925132237.2748992-1-arnd@arndb.de>

On Fri, Sep 25, 2020 at 3:22 PM Arnd Bergmann <arnd@arndb.de> wrote:
>
> The ethtool compat ioctl handling is hidden away in net/socket.c,
> which introduces a couple of minor oddities:
>
> - The implementation may end up diverging, as seen in the RXNFC
>   extension in commit 84a1d9c48200 ("net: ethtool: extend RXNFC
>   API to support RSS spreading of filter matches") that does not work
>   in compat mode.
>
> - Most architectures do not need the compat handling at all
>   because u64 and compat_u64 have the same alignment.
>
> - On x86, the conversion is done for both x32 and i386 user space,
>   but it's actually wrong to do it for x32 and cannot work there.
>
> - On 32-bit Arm, it never worked for compat oabi user space, since
>   that needs to do the same conversion but does not.
>
> - It would be nice to get rid of both compat_alloc_user_space()
>   and copy_in_user() throughout the kernel.
>
> None of these actually seems to be a serious problem that real
> users are likely to encounter, but fixing all of them actually
> leads to code that is both shorter and more readable.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Reviewed-by: Christoph Hellwig <hch@lst.de>

The kbuild bot found another dependency on a patch that I had in my
testing tree (moving compat_u64). Let's drop both patches for now, I'll
resend once that has been merged.

      Arnd

      parent reply	other threads:[~2020-09-25 18:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-25 13:22 [PATCH net-next v2 1/2] ethtool: improve compat ioctl handling Arnd Bergmann
2020-09-25 13:22 ` [PATCH net-next v2 2/2] dev_ioctl: split out SIOC?IFMAP ioctls Arnd Bergmann
2020-09-25 18:42 ` Arnd Bergmann [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='CAK8P3a1zBgFbx8ZeqFUXok2WsOha+72zXpFZ60Sv+9=wwaqe4w@mail.gmail.com' \
    --to=arnd@arndb.de \
    --cc=andrew@lunn.ch \
    --cc=axboe@kernel.dk \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=hch@lst.de \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mkubecek@suse.cz \
    --cc=netdev@vger.kernel.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).