linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Thomas Weißschuh" <linux@weissschuh.net>
To: Richard Weinberger <richard@nod.at>,
	 Anton Ivanov <anton.ivanov@cambridgegreys.com>,
	 Johannes Berg <johannes@sipsolutions.net>,
	 Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>,  Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	 x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
	 Kees Cook <kees@kernel.org>
Cc: linux-um@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, "Thomas Weißschuh" <linux@weissschuh.net>
Subject: [PATCH 07/10] um: Remove redundant range check from __access_ok_vsyscall()
Date: Tue, 28 Oct 2025 10:15:42 +0100	[thread overview]
Message-ID: <20251028-uml-remove-32bit-pseudo-vdso-v1-7-e930063eff5f@weissschuh.net> (raw)
In-Reply-To: <20251028-uml-remove-32bit-pseudo-vdso-v1-0-e930063eff5f@weissschuh.net>

The only caller __access_ok() is already doing the same check through
__addr_range_nowrap().

Remove the redundant check.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
 arch/um/include/asm/uaccess.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/um/include/asm/uaccess.h b/arch/um/include/asm/uaccess.h
index 1c6e0ae41b0c..3770bdeee100 100644
--- a/arch/um/include/asm/uaccess.h
+++ b/arch/um/include/asm/uaccess.h
@@ -17,8 +17,7 @@
 
 #define __access_ok_vsyscall(addr, size) \
 	  (((unsigned long) (addr) >= FIXADDR_USER_START) && \
-	  ((unsigned long) (addr) + (size) <= FIXADDR_USER_END) && \
-	  ((unsigned long) (addr) + (size) >= (unsigned long)(addr)))
+	  ((unsigned long) (addr) + (size) <= FIXADDR_USER_END))
 
 #define __addr_range_nowrap(addr, size) \
 	((unsigned long) (addr) <= ((unsigned long) (addr) + (size)))

-- 
2.51.1.dirty



  parent reply	other threads:[~2025-10-28  9:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-28  9:15 [PATCH 00/10] um: remove vDSO passthrough on 32bit x86 Thomas Weißschuh
2025-10-28  9:15 ` [PATCH 01/10] um: Split out default elf_aux_platform Thomas Weißschuh
2025-10-28  9:15 ` [PATCH 02/10] x86/um: Move ELF_PLATFORM fallback to x86-specific code Thomas Weißschuh
2025-10-28  9:15 ` [PATCH 03/10] um: Split out default elf_aux_hwcap Thomas Weißschuh
2025-10-28  9:15 ` [PATCH 04/10] x86/um: Do not inherit vDSO from host Thomas Weißschuh
2025-10-28  9:15 ` [PATCH 05/10] x86/um: Drop gate area handling Thomas Weißschuh
2025-10-28  9:15 ` [PATCH 06/10] um: Remove fixaddr_user_init() Thomas Weißschuh
2025-10-28  9:15 ` Thomas Weißschuh [this message]
2025-10-28  9:15 ` [PATCH 08/10] um: Remove __access_ok_vsyscall() Thomas Weißschuh
2025-10-28  9:15 ` [PATCH 09/10] x86/um: Remove FIXADDR_USER_START and FIXADDR_USE_END Thomas Weißschuh
2025-10-28  9:15 ` [PATCH 10/10] um: Always set up AT_HWCAP and AT_PLATFORM Thomas Weißschuh

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=20251028-uml-remove-32bit-pseudo-vdso-v1-7-e930063eff5f@weissschuh.net \
    --to=linux@weissschuh.net \
    --cc=anton.ivanov@cambridgegreys.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=johannes@sipsolutions.net \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-um@lists.infradead.org \
    --cc=mingo@redhat.com \
    --cc=richard@nod.at \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox