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:   Thu, 21 Jan 2021 12:48:25 +0000
From:   Will Deacon <will@...nel.org>
To:     Nick Desaulniers <ndesaulniers@...gle.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Linux Memory Management List <linux-mm@...ck.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        Catalin Marinas <catalin.marinas@....com>,
        Jan Kara <jack@...e.cz>, Minchan Kim <minchan@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        "Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Vinayak Menon <vinmenon@...eaurora.org>,
        Hugh Dickins <hughd@...gle.com>,
        kernel-team <kernel-team@...roid.com>
Subject: Re: [PATCH v4 4/8] mm: Move immutable fields of 'struct vm_fault'
 into anonymous struct

On Wed, Jan 20, 2021 at 10:13:37AM -0800, Nick Desaulniers wrote:
> On Wed, Jan 20, 2021 at 9:36 AM Will Deacon <will@...nel.org> wrote:
> >
> > 'struct vm_fault' contains both information about the fault being
> > serviced alongside mutable fields contributing to the state of the
> > fault-handling logic. Unfortunately, the distinction between the two is
> > not clear-cut, and a number of callers end up manipulating the structure
> > temporarily before restoring it when returning.
> >
> > Try to clean this up by moving the immutable fault information into an
> > anonymous struct, which will later be marked as 'const'. GCC will then
> > complain (with an error) about modification of these fields after they
> > have been initialised, although LLVM currently allows them without even
> > a warning:
> >
> > https://bugs.llvm.org/show_bug.cgi?id=48755
> 
> I think this paragraph+link would be better on patch 8/8.

Agreed, I'll move it.

Will

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ