From nobody Fri Sep 25 14:31:03 2026 Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A5ED43B14A5 for ; Fri, 11 Sep 2026 07:04:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.197 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789110266; cv=none; b=ZbPhCJcJXOSoF+bQj1TkMkmwpHY3AGbXE5OGrjDeGyr/Og9KUe0qwGZJ45wteoStyY/18u6ysesS1gZQkq0/kXcM9RBhP1kKBcnYrjiuNr5pjthe/nWww/VdIgPOLcCF0JChULPMZL9LncKmDT90BgVSHICknOHWgZOUV/AbvJQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789110266; c=relaxed/simple; bh=fm/g9CJFQX8QW6SK6YilLm0SHEquTeI6Hq80kwbEfwI=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=CWvIRaj46ovkenLp/5OahizJDMli9idHyGYJgG7PtLow2oiQbs0Ktextvmvj77nMdHxFn90WcMEZaW2xJnIhAAuY98hvqY6dIM2LPOr7zI6GkkuPn1tYYQBox2tb2PGYNebpD6XoRMdRiJiTnr+gEME5DOMqbQ3L2LrKOAzrr7I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--morbo.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=QwJmB1pj; arc=none smtp.client-ip=209.85.210.197 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--morbo.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="QwJmB1pj" Received: by mail-pf1-f197.google.com with SMTP id d2e1a72fcca58-869c40637faso628096b3a.0 for ; Fri, 11 Sep 2026 00:04:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1789110252; x=1789715052; darn=vger.kernel.org; h=content-transfer-encoding:content-type:cc:to:from:subject :message-id:references:mime-version:in-reply-to:date:from:to:cc :subject:date:message-id:reply-to:content-type; bh=q15pDPXWwHD21xyeCsqnIN6CD+fe6kHmFEwudOZDaaw=; b=QwJmB1pjHFhKmGll/90ssgmI9fYS46XiFoPPGYFLPwuOvXakG0LZu/Ohy0g32jwfbs RSyodyv8LJt5wjQMHeV0jPJ92ihRvwCILsxaepqrZRsmS14hmJPqMNQ/iWssAPTHCoe6 KGgUy2itEO8h8RBr1wfjs+YaITXUXDzX7NDq1zObsSjI1xRfsLOXflcxMQ/mlmE7NatK NU7ohyGNdEVVNz041N/EOpmBzVyzlftIsIFAjepMoCqWEjOR7DskVIWW37pzbGje68Cu 8MBlMibpjbLlVR6EfN/6M/b9yrpwtf5Flml4MFr4D3ShlWhZhynPrF0F9k7tfQ1FpGRj Qb0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1789110252; x=1789715052; h=content-transfer-encoding:content-type:cc:to:from:subject :message-id:references:mime-version:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=q15pDPXWwHD21xyeCsqnIN6CD+fe6kHmFEwudOZDaaw=; b=c2awBGtFtvxzb63HdFkiksIWRFWAHWOeJiFz9ggkfsguVkNXn3sPzKGNLwTt6wIccR nQ2p7QNGBq+KcZaXck4690Q5gGk72E0ir+x9QCSJjFZaAsk2Ea/R6Lr5Ay+OOGcJBWJb RWvd/xKUP7+i037nG9WcmpXgJraj1W5vhgfHNeXVL1xPsZnSSxOBQNQDvTOrg9Vpk//w dPPn1YWB+IL91qZZKcFlhKcpP4LWw2HtUAdC1aZNlC+TVsHK8ItiQZPspEvklwAQGTKi 1mlXC3mrgjX+evke6S4Ud68GbENunXwLXQDWDEc0bxrAGZiby2VjNVz+5I36msQqVsPw v1ZQ== X-Gm-Message-State: AFuF++nMrNxnHimMiVdjZheUgnWfiC/A7W7JromnMK6xayG/87zokgnL 2HriyY1RGN1R8GdPZ1zXorARSh13E7ZZ1KEiTDGNm+8lauk3tEQmXqhSoKmfdlai+WJ1Iil6VGs Vc1QuVIZZ6R5goA55avVFT25oSC6PtKolcPs9FmjwnlMf5QGsbe7AZJImZ2KJRxO2NxhkebU9x9 lV/pujwpdKIGcPyVmSadIjBzqVkGM8qBZW8W9nXg== X-Received: from pgbbx40.prod.google.com ([2002:a05:6a02:528:b0:cc4:aa48:7b7e]) (user=morbo job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a20:1611:b0:3d7:eb3e:1c58 with SMTP id adf61e73a8af0-3daed1c1684mr5671856637.8.1789110251982; Fri, 11 Sep 2026 00:04:11 -0700 (PDT) Date: Fri, 11 Sep 2026 07:03:39 +0000 In-Reply-To: <20260911070346.801948-1-morbo@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260911070346.801948-1-morbo@google.com> X-Mailer: git-send-email 2.55.0.1032.g73a4cd73de-goog Message-ID: <20260911070346.801948-2-morbo@google.com> Subject: [PATCH 1/7] kasan: Add .kunitconfig for KUnit tests From: Bill Wendling To: linux-kernel@vger.kernel.org Cc: Bill Wendling , Andrey Ryabinin , Alexander Potapenko , Andrey Konovalov , Dmitry Vyukov , Vincenzo Frascino , Andrew Morton , "=?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?=" , "=?UTF-8?q?G=C3=BCnther=20Noack?=" , kasan-dev@googlegroups.com, linux-mm@kvack.org, linux-security-module@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add a .kunitconfig file for the KASAN test suite so that it can easily be run via kunit.py: ./tools/testing/kunit/kunit.py run --arch=3Dx86_64 --kunitconfig mm/kas= an CONFIG_KASAN_KUNIT_TEST depends on TRACEPOINTS, which is an invisible Kconfig symbol without a prompt. CONFIG_FTRACE alone only unlocks the tracer submenu and does not select TRACEPOINTS by itself, so also enable CONFIG_SCHED_TRACER=3Dy, which selects GENERIC_TRACER -> TRACING -> TRACEPOINTS. This follows the same pattern used by security/landlock/.kunitconfig. Verified with: make KCONFIG_ALLCONFIG=3Dmm/kasan/.kunitconfig allnoconfig that CONFIG_TRACEPOINTS=3Dy and CONFIG_KASAN_KUNIT_TEST=3Dy both resolve. In addition, set CONFIG_LOG_BUF_SHIFT=3D20 to prevent printk buffer overflows on serial consoles when running under QEMU, as KASAN generates extensive reports across its test cases. Assisted-by: Claude:claude-sonnet-5 Signed-off-by: Bill Wendling --- Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Dmitry Vyukov Cc: Vincenzo Frascino Cc: Andrew Morton Cc: "Micka=C3=ABl Sala=C3=BCn" Cc: "G=C3=BCnther Noack" Cc: linux-kernel@vger.kernel.org Cc: kasan-dev@googlegroups.com Cc: linux-mm@kvack.org Cc: linux-security-module@vger.kernel.org --- mm/kasan/.kunitconfig | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 mm/kasan/.kunitconfig diff --git a/mm/kasan/.kunitconfig b/mm/kasan/.kunitconfig new file mode 100644 index 000000000000..58a7448fa352 --- /dev/null +++ b/mm/kasan/.kunitconfig @@ -0,0 +1,15 @@ +CONFIG_KUNIT=3Dy +CONFIG_KASAN=3Dy +CONFIG_KASAN_KUNIT_TEST=3Dy + +# Additional dependencies. +# CONFIG_KASAN_KUNIT_TEST depends on TRACEPOINTS, an invisible Kconfig +# symbol with no prompt. CONFIG_FTRACE alone only unlocks the tracer +# submenu; CONFIG_SCHED_TRACER is needed to actually select +# GENERIC_TRACER -> TRACING -> TRACEPOINTS. +CONFIG_FTRACE=3Dy +CONFIG_SCHED_TRACER=3Dy + +# Prevent printk buffer overflows on serial consoles when running under +# QEMU, since KASAN generates extensive reports across its test cases. +CONFIG_LOG_BUF_SHIFT=3D20 --=20 2.47.3 From nobody Fri Sep 25 14:31:03 2026 Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E38C93F485E for ; Fri, 11 Sep 2026 07:04:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.199 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789110263; cv=none; b=c8vxtOpVAUuMrBMEL8rFnvnFIZ/2ApFChvPoTPoOhGrJ2JYf1s9qMcpfG5iyJkI/SO2K1272sb4EqQ4JfchcRUcqQ+4E9GwaSIY6A+FhBjo6VMffAGZXlSlFv0Hp0UG1XOIPhgZg9TJbdpzdoX3o7jUP44cp1bnopgJQWU1CGPc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789110263; c=relaxed/simple; bh=R3mamHcjqtuk8KE+ymGSXTr7kdrGSGWqP7eBuJzhREA=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=Fjw6UI0L3Rst+gAaIN5EJN4sKca5UCXvjbmSiwLUp/a2vmky70kqd3FRliII+IFwGohk/faU6SgS0LkiQMIRH45hZGHSGiE3nHTPd75ADc7ZahZmUE2IXNAVyAp/PK/ky09QEdYyuwb7BLS+buLDDTqrVBu0leh8BYkGBSawT1M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--morbo.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=hSAKQ/S2; arc=none smtp.client-ip=209.85.214.199 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--morbo.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="hSAKQ/S2" Received: by mail-pl1-f199.google.com with SMTP id d9443c01a7336-2cec4226c70so7973065ad.1 for ; Fri, 11 Sep 2026 00:04:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1789110253; x=1789715053; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=v4log2b7lXSyNC0NL5JxC6rtxmWq5NdYaV3uhGWFgpQ=; b=hSAKQ/S2mhCvMF2YYH3xWnDEBCvTgwRmu+c2IkdWvo2Cn1xKPrMPO8Fch9nBooG+jN Yo5nINC9akFagDai8BWJTafV2gQVFKk6A1TSVCbANNaV8XwLvB0QZ2k0D7eI80Oo2F8y U/EBYpJmBTwIVT6ABFKNwnCAmoeAMp62vtA2Rs401YCydnmJBvaD6wXqRFwUjyvMsMQu YNyfDri9jdmoWJ7kt1b6uaUE5En/vyVZu1tr6lCrL9Sc0y8GpSE90kpa18sHd20S+Isc P62GONAd/6oeUUtNwxqUvYNGmmnKGpB89oPpGsDBveTHTev4tAPijB7xGLbnPx+nOAxO FoUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1789110253; x=1789715053; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=v4log2b7lXSyNC0NL5JxC6rtxmWq5NdYaV3uhGWFgpQ=; b=OccT3VKvM8hVF/JLdkYiOCKWRlCBtDA5C9bGRftmaUUBVMwcZMcFgdygy7esnP7zlV cFLqx6X/6nAoyG1eIrPvAa11jHDkulURHt+tEP5Ye6eZis86I8/OVHIKF2rXiz2vgMLw aFOqaktphARsO1GHNymMeGQEq6qshGR9MgMf2h2EM1mYbl37fu+aW1uvRTLAs36T9Dk/ bPe0qbWL/+RBUKh1ZBOHj08lkHn5TRW9lVH7+7sDTBza4QvIYUBdTUaPDchrdjqlhTuu EMddzfETzmeFgh9501PPKuNXi+TJDJJDfrsivpK0tvp5zk0yiauN+oxyPtTc3S2sKylz cTNA== X-Gm-Message-State: AFuF++lZ2ODsUSAYSD7ALRi7I8kzXidAsOA23F1Soyw5pAEXmzKAvpEX dGLWo4aM9//MJIHFPHOK+nVWWJ31GbCw2vP1K8wMh6AAijEYKdPSfzNk4j7cccUZSJqYniUw5Kh S+s7YAFkGhsS4hDQnqHNEBnfUei42GgCENZAmSYG1yZMB3OU0fUuqrnAdgOj69VYRhodjmNZg1y GZZPReJWthWVCO03iKmS6aO94fHtDTD7Ia2yMZgA== X-Received: from plbmm11.prod.google.com ([2002:a17:903:a0b:b0:2db:34ec:27e6]) (user=morbo job=prod-delivery.src-stubby-dispatcher) by 2002:a17:903:2983:b0:2db:257c:9fd5 with SMTP id d9443c01a7336-2dd2a35dd2bmr69446655ad.16.1789110252766; Fri, 11 Sep 2026 00:04:12 -0700 (PDT) Date: Fri, 11 Sep 2026 07:03:40 +0000 In-Reply-To: <20260911070346.801948-1-morbo@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260911070346.801948-1-morbo@google.com> X-Mailer: git-send-email 2.55.0.1032.g73a4cd73de-goog Message-ID: <20260911070346.801948-3-morbo@google.com> Subject: [PATCH 2/7] x86/word-at-a-time: Instrument load_unaligned_zeropad() From: Bill Wendling To: linux-kernel@vger.kernel.org Cc: Bill Wendling , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Arnd Bergmann , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Kees Cook , Catalin Marinas , Peter Collingbourne , linux-arch@vger.kernel.org, linux-riscv@lists.infradead.org, x86@kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" load_unaligned_zeropad() is implemented as inline asm plus an exception table entry on every architecture, so the compiler never sees the actual memory access and cannot emit KASAN/KCSAN instrumentation for it. Resurrect the instrumentation that was lost when migrating from read_word_at_a_time() by renaming load_unaligned_zeropad() to arch_load_unaligned_zeropad() and adding a common instrumented load_unaligned_zeropad() in the new asm-generic/word-at-a-time-instrumented.h, pulled in from the bottom of asm/word-at-a-time.h. This mirrors the existing arch_atomic_*()/atomic_*() split in linux/atomic/atomic-instrumented.h, where the arch_* version is the raw, uninstrumented primitive and the plain name is the instrumented one everyone should call. The wrapper is __always_inline, so it compiles down to exactly the same inline asm as before plus instrument_read() -- confirmed via objdump that no calls or relocations to load_unaligned_zeropad(), instrument_read(), or the KASAN/KCSAN check functions remain when KASAN and KCSAN are both disabled. Convert x86 to the new split here. Follow-up patches convert the remaining architectures (arm64, arm, riscv, s390, powerpc) that implement load_unaligned_zeropad(). Fixes: d94c12bd97d5 ("string: Add load_unaligned_zeropad() code path to siz= ed_strscpy()") Assisted-by: Claude:claude-sonnet-5 Signed-off-by: Bill Wendling --- Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: "H. Peter Anvin" Cc: Arnd Bergmann Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Albert Ou Cc: Alexandre Ghiti Cc: Kees Cook Cc: Catalin Marinas Cc: Peter Collingbourne Cc: linux-kernel@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-riscv@lists.infradead.org Cc: x86@kernel.org --- arch/x86/include/asm/word-at-a-time.h | 4 ++- .../asm-generic/word-at-a-time-instrumented.h | 25 +++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 include/asm-generic/word-at-a-time-instrumented.h diff --git a/arch/x86/include/asm/word-at-a-time.h b/arch/x86/include/asm/w= ord-at-a-time.h index 422a47746657..483d27dc96b2 100644 --- a/arch/x86/include/asm/word-at-a-time.h +++ b/arch/x86/include/asm/word-at-a-time.h @@ -67,7 +67,7 @@ static inline unsigned long find_zero(unsigned long mask) * and the next page not being mapped, take the exception and * return zeroes in the non-existing part. */ -static inline unsigned long load_unaligned_zeropad(const void *addr) +static inline unsigned long arch_load_unaligned_zeropad(const void *addr) { unsigned long ret; =20 @@ -81,4 +81,6 @@ static inline unsigned long load_unaligned_zeropad(const = void *addr) return ret; } =20 +#include + #endif /* _ASM_WORD_AT_A_TIME_H */ diff --git a/include/asm-generic/word-at-a-time-instrumented.h b/include/as= m-generic/word-at-a-time-instrumented.h new file mode 100644 index 000000000000..8a66d53bf538 --- /dev/null +++ b/include/asm-generic/word-at-a-time-instrumented.h @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _ASM_GENERIC_WORD_AT_A_TIME_INSTRUMENTED_H +#define _ASM_GENERIC_WORD_AT_A_TIME_INSTRUMENTED_H + +#include + +/* + * Each arch's asm/word-at-a-time.h defines arch_load_unaligned_zeropad() + * as inline asm plus an exception table entry, so the compiler never sees + * the actual memory access and cannot emit KASAN/KCSAN instrumentation + * for it. Provide the common, instrumented load_unaligned_zeropad() that + * every caller uses by wrapping the arch version with instrument_read(). + * + * This is marked __always_inline, and arch_load_unaligned_zeropad() is + * itself a tiny inline-asm-only function, so this compiles down to the + * same inline asm as before plus instrument_read() (which itself compiles + * to nothing when KASAN and KCSAN are both disabled) -- no actual call. + */ +static __always_inline unsigned long load_unaligned_zeropad(const void *ad= dr) +{ + instrument_read(addr, 1); + return arch_load_unaligned_zeropad(addr); +} + +#endif /* _ASM_GENERIC_WORD_AT_A_TIME_INSTRUMENTED_H */ --=20 2.47.3 From nobody Fri Sep 25 14:31:03 2026 Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B21AE43801F for ; Fri, 11 Sep 2026 07:04:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.69 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789110280; cv=none; b=jx/ioI6MbTahT0Ex0CqN1yhFldSYYvWL4K9KXqHpk4mqED7uIudEIqNO0ygO0My/4ojd0EDCVhBqm27DCUI2VypcATQucWPn6aHM0weeWKwMUwq17rRp8crD7257JQ3w6SpEd3e6TeyzxjRsKz7IGzRBwr+/yV3XtSWd/2uj0iU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789110280; c=relaxed/simple; bh=UhHCzY+Me2VDM6hFXb7auBwPsFdj7mYwT1iwN4Svzqs=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=pJnyx4zBrie5qJEusSLEyExjlbbQ3y2bAwNFrmxTlA0xBgCuHcRgwNi+CZYe/GB/qa3d0OPYsY5csUK2RhDBhni7O4Vwj9TUZxh2wd09NzI92xCZC+Wn10s6tk/k/pE1HJFa++KqCS0FK71KBzHMA5jxCKUst2tUVUqltq02o04= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--morbo.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=U5NBQFBO; arc=none smtp.client-ip=209.85.216.69 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--morbo.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="U5NBQFBO" Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-3968bb86fb7so796634a91.2 for ; Fri, 11 Sep 2026 00:04:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1789110269; x=1789715069; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=FCU2xeiF06KkVqtcXVSq5dyJUCYMUIv/B5XyYuirb0Q=; b=U5NBQFBOXexk3KfylHWmi8+dqvidnBYBiR4r1q5DzkV/MJCCsBD8w4QYaAg/Mxa/CD 4l4mUQgBbr/C3rnt7LiNft0TAfEKDodlAFecEOl1FU0Qu5cf+LIS/+Fu9e4RmBIfkJIx TuHqH0IL9kz+oGUQG+QNG6WxO/e8qPgQeoqyUFxNbsjX9a0zJiaI689NBLJH2gSaA8bF 6k2hY2bw3PJWfBv+Gx0doEb5OX8+S7okyjEL+/uInV94k74nEA4N0k2Qd0XF/l2SDWwB NAlgAN6WBt6T0l4PO54xpc3p6ULqtaxY1iKOTe1OA8z688P4TXBF/bQVKzhPbnR7cRz9 xi3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1789110269; x=1789715069; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=FCU2xeiF06KkVqtcXVSq5dyJUCYMUIv/B5XyYuirb0Q=; b=NKzoW02LUSVyyf7/CjZgsRErDWBw5id6ICMnfZkYmwdN4/xVPVbXhTdTxOUDJiM0cE v9AD92mTHcnZniEEmprF4WjVyDUrbbBMI0jemcr/r7I4GtNlgd9KGXdsdKgLPhTCsewC ZksYz5kRyqqJlGab6Zlgt3QJI+f8QMVNmbZyzicgAweQq8cVadRQqzNHpoiSe5zpcaEv V11aw8vqZj3i4eh09BLU8g2f+nW8n4WLMW/XNzb6ycocNNMwuGhLftJHlBlYGwb5bV5i 3QiB0YEcTnmdYOar17uaaNaWePQYpNl6SCfVTCN6zcHLDMJKVacJU0f3+jnpJfUSgqQs FJiQ== X-Gm-Message-State: AFuF++kSwcUD8HO46uWnpt0TDJYn0pa8o6CQ3vl8v5HdEkFpUM1gbWKo CjFOilVEnD3UkkssbFzZJmiH8oKQORwUhwMTJesUL9palolpKJ5WQ/ULixBVpcMdelcQH7AwrLv Uh1+EkFuxkCXM5rIMrqPtXUv23JiyVKbCskEW28vQgES5/R9n+zgZA9NfE3xTp3k6h1+52G1stJ FKMegO4QB+wY3SAxHGhyotpM5ZnlMm4OunS6E1jg== X-Received: from plbkc7.prod.google.com ([2002:a17:903:33c7:b0:2dd:630:cea4]) (user=morbo job=prod-delivery.src-stubby-dispatcher) by 2002:a17:903:1448:b0:2dd:3d1a:6958 with SMTP id d9443c01a7336-2dd3d1a6b2fmr2624175ad.6.1789110268515; Fri, 11 Sep 2026 00:04:28 -0700 (PDT) Date: Fri, 11 Sep 2026 07:03:41 +0000 In-Reply-To: <20260911070346.801948-1-morbo@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260911070346.801948-1-morbo@google.com> X-Mailer: git-send-email 2.55.0.1032.g73a4cd73de-goog Message-ID: <20260911070346.801948-4-morbo@google.com> Subject: [PATCH 3/7] arm64/word-at-a-time: Instrument load_unaligned_zeropad() From: Bill Wendling To: linux-kernel@vger.kernel.org Cc: Bill Wendling , Catalin Marinas , Will Deacon , Mark Rutland , linux-arm-kernel@lists.infradead.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Convert arm64 to the arch_load_unaligned_zeropad() / load_unaligned_zeropad() split introduced for x86 in the previous patch, so KASAN/KCSAN also see reads through load_unaligned_zeropad() on this architecture (e.g. under CONFIG_KASAN_SW_TAGS). Assisted-by: Claude:claude-sonnet-5 Signed-off-by: Bill Wendling --- Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- arch/arm64/include/asm/word-at-a-time.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/word-at-a-time.h b/arch/arm64/include/a= sm/word-at-a-time.h index 824ca6987a51..656e3274ed7a 100644 --- a/arch/arm64/include/asm/word-at-a-time.h +++ b/arch/arm64/include/asm/word-at-a-time.h @@ -47,7 +47,7 @@ static inline unsigned long zero_bytemask(unsigned long b= its) * and the next page not being mapped, take the exception and * return zeroes in the non-existing part. */ -static inline unsigned long load_unaligned_zeropad(const void *addr) +static inline unsigned long arch_load_unaligned_zeropad(const void *addr) { unsigned long ret; =20 @@ -66,4 +66,6 @@ static inline unsigned long load_unaligned_zeropad(const = void *addr) return ret; } =20 +#include + #endif /* __ASM_WORD_AT_A_TIME_H */ --=20 2.47.3 From nobody Fri Sep 25 14:31:03 2026 Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0244436EAA4 for ; Fri, 11 Sep 2026 07:04:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.197 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789110283; cv=none; b=HMmH3cTcwpslqlkIbJdI3ffDEZqt4fuljonhWrYR92wtjp6VouQkwCfD+Seh7YuimhfKYCmyVxrW0FOiuszOx/QjiRXyjh0lASQegOvhBffO9TW4Q2dyfH+XlPvIClaGj3+BkRLykI6jKFh7pt0ccWIWHN0L3U8LPG/XxRWgCaU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789110283; c=relaxed/simple; bh=oOrrt/5TTs6oyKIOw4u3tTYoWTVlG9WJDu4znEAehhs=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=WQohx4ROVdhqizwUUghcwgDux1RsI2yjAHQZoKZ+WhvFt4H6AaA25G2lByZEaesNY30UyLv2AKuPG7pDCaHb76VIyUiCnW7yK2/RKxVdaIOA3r4v4zxnHXa+r3oIXpyo7Q9T3jO2OKz5G5XQFRAfMnSGquPy6Mb41RuppsF6kI4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--morbo.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=B8ncdw+P; arc=none smtp.client-ip=209.85.214.197 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--morbo.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="B8ncdw+P" Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-2d001671a54so10914225ad.2 for ; Fri, 11 Sep 2026 00:04:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1789110272; x=1789715072; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=SWba0MXKPePT9+pbYbVkPTqSSVKwgxdR9mpJ5XY3bKM=; b=B8ncdw+PHYpoyRpNfyHUSyb3UebcH+h9pCE6GKx2aGh+HN+kjdLN8Z20K3biP4j4Go fPBHMLXzqfQSkV+eK63Bc0WzMdPcOzxOUUK2/WJmNFzrqdYGeBBHu2ahJgxITyH9PTX9 jmMCytgDtS0COvvFXjvMzYiBxkS9tlJeyzJrtAm2pi2IhbuInQmg49FaPVDPmXI1SMTR BbSmvxS7vh3vbjmJE79l9yJhiDHr940rN5hnhCC0j90CrXw4+orPj/HBYvPcbemBPUA1 Xzw5a5DWHmOo9MyOv1uEOA58aEWTf3eo/NxZ0WkkrZh2zZc8Z7EWx2q4FUoA2KlsudY9 /xBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1789110272; x=1789715072; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=SWba0MXKPePT9+pbYbVkPTqSSVKwgxdR9mpJ5XY3bKM=; b=lwwsYsCBz1sVqDID8aT4dgxt4kOw1MFe4xC/eF/1ta7b6qEuu9xvZZ/3clkQNeqLZP e2hXEKKXA/QBz4+bC+HPeIcPQ/wWkadUAiNCqDFEiR29i1LbDzp1y8PXZPvFsqYbKH6Z hBt4ZlhbiJ7PtchlEVgnTdUDoMCQk2Ix0TXUkt/4qp/YS9UVnp7Ooust1J2W+WuoZjbZ /7xHWzK4g3fQrTZhFDl2JjpwH4b2FEP1qmlWDQkIC2gKf5prjo2NhGUnlSHH60CwKIPF +IgGe4tW/kH9HBiSTwyc4k7iLzqxl8cE2Rda0olCCqZdWAFGriry434BoBOWoJz1IBRg /Q9A== X-Gm-Message-State: AFuF++n9i2Bwi8TTvi2x+0V5MctgqZiU29G71tj4fkMzt1vyeuPX9J6X uhfifxR99JPRq4J6UIBo77W2avHLyB9S7bK23FhQMNdi6L23aDpjrDRYysgnROj/uNkKxBDt4zb VIn2310hqtJYqtJWb0h847mvwRFq4/zwqVnEkRAtLnwLFvE3jrmpNhJlDV+gd8nyvM9tIRHHl0M 0aYC/xpo7wFHMhy0PJ02Kb+3sZciuFrlCO3yIJTQ== X-Received: from plbkq15.prod.google.com ([2002:a17:903:284f:b0:2dd:1c44:fe2]) (user=morbo job=prod-delivery.src-stubby-dispatcher) by 2002:a17:902:f605:b0:2d9:464f:d45f with SMTP id d9443c01a7336-2dd2a1c4541mr62202195ad.5.1789110271979; Fri, 11 Sep 2026 00:04:31 -0700 (PDT) Date: Fri, 11 Sep 2026 07:03:42 +0000 In-Reply-To: <20260911070346.801948-1-morbo@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260911070346.801948-1-morbo@google.com> X-Mailer: git-send-email 2.55.0.1032.g73a4cd73de-goog Message-ID: <20260911070346.801948-5-morbo@google.com> Subject: [PATCH 4/7] arm/word-at-a-time: Instrument load_unaligned_zeropad() From: Bill Wendling To: linux-kernel@vger.kernel.org Cc: Bill Wendling , Russell King , "Russell King (Oracle)" , Liyuan Pang , Xie Yuanbin , linux-arm-kernel@lists.infradead.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Convert arm to the arch_load_unaligned_zeropad() / load_unaligned_zeropad() split introduced for x86 earlier in this series, so KASAN/KCSAN also see reads through load_unaligned_zeropad() on this architecture. Assisted-by: Claude:claude-sonnet-5 Signed-off-by: Bill Wendling --- Cc: Russell King Cc: "Russell King (Oracle)" Cc: Liyuan Pang Cc: Xie Yuanbin Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- arch/arm/include/asm/word-at-a-time.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/include/asm/word-at-a-time.h b/arch/arm/include/asm/w= ord-at-a-time.h index 5023f98d8293..ef0002d16dc1 100644 --- a/arch/arm/include/asm/word-at-a-time.h +++ b/arch/arm/include/asm/word-at-a-time.h @@ -65,7 +65,7 @@ static inline unsigned long find_zero(unsigned long mask) * and the next page not being mapped, take the exception and * return zeroes in the non-existing part. */ -static inline unsigned long load_unaligned_zeropad(const void *addr) +static inline unsigned long arch_load_unaligned_zeropad(const void *addr) { unsigned long ret, tmp; =20 @@ -96,5 +96,7 @@ static inline unsigned long load_unaligned_zeropad(const = void *addr) return ret; } =20 +#include + #endif /* DCACHE_WORD_ACCESS */ #endif /* __ASM_ARM_WORD_AT_A_TIME_H */ --=20 2.47.3 From nobody Fri Sep 25 14:31:03 2026 Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6D45D448CE6 for ; Fri, 11 Sep 2026 07:04:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.71 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789110298; cv=none; b=frwhxZICoU4vhRP5DLvEmeeyTbMeWq5XeXo0BehLxNO6x3RNJ0jeuf4yRB4s9oQe/xtSMykD+3k0IxImutSIGfLUEVFlUPgT0q+MzSFcZbSmtVDEshcW9n3pvyDKMouCV7/7TI7onp1rNZdH+kbKiiCaEyVSSxc6famzyPly2iA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789110298; c=relaxed/simple; bh=NWJPLpCZognzsVXmj/PrtbyOlS3EXHPUrnjM2brVRys=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=FN1r5ot8h6nYyZfTglzjMKF8K/NjZbRKg/tRFw/Zc3pK0vlEBM6CFntPuzvMv1D7nQHQuyz75JKVPImtvrFmAEEtTABW8TFm54uXeWTSnH9diDaClYb+zFbC94KhoMBpe/0bpfDcRbuPP/gOVvPR8F1AMq/T3zh0SSXpeEUltEk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--morbo.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=iCImII61; arc=none smtp.client-ip=209.85.216.71 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--morbo.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="iCImII61" Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-398dcfabbf8so1383284a91.0 for ; Fri, 11 Sep 2026 00:04:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1789110288; x=1789715088; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=2c83p3gxBI5qDHT/7+/z6hzYG3hJ3PLILSJpMJ3biiw=; b=iCImII6153OkEOiBwQVFOsA/mTdshmfLFDANy1kOsGdRGBUdyOCd3/WOhTgJ+wiwRM x+7Dm6V6jCpeV480GI3xqiAY2QMzNZ9C9lMO2thLWlw5pxNgbykW/b9zomoH1kSKHYGX aoUbuZU0qJ6CTupRpoLBWxTq3yFMSwPrMm4oaLmwu9yS6lwQntH3FwNEfmBLi9uTFgxl MBuHZ8o8C6IgqfLXEKacbrpGJvOv2oR8u7mCKO1Wv8KHg8yjJ+jtSgmCqkiRtmCJ9DnO hrgbsyIpbbkktB83mRZPbXC5Dly39rpg31gsTSqGaL9kgyar9VgXe1iv0MOz1DiWvUhw RAUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1789110288; x=1789715088; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=2c83p3gxBI5qDHT/7+/z6hzYG3hJ3PLILSJpMJ3biiw=; b=p7p0TvV0CqUoKfET8hh/cPfy3qL3DWdXL/3gGlsHcZW3RI5mKr5Sy0lvTKrlMEjBOy /G6iDJVNCkgsAdnAaotfCKxq8FxAfKyGnor7eF5uDtdxDxDVIY6dBdSahz32gQ1tGgJB byn5QZPeGAFe03o9LGgNIsAzfjPVDR/4fFjSfAUdCALwFOoT+eE6+qvH0TM4duV6GMLX OQ3k3lE4Wz738xMNeCn1GowICgrXYgVNEtenmypW1kGCbw7U9/J1moyPWvYb00yH/LQL ORUf/ym3lhw6bTBu4zBcFwlV8cuTwahMXnobliEgHsBbh/mY7Lo7TddXlaxMOLDQDMQ1 sx0w== X-Gm-Message-State: AFuF++nbSumOtsT5cknxPSVKjEbK/3GCBTln2jl1EruKWVUJdpeNKfgY 8UguYmOWTnSzdhoX7xF0wOB7C/Qbc4zYTf9xt6TJc72f8MBxECdu318s3cRCdC7DpTlX9+F3vXz F8EXVUmX/9XGgXdMGVOHCohNiqu7fW+0DJIcwnISRsBnb09y9YVFDOCCVlaxlbDjLnmedKlPwDM o977+Mf1JhTJnGTxHoa0eLJG+MhqeUDs8OmF50YQ== X-Received: from pljg1.prod.google.com ([2002:a17:902:fe01:b0:2dd:c00:e4ee]) (user=morbo job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:35d2:b0:39d:8d38:8b04 with SMTP id 98e67ed59e1d1-39d9bbea1d3mr4942848a91.1.1789110288072; Fri, 11 Sep 2026 00:04:48 -0700 (PDT) Date: Fri, 11 Sep 2026 07:03:43 +0000 In-Reply-To: <20260911070346.801948-1-morbo@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260911070346.801948-1-morbo@google.com> X-Mailer: git-send-email 2.55.0.1032.g73a4cd73de-goog Message-ID: <20260911070346.801948-6-morbo@google.com> Subject: [PATCH 5/7] riscv/word-at-a-time: Instrument load_unaligned_zeropad() From: Bill Wendling To: linux-kernel@vger.kernel.org Cc: Bill Wendling , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , linux-riscv@lists.infradead.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Convert riscv to the arch_load_unaligned_zeropad() / load_unaligned_zeropad() split introduced for x86 earlier in this series, so KASAN/KCSAN also see reads through load_unaligned_zeropad() on this architecture. Assisted-by: Claude:claude-sonnet-5 Signed-off-by: Bill Wendling --- Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Albert Ou Cc: Alexandre Ghiti Cc: linux-riscv@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- arch/riscv/include/asm/word-at-a-time.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/riscv/include/asm/word-at-a-time.h b/arch/riscv/include/a= sm/word-at-a-time.h index 3802cda71ab7..a4294b50c918 100644 --- a/arch/riscv/include/asm/word-at-a-time.h +++ b/arch/riscv/include/asm/word-at-a-time.h @@ -56,7 +56,7 @@ static inline unsigned long find_zero(unsigned long mask) * and the next page not being mapped, take the exception and * return zeroes in the non-existing part. */ -static inline unsigned long load_unaligned_zeropad(const void *addr) +static inline unsigned long arch_load_unaligned_zeropad(const void *addr) { unsigned long ret; =20 @@ -71,6 +71,8 @@ static inline unsigned long load_unaligned_zeropad(const = void *addr) return ret; } =20 +#include + #endif /* CONFIG_DCACHE_WORD_ACCESS */ =20 #endif /* _ASM_RISCV_WORD_AT_A_TIME_H */ --=20 2.47.3 From nobody Fri Sep 25 14:31:03 2026 Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C8909420465 for ; Fri, 11 Sep 2026 07:04:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.197 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789110298; cv=none; b=u83WovxDGV+/0RQvygQGo2RJABvkd029pMaaNLdtjtnrX6K66BwU1QJKhnhb58/XS3F1hhHRTVa2xlR74+J36jn9aTgEF3tgAcqZj+4hyMVHZ+pqnVlKwJMNLpknShxAtzQsDeM61VwI+4L2BoyeEe9f4yuhtz766I/0daq0bnU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789110298; c=relaxed/simple; bh=YrYfWQ8DTCejykQdQacgG2ZQYpSnZ8BFiS7ovKQqYpI=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=CiGj1AJTz/YaQbQ3Fv8kR38/H53/fINF/hpz6hU8y7JOYf6ozCzD2rEfuR3/3IBKhOrk40xOsIR67gbJzA89I2oL89VZ/Dsz2n+07Sg4XDniEmal4kYzrpSVzqPKi7A+OO9jmutSn/mFfvzhPZgzVaGC1nqrBnWlnyx9sUMXDJY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--morbo.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=pJqb3us7; arc=none smtp.client-ip=209.85.214.197 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--morbo.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="pJqb3us7" Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-2dc92350888so9987395ad.3 for ; Fri, 11 Sep 2026 00:04:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1789110289; x=1789715089; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=nUWMyzu+5vvtW+pIvov+ll8ijxwG7oGXz2aY3xXHLFA=; b=pJqb3us7r9B0qiHi7rxnIcJICyf5ifHlxrMvMdtnN0/P+o2eejxcDfBBXjfhYOKaZM 9+weL2acSO5OpUt5s6BiO8D4sqD3XwklFTlFc3xscGNePftXxSfcNcz7f6Sg8tpSEvYZ xRyqj2OId5N14smXxiShhsj5OKr28Um6tIpl5CODrJ4A7bugecuTMVIHNiDBDfSevcuJ WJnvCWGjBDhyC5zXtJQYHpJLh9mmirMKslMGKDalOFlb054P+lyXTUCrSBdZNU2b00UR MmJD+d6Tz/dn/hkcdnQ+hOmDY3uDWoK4S7oNipmwmFW02m+u1DEVU8vplQfP0A+BOl9r MpOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1789110289; x=1789715089; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=nUWMyzu+5vvtW+pIvov+ll8ijxwG7oGXz2aY3xXHLFA=; b=Hj0NfeVukmphQ5FZ1aDSq9o/sRCJdzU+x1qjV55vsyTBUpivQsBEkieQkbnhTmvBlP iQXYb+5tlAPEwLzb0K55WKeyZ6RBYZP9CBMISLi39DQr088T3W8va/FpN4+sPrFx2rhV 1dm/SFIND6+i2xE/JuD5NSlibGIlomcdokiQViksZxGyUmpuErbfSinhDZtTIQKVvSlb DLKs54lEzd6YC3idFNNRIcSNQPsDdgAvE+kCg+T1aPVyQqZlE+yE7sScqKq3nUZFzO4X Zxgng7peQnnpJLyWuh5kFsYfbWaI0uCaZFLspcSYRdNuItUpanNCNflzrYxwKI+B1lZ2 wxAg== X-Gm-Message-State: AFuF++ktxiD71Hl/DNrPv45orQxmLaBOjWzO6zBK+tAyF52bByXMb82C ZxUdi8e/VPl3FKGhK82iDEJvhmNvH7FrDjcuFxVCWpqr8nJkKrcireZ3gxeej9TvkON0AYEBJdI u2AQ8AWCnF10ipoPBpMlT7QIRzk/f8+NFju9lvfW7C4uBCKergK4qIbvfGYjpGIUfFtt8qCxpqh zBEhuECriT/juVvFXOeNPNXrQyUHNFaD+rzTKxyg== X-Received: from plhs15.prod.google.com ([2002:a17:903:320f:b0:2d7:747:8f71]) (user=morbo job=prod-delivery.src-stubby-dispatcher) by 2002:a17:902:d551:b0:2d9:4871:393d with SMTP id d9443c01a7336-2dd2a45aef6mr60678725ad.21.1789110288973; Fri, 11 Sep 2026 00:04:48 -0700 (PDT) Date: Fri, 11 Sep 2026 07:03:44 +0000 In-Reply-To: <20260911070346.801948-1-morbo@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260911070346.801948-1-morbo@google.com> X-Mailer: git-send-email 2.55.0.1032.g73a4cd73de-goog Message-ID: <20260911070346.801948-7-morbo@google.com> Subject: [PATCH 6/7] s390/word-at-a-time: Instrument load_unaligned_zeropad() From: Bill Wendling To: linux-kernel@vger.kernel.org Cc: Bill Wendling , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , linux-s390@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Convert s390 to the arch_load_unaligned_zeropad() / load_unaligned_zeropad() split introduced for x86 earlier in this series, so KASAN/KCSAN also see reads through load_unaligned_zeropad() on this architecture. Assisted-by: Claude:claude-sonnet-5 Signed-off-by: Bill Wendling --- Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Sven Schnelle Cc: linux-s390@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- arch/s390/include/asm/word-at-a-time.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/s390/include/asm/word-at-a-time.h b/arch/s390/include/asm= /word-at-a-time.h index eaa19dee7699..6a055bee5ba0 100644 --- a/arch/s390/include/asm/word-at-a-time.h +++ b/arch/s390/include/asm/word-at-a-time.h @@ -48,7 +48,7 @@ static inline unsigned long zero_bytemask(unsigned long d= ata) * and the next page not being mapped, take the exception and * return zeroes in the non-existing part. */ -static inline unsigned long load_unaligned_zeropad(const void *addr) +static inline unsigned long arch_load_unaligned_zeropad(const void *addr) { unsigned long data; =20 @@ -62,4 +62,6 @@ static inline unsigned long load_unaligned_zeropad(const = void *addr) return data; } =20 +#include + #endif /* _ASM_WORD_AT_A_TIME_H */ --=20 2.47.3 From nobody Fri Sep 25 14:31:03 2026 Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3CE8244A3E0 for ; Fri, 11 Sep 2026 07:04:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.200 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789110301; cv=none; b=cQnw4L2L/Rt8UmKgJor2FaOYr9TJGYUQmUcJGfjCiXeP29SfKlHXVBd34R8lSB0FFESVlpfKhhcP5SfOqjBLbY5f+3JwF4Vws2RobPLtvsJ28G6m04ftu8qNkPlz2dKqbyv1yvoDETgwvwEZRcLqOWz7BSsI8DhYYJQJ9CQNG+8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789110301; c=relaxed/simple; bh=GA9mRxKSUeeqsmtq3HYQxOizT5HeER4K1UAF5EDbsaw=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=UmJUsszLd46dCi0dfVsikTFDW7ZDxRrJaqMHaRn4HRH9t79Yv4txv5GnAtvb5nZB4bGcGcnvK/3avE4gERDoV+rppS+SlDxV8XHvlzDDLGQGCGPDxel1QTE3eZv5VTcxzehzwO3ZuN4xgzEu4Mh8zKB6J2dxYS19PbkP/lmiKMs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--morbo.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=tFUL/KvG; arc=none smtp.client-ip=209.85.214.200 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--morbo.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="tFUL/KvG" Received: by mail-pl1-f200.google.com with SMTP id d9443c01a7336-2cec4226c70so7981295ad.1 for ; Fri, 11 Sep 2026 00:04:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1789110290; x=1789715090; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Mupi7f/R8vSLK7yP3tvVdaLvmeD/LZPxEKzcTyfibm0=; b=tFUL/KvGijW2fmMbEFUZEglYuNuUegzpDKWU/CkItvZSq6JFn2NUsJpRmCnwUlj0ct YYeNEIr5RWGWAUuw77fJTdeVuoMtaIs5NowUYjrsIlM8SSb2y3yYpEhLCfBfxRudBHGK V+pDPb7EiqQAMB34y6/fvaV62u4u46y9d0kpeHSAGSm2Rpv2IwYs8hn9nIa+rf6sZ4mq jIOVqRRQtJWD4HtyEt0ksGw/yhs4RXANBk7ZyPwlcZAAp0Th2yzo7/5SbxWEOuZl1toA ldfRiLV4Yq87xQLw5u6Sf6zwKXX4j4gCjwwSxtEz6fWeiD1qDJhcaOt/lxNvv5CGN7h4 pAew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1789110290; x=1789715090; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Mupi7f/R8vSLK7yP3tvVdaLvmeD/LZPxEKzcTyfibm0=; b=cUyomuPfxPxudcQmPNy9eNCGEuchgX+4iH1Lhi8GNWOjweyruMt9on/ZkbrSSaQzOs AqhO3SjTyta2c7kH0oz1qlw4irEo3LuuqcJFayGATbx6mB9bAFFA5KP2IN0ovEnqQr4n jE6sBRqHSE7u4pAR/lD88FBv+FCC3+Mw4akeVFvrUlyuclSjOrpPU4xkPHFKbEF50304 1NFm2y5nYudeKL7P9IYJ7rSrMX/cuQ7d3vPnmoYjX8xQw6A6Q6nPInuMl6ubBVd+wv63 CC0yI/oVSjvsuzql6qvDq1eIom0oUrNZIgDiZKX3wAF5xGGehBEeSn+JF48rMrsFtu8I noYQ== X-Gm-Message-State: AFuF++kMTEFTHdD5iWQxY3soRHe04DCVDMQkUU3ZYUOvWDt3Ol3HWUia D9vr/8ibIk3PRv36qqxeYXwZRh/bNk3ZGK3UFIgnhEZ8qO9gj7I8jw4oAO27ak8N+LtahA/cC4C ywCVCI+JYxo7FxajfTmTalkZkVdNrBIsOfdqLjMsNkR9WFHj15lseUWaAXwipkbu2jAvgI74jTS hPjQEfC54q6jwSnQwM+FPZlttc66UkdgZl3+YpcQ== X-Received: from plri7.prod.google.com ([2002:a17:903:32c7:b0:2dd:334f:920d]) (user=morbo job=prod-delivery.src-stubby-dispatcher) by 2002:a17:902:cccd:b0:2d8:d4d3:da50 with SMTP id d9443c01a7336-2dd2a471a7fmr72805325ad.20.1789110289759; Fri, 11 Sep 2026 00:04:49 -0700 (PDT) Date: Fri, 11 Sep 2026 07:03:45 +0000 In-Reply-To: <20260911070346.801948-1-morbo@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260911070346.801948-1-morbo@google.com> X-Mailer: git-send-email 2.55.0.1032.g73a4cd73de-goog Message-ID: <20260911070346.801948-8-morbo@google.com> Subject: [PATCH 7/7] powerpc/word-at-a-time: Instrument load_unaligned_zeropad() From: Bill Wendling To: linux-kernel@vger.kernel.org Cc: Bill Wendling , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , "Christophe Leroy (CS GROUP)" , "Ritesh Harjani (IBM)" , Shrikanth Hegde , linuxppc-dev@lists.ozlabs.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Convert powerpc to the arch_load_unaligned_zeropad() / load_unaligned_zeropad() split introduced for x86 earlier in this series, so KASAN/KCSAN also see reads through load_unaligned_zeropad() on this architecture. Assisted-by: Claude:claude-sonnet-5 Signed-off-by: Bill Wendling --- Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Nicholas Piggin Cc: "Christophe Leroy (CS GROUP)" Cc: "Ritesh Harjani (IBM)" Cc: Shrikanth Hegde Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org --- arch/powerpc/include/asm/word-at-a-time.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/word-at-a-time.h b/arch/powerpc/inclu= de/asm/word-at-a-time.h index 54653a863414..9a09620ca776 100644 --- a/arch/powerpc/include/asm/word-at-a-time.h +++ b/arch/powerpc/include/asm/word-at-a-time.h @@ -164,7 +164,7 @@ static inline unsigned long prep_zero_mask(unsigned lon= g a, unsigned long bits, #define FIXUP_SECTION ".fixup" #endif =20 -static inline unsigned long load_unaligned_zeropad(const void *addr) +static inline unsigned long arch_load_unaligned_zeropad(const void *addr) { unsigned long ret, offset, tmp; =20 @@ -203,4 +203,6 @@ static inline unsigned long load_unaligned_zeropad(cons= t void *addr) =20 #undef FIXUP_SECTION =20 +#include + #endif /* _ASM_WORD_AT_A_TIME_H */ --=20 2.47.3