lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Sat, 20 Mar 2021 18:22:40 +0100
From:   Oliver Hartkopp <socketcan@...tkopp.net>
To:     "Alejandro Colomar (man-pages)" <alx.manpages@...il.com>,
        netdev <netdev@...r.kernel.org>
Subject: Re: Fwd: netdevice.7 SIOCGIFFLAGS/SIOCSIFFLAGS

Hi Alejandro,

we added IFF_ECHO these days on suggestion of Dave Miller - and the 
IFF_LOWER_UP/IFF_DORMANT were already there at that time.

I don't know if there ioctls are still used for retrieving these flags 
as I assume this is done via netlink interface today.

At least there is enough space (in the union) in the ioctl structure for 
longer data structures:

https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/if.h#L265

https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/if.h#L247

https://elixir.bootlin.com/linux/latest/source/net/core/dev_ioctl.c#L114

If you continue discussing about this topic, please remove the 
Volkswagen mail addresses from Urs and me.

I'm still maintaining the CAN subsystem in the Linux kernel - but with a 
private mail address.

And you should better add the netdev ML to your recipients 
netdev@...r.kernel.org where all the netdev guys (including Dave Miller) 
hang out.

Best,
Oliver


> 
> ------------------------------------------------------------------------
> *Von:* Alejandro Colomar (man-pages) <alx.manpages@...il.com>
> *Gesendet:* Freitag, März 19, 2021 9:00 PM
> *An:* Erik Flodin; mtk.manpages@...il.com
> *Cc:* linux-man@...r.kernel.org; Stefan Rompf; David S. Miller; Fredrik 
> Arnerup; John Dykstra; David S. Miller; Hartkopp, Oliver, Dr. (EESC/3); 
> Thuermann, Urs, Dr. (K-AERD/M)
> *Betreff:* Re: netdevice.7 SIOCGIFFLAGS/SIOCSIFFLAGS
> [CC += Fredrik, John, David S., Steven, Oliver, Urs]
> 
> Hi,
> 
> On 3/17/21 3:12 PM, Erik Flodin wrote:
>> Hi,
>> 
>> The documentation for SIOCGIFFLAGS/SIOCSIFFLAGS in netdevice.7 lists
>> IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO, but those can't be set in
>> ifr_flags as it is only a short and the flags start at 1<<16.
>> 
>> See also https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=746e6ad23cd6fec2edce056e014a0eabeffa838c 
> <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=746e6ad23cd6fec2edce056e014a0eabeffa838c>
>> 
> 
> I don't know what's the history of that.
> I researched a bit, and while the struct member is indeed a 'short' [1],
> the flags were added to the kernel for some reason.
> I added a few people to the thread that may know better what to do.Let's
> see if they can comment.
> 
> Links to relevant commits:
> 
> <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=746e6ad23cd6fec2edce056e014a0eabeffa838c 
> <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=746e6ad23cd6fec2edce056e014a0eabeffa838c>>
> <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b00055aacdb172c05067612278ba27265fcd05ce 
> <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b00055aacdb172c05067612278ba27265fcd05ce>>
> <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cd05acfe65ed2cf2db683fa9a6adb8d35635263b 
> <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cd05acfe65ed2cf2db683fa9a6adb8d35635263b>>
> <https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/commit/?id=6ecda4d14604d250d385346f4fe9de707f281759 
> <https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/commit/?id=6ecda4d14604d250d385346f4fe9de707f281759>>
> 
> Thanks,
> 
> Alex
> 
> [1]:
> 
> .../linux$ sed -n '/struct ifreq {/,/};/p' include/uapi/linux/if.h
> struct ifreq {
> #define IFHWADDRLEN     6
>          union
>          {
>                  char    ifrn_name[IFNAMSIZ];            /* if name, 
> e.g. "en0" */
>          } ifr_ifrn;
> 
>          union {
>                  struct  sockaddr ifru_addr;
>                  struct  sockaddr ifru_dstaddr;
>                  struct  sockaddr ifru_broadaddr;
>                  struct  sockaddr ifru_netmask;
>                  struct  sockaddr ifru_hwaddr;
>                  short   ifru_flags;
>                  int     ifru_ivalue;
>                  int     ifru_mtu;
>                  struct  ifmap ifru_map;
>                  char    ifru_slave[IFNAMSIZ];   /* Just fits the size */
>                  char    ifru_newname[IFNAMSIZ];
>                  void __user *   ifru_data;
>                  struct  if_settings ifru_settings;
>          } ifr_ifru;
> };
> .../linux$ grep 'define\sifr_flags' include/uapi/linux/if.h
> #define ifr_flags       ifr_ifru.ifru_flags     /* flags                */
> .../linux$
> 
> -- 
> Alejandro Colomar
> Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/ 
> <https://www.kernel.org/doc/man-pages/>
> http://www.alejandro-colomar.es/ <http://www.alejandro-colomar.es/>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ