From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Yousef Alhouseen <alhouseenyousef@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
Russell King <linux@armlinux.org.uk>,
Yoshinori Sato <ysato@users.sourceforge.jp>,
Rich Felker <dalias@libc.org>,
John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-sh@vger.kernel.org
Subject: Re: [PATCH] char: mem: keep arch range checks overflow-safe
Date: Fri, 17 Jul 2026 16:17:25 +0200 [thread overview]
Message-ID: <2026071710-flanked-espresso-5b06@gregkh> (raw)
In-Reply-To: <20260625085800.4505-1-alhouseenyousef@gmail.com>
On Thu, Jun 25, 2026 at 10:58:00AM +0200, Yousef Alhouseen wrote:
> The generic /dev/mem physical range check now avoids validating
> addr + size directly, but ARM and SH provide their own
> valid_phys_addr_range() implementations with the same wrapped-addition
> pattern.
>
> Use subtraction-based upper-bound checks in those overrides as well. Also
> make the ARM mmap pfn check avoid overflowing the pfn plus page-count
> expression.
>
> Suggested-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Yousef Alhouseen <alhouseenyousef@gmail.com>
> ---
> arch/arm/mm/mmap.c | 9 +++++++--
> arch/sh/mm/mmap.c | 4 +++-
> 2 files changed, 10 insertions(+), 3 deletions(-)
This should be part of the char/mem patch, right?
thanks,
greg k-h
next prev parent reply other threads:[~2026-07-17 14:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-25 8:58 [PATCH] char: mem: keep arch range checks overflow-safe Yousef Alhouseen
2026-07-17 14:17 ` Greg Kroah-Hartman [this message]
2026-07-18 12:20 ` Yousef Alhouseen
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=2026071710-flanked-espresso-5b06@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=alhouseenyousef@gmail.com \
--cc=arnd@arndb.de \
--cc=dalias@libc.org \
--cc=glaubitz@physik.fu-berlin.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=ysato@users.sourceforge.jp \
/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.