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] [day] [month] [year] [list]
Date:   Tue, 31 Mar 2020 17:06:22 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Simon Chopin <s.chopin@...halink.fr>
Cc:     Networking <netdev@...r.kernel.org>,
        "David S . Miller" <davem@...emloft.net>,
        Guillaume Nault <gnault@...hat.com>
Subject: Re: [PATCH net-next] pppoe: new ioctl to extract per-channel stats

On Tue, Mar 31, 2020 at 12:03 PM Simon Chopin <s.chopin@...halink.fr> wrote:
> Le 26/03/2020 à 15:31, Arnd Bergmann a écrit :
> > On Thu, Mar 26, 2020 at 2:48 PM Simon Chopin <s.chopin@...halink.fr> wrote:
> >> +_Static_assert(sizeof(struct pppol2tp_ioc_stats) == sizeof(struct pppchan_ioc_stats), "same size");
> >> +_Static_assert((size_t)&((struct pppol2tp_ioc_stats *)0)->tx_packets == (size_t)&((struct pppchan_ioc_stats *)0)->tx_packets, "same offset");
> >
> > Conceptually this is what I had in mind, but implementation-wise, I'd suggest
> > only having a single structure definition, possibly with a #define like
> >
> > #define pppoe_ioc_stats pppchan_ioc_stats
> I'm assuming that'd be #define pppol2tp_stats pppchan_ioc_stats ?

Right.

> > #define PPPIOCGCHANSTATS _IOR('t', 54, struct pppchan_ioc_stats)
> > #define PPPIOCGL2TPSTATS PPPIOCGCHANSTATS
>
> Thank you for your feedback. I'm probably going to implement a more
> generic version at the generic PPP channel instead, though, as,
> as noted by Guillaume, those statistics are not for the PPP channel
> but for the layer underneath.
>
> However, I'd like to be sure I understand your proposal here :
> we'd use a generic pppchan_ioc_stats struct that would be identical
> to the current pppol2tp_ioc_stats, including the 3 L2TP-specific fields,
> so that we'd retain ABI and API compatibility, and we would simply
> #define the current API to the new one?

Yes, that's the idea.

      Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ