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  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:   Sat, 24 Sep 2022 10:34:12 +0000
From:   Wei Liu <wei.liu@...nel.org>
To:     Kees Cook <keescook@...omium.org>
Cc:     "K. Y. Srinivasan" <kys@...rosoft.com>,
        "Gustavo A. R. Silva" <gustavoars@...nel.org>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        Wei Liu <wei.liu@...nel.org>, Dexuan Cui <decui@...rosoft.com>,
        linux-hyperv@...r.kernel.org,
        Nathan Chancellor <nathan@...nel.org>,
        linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH] Drivers: hv: vmbus: Split memcpy of flex-array

Hi Kees

On Fri, Sep 23, 2022 at 09:22:55PM -0700, Kees Cook wrote:
> On Fri, Sep 23, 2022 at 10:42:38PM -0500, Gustavo A. R. Silva wrote:
> > On Fri, Sep 23, 2022 at 08:07:41PM -0700, Kees Cook wrote:
> > > To work around a misbehavior of the compiler's ability to see into
> > > composite flexible array structs (as detailed in the coming memcpy()
> > > hardening series[1]), split the memcpy() of the header and the payload
> > > so no false positive run-time overflow warning will be generated. As it
> > > turns out, this appears to actually reduce the text size:
> 
> Er, actually, I can't read/math. ;) It _does_ grow the text size. (That's
> 2_3_ not 22 at the start of the text size...) On examination, it appears
> to unroll the already inlined memcpy further.

Can you provide an updated commit message? No need to resend.

Thanks,
Wei.

> 
> > > 
> > > $ size drivers/hv/vmbus_drv.o.before drivers/hv/vmbus_drv.o
> > >    text    data     bss     dec     hex filename
> > >   22968    5239     232   28439    6f17 drivers/hv/vmbus_drv.o.before
> > >   23032    5239     232   28503    6f57 drivers/hv/vmbus_drv.o
>        ^
> 
> -Kees
> 
> -- 
> Kees Cook

Powered by blists - more mailing lists