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: <CAK8P3a0Sp9JV-1pgqH0uf7tXxpL2O-VB+Unse8VaenO5drR15Q@mail.gmail.com>
Date:   Sat, 15 May 2021 22:16:32 +0200
From:   Arnd Bergmann <arnd@...nel.org>
To:     Randy Dunlap <rdunlap@...radead.org>
Cc:     linux-arch <linux-arch@...r.kernel.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Vineet Gupta <vgupta@...opsys.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 12/13] asm-generic: uaccess: 1-byte access is always aligned

On Sat, May 15, 2021 at 8:41 PM Randy Dunlap <rdunlap@...radead.org> wrote:
> On 5/14/21 3:01 AM, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@...db.de>
> > diff --git a/include/asm-generic/uaccess.h b/include/asm-generic/uaccess.h
> > index 4973328f3c6e..7e903e450659 100644
> > --- a/include/asm-generic/uaccess.h
> > +++ b/include/asm-generic/uaccess.h
> > @@ -19,7 +19,7 @@ __get_user_fn(size_t size, const void __user *from, void *to)
> >
> >       switch (size) {
> >       case 1:
> > -             *(u8 *)to = get_unaligned((u8 __force *)from);
> > +             *(u8 *)to = *((u8 __force *)from);
> >               return 0;
> >       case 2:
> >               *(u16 *)to = get_unaligned((u16 __force *)from);
> > @@ -45,7 +45,7 @@ __put_user_fn(size_t size, void __user *to, void *from)
> >
> >       switch (size) {
> >       case 1:
> > -             put_unaligned(*(u8 *)from, (u8 __force *)to);
> > +             *(*(u8 *)from, (u8 __force *)to);
>
> Should that be           from =
> ?

Thanks a lot for catching the typo!

Changed now to

        *(u8 __force *)to = *(u8 *)from;

For some reason neither my own build testing nor the kernel
build bot caught it so far.

        Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ