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]
Message-ID: <YIGikZ2xZhH7ZRZc@shredder.lan>
Date:   Thu, 22 Apr 2021 19:21:37 +0300
From:   Ido Schimmel <idosch@...sch.org>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     netdev@...r.kernel.org, davem@...emloft.net, mlxsw@...dia.com,
        Ido Schimmel <idosch@...dia.com>
Subject: Re: [PATCH net-next] netdevsim: Only use sampling truncation length
 when valid

On Thu, Apr 22, 2021 at 09:14:26AM -0700, Jakub Kicinski wrote:
> On Thu, 22 Apr 2021 16:50:50 +0300 Ido Schimmel wrote:
> > From: Ido Schimmel <idosch@...dia.com>
> > 
> > When the sampling truncation length is invalid (zero), pass the length
> > of the packet. Without the fix, no payload is reported to user space
> > when the truncation length is zero.
> > 
> > Fixes: a8700c3dd0a4 ("netdevsim: Add dummy psample implementation")
> > Signed-off-by: Ido Schimmel <idosch@...dia.com>
> 
> Acked-by: Jakub Kicinski <kuba@...nel.org>

Thanks!

> 
> > +	md->trunc_size = psample->trunc_size ? psample->trunc_size : len;
> 
> nit:  ... = psample->trunc_size ? : len;  ?

Yea, I don't find this form too readable and always prefer the one I
used when it fits in a single line :)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ