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:   Tue, 26 Apr 2022 13:48:11 -0700
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     "Fabio M. De Francesco" <fmdefrancesco@...il.com>
Cc:     Ira Weiny <ira.weiny@...el.com>,
        Catalin Marinas <catalin.marinas@....com>,
        "Matthew Wilcox (Oracle)" <willy@...radead.org>,
        Peter Collingbourne <pcc@...gle.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/highmem: VM_BUG_ON() if offset + len > PAGE_SIZE

On Tue, 26 Apr 2022 22:19:57 +0200 "Fabio M. De Francesco" <fmdefrancesco@...il.com> wrote:

> On martedì 26 aprile 2022 21:34:12 CEST Andrew Morton wrote:
> > On Tue, 26 Apr 2022 21:30:20 +0200 "Fabio M. De Francesco" 
> <fmdefrancesco@...il.com> wrote:
> > 
> > > Add VM_BUG_ON() bounds checking to make sure that, if "offset + len>
> > > PAGE_SIZE", memset() does not corrupt data in adjacent pages.
> > > 
> > 
> > hm, why?  To match all the other functions in there?
> > 
> > I suppose that's logical.  Or we could just delete all the other
> > VM_BUG_ON()s.  Have any of them proven to be at all useful?
> > 
> I am not so sure about it being so useful. I just noted that memzero_page() 
> is the only function of that family that is implemented with no 
> VM_BUG_ON(). I have no actual proofs of usefulness :( 
> 
> This is why yesterday I sent an "RFC Patch" (please see  
> https://lore.kernel.org/lkml/20220424104806.25396-1-fmdefrancesco@gmail.com/
> 
> Soon after sending it I thought that VM_WARN_ON_ONCE() could have been 
> better suited, but Ira Weiny wrote to use VM_BUG_ON() for consistency.
> 
> Now I could either delete all other VM_BUG_ON() or replace them with 
> VM_WARN_ON_ONCE() (or some other macro). 
> 
> Ah, a third solution might be to leave highmem.h as it is now :)
> 
> What do you prefer?

Merge this patch as-is, I guess.  Going through and removing unuseful
VM_BUG_ON()s is a separable activity.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ