From: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
To: Ira Weiny <ira.weiny@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
"Matthew Wilcox (Oracle)" <willy@infradead.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Peter Collingbourne <pcc@google.com>,
linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] mm/highmem: VM_BUG_ON() if offset + len > PAGE_SIZE
Date: Mon, 25 Apr 2022 22:05:29 +0200 [thread overview]
Message-ID: <2701286.BEx9A2HvPv@leap> (raw)
In-Reply-To: <YmbQluz5i95fkhn9@iweiny-desk3>
On lunedì 25 aprile 2022 18:47:18 CEST Ira Weiny wrote:
> On Mon, Apr 25, 2022 at 03:47:38AM +0200, Fabio M. De Francesco wrote:
> > On domenica 24 aprile 2022 12:48:06 CEST Fabio M. De Francesco wrote:
> > > Call VM_BUG_ON() if offset + len > PAGE_SIZE.
> > >
> > > This is an RFC patch because I'm not sure if we actually need to
> > BUG_ON(),
> >
> > Actually I considered VM_BUG_ON() for consistency with the other
functions
> > in highmem.h
> >
> > What about VM_WARN_ON_ONCE() here and also in memset_page?
>
> For consistency leave this as a VM_BUG_ON[1]
>
> I've been down a similar path[2] and there was a long discussion about
it.[3]
>
> In the end we settled on VM_BUG_ON.[4]
Thanks for your reply and for providing so many helpful links :)
I just read the ones related to VM_BUG_ON() (I don't have time for
flush_dcache_page() today). Since the consensus for these kinds of issues
is in favor of using VM_BUG_ON(), that's OK for me.
I will send a "real" patch by tomorrow.
Again, thanks,
Fabio
> As to the addition of flush_dcache_page(). There was a discussion here.
>
> https://lore.kernel.org/lkml/CAHk-=wiKac4t-fOP_3fAf7nETfFLhT3ShmRmBq2J96y6jAr56Q@mail.gmail.com/
>
> Ira
>
> [1] https://lore.kernel.org/lkml/20210209205249.GB2975576@iweiny-DESK2.sc.intel.com/
>
> [2] https://lore.kernel.org/lkml/20201209022250.GP1563847@iweiny-DESK2.sc.intel.com/
>
> [3] https://lore.kernel.org/lkml/20201208213255.GO1563847@iweiny-DESK2.sc.intel.com/
>
> [4] https://lore.kernel.org/lkml/20210210174928.3156073-1-ira.weiny@intel.com/
prev parent reply other threads:[~2022-04-25 20:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-24 10:48 [RFC PATCH] mm/highmem: VM_BUG_ON() if offset + len > PAGE_SIZE Fabio M. De Francesco
2022-04-25 1:47 ` Fabio M. De Francesco
2022-04-25 16:47 ` Ira Weiny
2022-04-25 20:05 ` Fabio M. De Francesco [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2701286.BEx9A2HvPv@leap \
--to=fmdefrancesco@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--cc=ira.weiny@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pcc@google.com \
--cc=will@kernel.org \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.