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: <Y1JA0S7jvlA2573n@kroah.com>
Date:   Fri, 21 Oct 2022 08:48:49 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     Kees Cook <keescook@...omium.org>,
        "Jason A. Donenfeld" <Jason@...c4.com>,
        Alexey Dobriyan <adobriyan@...il.com>,
        akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
        mm-commits@...r.kernel.org, masahiroy@...nel.org,
        andriy.shevchenko@...ux.intel.com,
        Stephen Rothwell <sfr@...b.auug.org.au>
Subject: Re: [PATCH -mm] -funsigned-char, x86: make struct
 p4_event_bind::cntr signed array

On Thu, Oct 20, 2022 at 01:17:33PM -0700, Linus Torvalds wrote:
> And in other cases, there's no actual difference at all, just
> different register usage, so the diff looks fairly big, but doesn't
> seem to be real.  In one case I looked at, it started with a 'movzbl',
> but it was that in both cases, because the type was actually 'unsigned
> char' to begin with. But for some reason it just used different
> registers. Example:
> 
>  - handle_control_request() in drivers/usb/gadget/udc/dummy_hcd.c
> 
>    The reason here *seems* to be that
> 
>                         char *buf;
>                         buf = (char *)urb->transfer_buffer;
> 
>    where it really probably should be 'u8 *buf', since it actually
> does a cast to 'u8' in one place, but there isn't even any read of
> that 'buf' pointer. So the difference seems to be entirely just some
> "different type in assignment" cast internal to gcc that then
> incidentally generated a random other choice in register allocation.

I've send a patch for this now:
	https://lore.kernel.org/r/20221021064453.3341050-1-gregkh@linuxfoundation.org
and will take it through the USB tree, unless Jason wants to grab it
through his tree.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ