netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Arnd Bergmann <arnd@kernel.org>
Cc: netdev@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
	Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH v5 3/4] net: socket: simplify dev_ifconf handling
Date: Wed, 21 Jul 2021 09:32:50 +0200	[thread overview]
Message-ID: <20210721073250.GC11257@lst.de> (raw)
In-Reply-To: <20210720142436.2096733-4-arnd@kernel.org>

> The implementation can be simplified further, based on the
> knowledge that the dynamic registration is only ever used
> > for IPv4.

I think dropping register_gifconf (which seems like a nice cleanup!)
needs to be a separate prep patch to not make this too confusing.


> index e6231837aff5..4727c7a3a988 100644
> --- a/include/linux/compat.h
> +++ b/include/linux/compat.h
> @@ -104,6 +104,11 @@ struct compat_ifmap {
>  	unsigned char port;
>  };
>  
> +struct compat_ifconf {
> +	compat_int_t	ifc_len;                /* size of buffer */
> +	compat_uptr_t	ifcbuf;
> +};
> +
>  #ifdef CONFIG_COMPAT
>  
>  #ifndef compat_user_stack_pointer
> @@ -326,12 +331,6 @@ typedef struct compat_sigevent {
>  	} _sigev_un;
>  } compat_sigevent_t;
>  
> -struct compat_if_settings {
> -	unsigned int type;	/* Type of physical device or protocol */
> -	unsigned int size;	/* Size of the data allocated by the caller */
> -	compat_uptr_t ifs_ifsu;	/* union of pointers */
> -};

Does this actually compile as-is?  It adds a second definition of
compat_ifconf but removes the still used compat_if_settings?

Maybe it would be a better idea to add a prep patch that makes as much
as possible of compat.h available unconditionally instead of all these
little moves.

  reply	other threads:[~2021-07-21  7:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-20 14:24 [PATCH net-next v5 0/4] remove compat_alloc_user_space() Arnd Bergmann
2021-07-20 14:24 ` [PATCH v5 1/4] ethtool: improve compat ioctl handling Arnd Bergmann
2021-07-20 14:24 ` [PATCH v5 2/4] net: socket: rework SIOC?IFMAP ioctls Arnd Bergmann
2021-07-21  7:28   ` Christoph Hellwig
2021-07-21  8:32     ` Arnd Bergmann
2021-07-20 14:24 ` [PATCH v5 3/4] net: socket: simplify dev_ifconf handling Arnd Bergmann
2021-07-21  7:32   ` Christoph Hellwig [this message]
2021-07-21  9:12     ` Arnd Bergmann
2021-07-20 14:24 ` [PATCH v5 4/4] net: socket: rework compat_ifreq_ioctl() Arnd Bergmann

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=20210721073250.GC11257@lst.de \
    --to=hch@lst.de \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --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).