All of lore.kernel.org
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Ard Biesheuvel <ardb@kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
	Vincenzo Frascino <vincenzo.frascino@arm.com>,
	Will Deacon <will@kernel.org>,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/2] arm64: Further fixes to the linear address checking
Date: Mon,  1 Feb 2021 19:06:32 +0000	[thread overview]
Message-ID: <20210201190634.22942-1-catalin.marinas@arm.com> (raw)

There some history to virt_addr_valid() that goes back to 5.4. It seems
to have been ok prior to this kernel, however, the VA reshuffling in
commit 14c127c957c1 ("arm64: mm: Flip kernel VA space") broke it. The
subsequent fix 68dd8ef32162 ("arm64: memory: Fix virt_addr_valid() using
__is_lm_address()") partially addressed it but it left virt_addr_valid()
returning true for user addresses (or NULL).

The recent commit 519ea6f1c82f ("arm64: Fix kernel address detection of
__is_lm_address()") fixed the NULL checking but broke the
virt_addr_valid() macro for tagged addresses.

The first patch attempts to fix virt_addr_valid() macro for tagged
addresses. The second patch replaces the bitwise operations with a
subtract. The resulting image is slightly smaller.

Catalin Marinas (2):
  arm64: Do not pass tagged addresses to __is_lm_address()
  arm64: Use simpler arithmetics for the linear map macros

 arch/arm64/include/asm/memory.h | 6 +++---
 arch/arm64/mm/physaddr.c        | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2021-02-01 19:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-01 19:06 Catalin Marinas [this message]
2021-02-01 19:06 ` [PATCH 1/2] arm64: Do not pass tagged addresses to __is_lm_address() Catalin Marinas
2021-02-01 19:06   ` Catalin Marinas
2021-02-01 19:06 ` [PATCH 2/2] arm64: Use simpler arithmetics for the linear map macros Catalin Marinas
2021-02-01 23:05   ` Ard Biesheuvel
2021-02-01 23:17     ` Linus Torvalds
2021-02-02 11:36     ` Catalin Marinas
2021-02-02 11:40       ` Ard Biesheuvel
2021-02-01 19:33 ` [PATCH 0/2] arm64: Further fixes to the linear address checking Linus Torvalds
2021-02-02 17:46 ` Catalin Marinas

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=20210201190634.22942-1-catalin.marinas@arm.com \
    --to=catalin.marinas@arm.com \
    --cc=ardb@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=torvalds@linux-foundation.org \
    --cc=vincenzo.frascino@arm.com \
    --cc=will@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 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.