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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 17 Aug 2021 10:35:29 +0000
From:   "Kubalewski, Arkadiusz" <arkadiusz.kubalewski@...el.com>
To:     Arnd Bergmann <arnd@...db.de>
CC:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Intel Wired LAN <intel-wired-lan@...ts.osuosl.org>,
        Networking <netdev@...r.kernel.org>,
        "open list:KERNEL SELFTEST FRAMEWORK" 
        <linux-kselftest@...r.kernel.org>,
        "Brandeburg, Jesse" <jesse.brandeburg@...el.com>,
        "Nguyen, Anthony L" <anthony.l.nguyen@...el.com>,
        David Miller <davem@...emloft.net>,
        "Jakub Kicinski" <kuba@...nel.org>,
        Richard Cochran <richardcochran@...il.com>,
        Shuah Khan <shuah@...nel.org>,
        Nikolay Aleksandrov <nikolay@...dia.com>,
        "cong.wang@...edance.com" <cong.wang@...edance.com>,
        Colin Ian King <colin.king@...onical.com>,
        "Gustavo A. R. Silva" <gustavoars@...nel.org>
Subject: RE: [RFC net-next 4/7] net: add ioctl interface for recover reference
 clock on netdev

>On Mon, Aug 16, 2021 at 6:18 PM Arkadiusz Kubalewski
><arkadiusz.kubalewski@...el.com> wrote:
>
>> +/*
>> + * Structure used for passing data with SIOCSSYNCE and SIOCGSYNCE ioctls
>> + */
>> +struct synce_ref_clk_cfg {
>> +       __u8 pin_id;
>> +       _Bool enable;
>> +};
>
>I'm not sure if there are any guarantees about the size and alignment of _Bool,
>maybe better use __u8 here as well, if only for clarity.
>

Sure, will fix that in next patch, seems reasonable

>> +#endif /* _NET_SYNCE_H */
>> diff --git a/include/uapi/linux/sockios.h b/include/uapi/linux/sockios.h
>> index 7d1bccbbef78..32c7d4909c31 100644
>> --- a/include/uapi/linux/sockios.h
>> +++ b/include/uapi/linux/sockios.h
>> @@ -153,6 +153,10 @@
>>  #define SIOCSHWTSTAMP  0x89b0          /* set and get config           */
>>  #define SIOCGHWTSTAMP  0x89b1          /* get config                   */
>>
>> +/* synchronous ethernet config per physical function */
>> +#define SIOCSSYNCE     0x89c0          /* set and get config           */
>> +#define SIOCGSYNCE     0x89c1          /* get config                   */
>
>I understand that these are traditionally using the old-style 16-bit
>numbers, but is there any reason to keep doing that rather than
>making them modern like this?

Personally I would try to keep it one way, just for consistency, 
but you might be right - making it modern way is better option.
If no other objections to this comment I am going to change it according to
Arnd's suggestion in next patch.

>
>#define SIOCSSYNCE     _IOWR(0x89, 0xc0, struct  synce_ref_clk_cfg)
>/* set and get config   */
>#define SIOCGSYNCE     _IOR(0x89, 0xc1, struct  synce_ref_clk_cfg)
>/* get config   */
>
>        Arnd
>

Thank you,
Arkadiusz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ