From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-10628.protonmail.ch (mail-10628.protonmail.ch [79.135.106.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F15DF2F39B8 for ; Sat, 17 Jan 2026 06:53:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=79.135.106.28 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768632803; cv=none; b=QU7WwNoXROhshzKXemhZxUFIk2zjN0nKkno6263vE9rkjJvOthMb9ZdIJrgzuNhXrZJjsbT3VeR/5Kqq2uJnRTbGTizAH1SoJNoPV8U2W+Bq+E2+PrSltUtBbP+MAIY7/MFtXp2a7bdwhwFdOBwj8lJ3jud6c6SWJUkpG16lfog= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768632803; c=relaxed/simple; bh=I5IGEKhyxibdXybXTHx5FGXiCKmBMRc8/eXZjDLA1nQ=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Vi91NsBFGsYj6Wf7TRZqcZvVWAkWIqqvw1ClmeoZ073zg6UaYUDX5izUgKD2hQmwAGihdRGvjn6RUIW+tDkBSc3V9PZiC2MxSN02xu8nLVAlGTebCSTPYy8SmaCio7vO4lLoSX7UDh9O4El3PzCiVUxCNpduXl0h2YggzdEXTyk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=pm.me; spf=pass smtp.mailfrom=pm.me; dkim=pass (2048-bit key) header.d=pm.me header.i=@pm.me header.b=YZZgSyZ/; arc=none smtp.client-ip=79.135.106.28 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=pm.me Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pm.me Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pm.me header.i=@pm.me header.b="YZZgSyZ/" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail3; t=1768632798; x=1768891998; bh=mY1/L4vLjuKGDVBMdRgRIO1ljS4pAfye7RfXByDjAz4=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=YZZgSyZ/V8qaiWNq6r9ExFXobkwTuo/XDZEYnuBeVIGcW0FuvP8Bl53evH0LC0P9/ f8Yk660bTP2QRumACMtdPun2sFSRePXWT3Y8OOyJ7kPkdTk3vZRp71OJ1keUi2kwQY gklEyWVI1l+A0miBsRg/GFIE0/Sj8T5h3QZxsiSJjuWh/vHksv0QeE0bjmbFNywBy7 czNXyNHTlECxW1rjgwC7BPs8yKgANOsCdtxTPCbfuDWX4qqSSBAR8/eglBWMSu26Q9 q/sTNWsC6zB+cSvRwBEhZg365qrX8R5wEArTogZ95y0nCg7wHzF5MwgBpdt6ELhvn9 H2Rsccf1Ott4w== Date: Sat, 17 Jan 2026 06:53:12 +0000 To: Andrey Konovalov From: =?utf-8?Q?Maciej_Wiecz=C3=B3r-Retman?= Cc: Maciej Wieczor-Retman , Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Vincenzo Frascino , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Andrew Morton , kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v8 13/14] x86/kasan: Logical bit shift for kasan_mem_to_shadow Message-ID: In-Reply-To: References: Feedback-ID: 164464600:user:proton X-Pm-Message-ID: 031d99193aadb68b322ecc1084a22287a39ff89a Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2026-01-17 at 02:21:31 +0100, Andrey Konovalov wrote: >On Thu, Jan 15, 2026 at 5:43=E2=80=AFPM Maciej Wieczor-Retman > wrote: >> >> x86 was easy to do because the kasan_mem_to_shadow() was already in the >> asm/kasan.h. arm64 took a bit more changes since I had to write the >> arch_kasan_non_canonical_hook in a separate file that would import the >> linux/kasan.h header in order to use kasan_mem_to_shadow(). Anyway below= are the >> relevant bits from the patch - does that look okay? Or would you prefer = some >> different names/placements? > >One comment below, otherwise looks fine to me, thanks! > ... >> diff --git a/include/linux/kasan.h b/include/linux/kasan.h >> index 9c6ac4b62eb9..146eecae4e9c 100644 >> --- a/include/linux/kasan.h >> +++ b/include/linux/kasan.h >> ... >> @@ -403,6 +409,13 @@ static __always_inline bool kasan_check_byte(const = void *addr) >> return true; >> } >> >> +#ifndef arch_kasan_non_canonical_hook >> +static inline bool arch_kasan_non_canonical_hook(unsigned long addr) >> +{ >> + return false; >> +} >> +#endif > >Let's put this next to kasan_non_canonical_hook declaration. > Sure, will do! Thank :) --=20 Kind regards Maciej Wiecz=C3=B3r-Retman