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:   Sat, 5 Dec 2020 10:15:11 -0500
From:   Alan Stern <stern@...land.harvard.edu>
To:     Minh Bùi Quang <minhquangbui99@...il.com>
Cc:     Felipe Balbi <balbi@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Corentin Labbe <clabbe@...libre.com>,
        Jules Irenge <jbi.octave@...il.com>,
        Andrey Konovalov <andreyknvl@...il.com>,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] USB: dummy-hcd: Fix uninitialized array use in init()

On Sat, Dec 05, 2020 at 07:47:01PM +0700, Minh Bùi Quang wrote:
> Vào Th 6, 4 thg 12, 2020 vào lúc 23:12 Alan Stern
> <stern@...land.harvard.edu> đã viết:
> > Does this initialization end up using less memory than an explicit
> > memset() call?
> 
> You mean speed?

No, I mean memory space.

A memset call requires a certain amount of instruction space (to push 
the arguments and make the call) but no static data space.  
Initialization requires some instruction space (to copy the data) and 
static data space as well (to hold the data that is to be copied).

Alan Stern

> In my opinion, there is no difference in speed between 2 ways.
> When I compile this array initialization using gcc 5.4.0,  this
> initialization becomes
> mov instructions when MAX_NUM_UDC=2 and becomes rep stos when
> MAX_NUM_UDC=32. I think it makes no difference when comparing with memset()
> 
> Thanks,
> Quang Minh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ