Message ID | 173d99afea37321e76e9380b49bd5966be8db849.1743772053.git.maciej.wieczor-retman@intel.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7E9CC36014 for <linux-mm@archiver.kernel.org>; Fri, 4 Apr 2025 13:17:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DA2CA28000C; Fri, 4 Apr 2025 09:17:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D7A3D280001; Fri, 4 Apr 2025 09:17:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BF56A28000C; Fri, 4 Apr 2025 09:17:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 9FA5E280001 for <linux-mm@kvack.org>; Fri, 4 Apr 2025 09:17:04 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id E6A9114017F for <linux-mm@kvack.org>; Fri, 4 Apr 2025 13:17:05 +0000 (UTC) X-FDA: 83296412010.07.AA71226 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) by imf13.hostedemail.com (Postfix) with ESMTP id A995E2000E for <linux-mm@kvack.org>; Fri, 4 Apr 2025 13:17:03 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=D4aiAFjt; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf13.hostedemail.com: domain of maciej.wieczor-retman@intel.com designates 198.175.65.11 as permitted sender) smtp.mailfrom=maciej.wieczor-retman@intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1743772623; a=rsa-sha256; cv=none; b=kHrxMW8zTPMARAegCd0uTRzdHLSCpW0K14JKnzmJ6hfptW63mWHhE8jiDlUOawZL8bgtDs AyWD1q++XuFqPEUml2xY9NNYdtdpAAyd2LjhLnXodpU2lcBhw8FVDfiELO87uScxaxE2oz yG7XYBsIyzI0YorBw8lNYEtJEslecAI= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=D4aiAFjt; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf13.hostedemail.com: domain of maciej.wieczor-retman@intel.com designates 198.175.65.11 as permitted sender) smtp.mailfrom=maciej.wieczor-retman@intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1743772623; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Lnf6pC/5n4SCy1ffOsH42Rbn/6DISiknxHlO/AP+4As=; b=1CQI9pDZYO7CX2H+h8ttx3Y2ry2X4cjP+5M5vgZsumGUtzNsF86nThiLxPI1Ub05YBb4Dn jH/HrRof5H7iE0vmH0a4yvnTHAIL2+rB33x8ZCxsbHT7VKmEbPofOWdnpIrJCuiVsUGu5T cMx+xaBhrPc7c8XV3iBgDXbVyhYZk6E= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1743772624; x=1775308624; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WLJPoxzJ+9icJR/wXoKCRX4w/xjfsl8E7YkLYgEJBpY=; b=D4aiAFjtyX8Oqn64T3OsF5asBVkylOYhdmZQhllIwfRHkcYlcvxw2Ikr UQYh2k7dEnKGQ3Q+oiV9GmTUTY7PyXPWR+axnTe4M4IXpRy9nQXzonBpc hJbXfn/2jKtBLjJ85zdYqA8P0rdd136J19rZv1XIffdFiI967xGWBl7cB mN7t1ihWIUXdWdRDiCLhbADmvCI0qfYLwdIRwKZvMlOegff4E4ciT8XKh 5Lp9Sbu+2x/tZdw3kfYEgs74IZj1T891ErQlxQ7xsdEwEZa9Bj1Jze+TX Xbm14Pv2MaXtHHE/rKwzc0yWDSk5wgqnwQUquEARc+VME1imxjOh7V61H A==; X-CSE-ConnectionGUID: iaHI72a5RLmf4xPFHsJDJw== X-CSE-MsgGUID: z0qvs65SSW6uT+hJDe/JYQ== X-IronPort-AV: E=McAfee;i="6700,10204,11394"; a="55401894" X-IronPort-AV: E=Sophos;i="6.15,188,1739865600"; d="scan'208";a="55401894" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Apr 2025 06:17:03 -0700 X-CSE-ConnectionGUID: 3+mynkr+SXqFVcdE3tJihA== X-CSE-MsgGUID: ZzPu2O3cTHCCuwduFbu/7A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,188,1739865600"; d="scan'208";a="128157271" Received: from opintica-mobl1 (HELO wieczorr-mobl1.intel.com) ([10.245.245.50]) by fmviesa009-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Apr 2025 06:16:47 -0700 From: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com> To: hpa@zytor.com, hch@infradead.org, nick.desaulniers+lkml@gmail.com, kuan-ying.lee@canonical.com, masahiroy@kernel.org, samuel.holland@sifive.com, mingo@redhat.com, corbet@lwn.net, ryabinin.a.a@gmail.com, guoweikang.kernel@gmail.com, jpoimboe@kernel.org, ardb@kernel.org, vincenzo.frascino@arm.com, glider@google.com, kirill.shutemov@linux.intel.com, apopple@nvidia.com, samitolvanen@google.com, maciej.wieczor-retman@intel.com, kaleshsingh@google.com, jgross@suse.com, andreyknvl@gmail.com, scott@os.amperecomputing.com, tony.luck@intel.com, dvyukov@google.com, pasha.tatashin@soleen.com, ziy@nvidia.com, broonie@kernel.org, gatlin.newhouse@gmail.com, jackmanb@google.com, wangkefeng.wang@huawei.com, thiago.bauermann@linaro.org, tglx@linutronix.de, kees@kernel.org, akpm@linux-foundation.org, jason.andryuk@amd.com, snovitoll@gmail.com, xin@zytor.com, jan.kiszka@siemens.com, bp@alien8.de, rppt@kernel.org, peterz@infradead.org, pankaj.gupta@amd.com, thuth@redhat.com, andriy.shevchenko@linux.intel.com, joel.granados@kernel.org, kbingham@kernel.org, nicolas@fjasle.eu, mark.rutland@arm.com, surenb@google.com, catalin.marinas@arm.com, morbo@google.com, justinstitt@google.com, ubizjak@gmail.com, jhubbard@nvidia.com, urezki@gmail.com, dave.hansen@linux.intel.com, bhe@redhat.com, luto@kernel.org, baohua@kernel.org, nathan@kernel.org, will@kernel.org, brgerst@gmail.com Cc: llvm@lists.linux.dev, linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, x86@kernel.org Subject: [PATCH v3 09/14] x86: Minimal SLAB alignment Date: Fri, 4 Apr 2025 15:14:13 +0200 Message-ID: <173d99afea37321e76e9380b49bd5966be8db849.1743772053.git.maciej.wieczor-retman@intel.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <cover.1743772053.git.maciej.wieczor-retman@intel.com> References: <cover.1743772053.git.maciej.wieczor-retman@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A995E2000E X-Stat-Signature: ogdq6kih3brrzsjkexrusgkwb71kpdx1 X-Rspam-User: X-Rspamd-Server: rspam06 X-HE-Tag: 1743772623-375349 X-HE-Meta: U2FsdGVkX1/IdW4zPdKQomViMYwd1vqBrSELGy7bI24K4cese7g1XTiqAeBWcpnwUCMbfoaAVPsqb17e6KfeJOA4qxmTF618Eb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hdkNpxfqhDXNOy1TvpakWyPwcdchxy6Dmtr9m3rpLGxNLEhHV1ZlACFQUCrnCUlyuaA4BfapWbdC+YuhUwsu X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
[v3,01/14] kasan: sw_tags: Use arithmetic shift for shadow computation
|
expand
|
On 4/4/25 06:14, Maciej Wieczor-Retman wrote: > Adjust x86 minimal SLAB alignment to match KASAN granularity size. In > tag-based mode the size changes to 16 bytes so the value needs to be 16. I feel like we need a _bit_ of a discussion of the impact here. We are, after all, trying to get this feature into shape so that it can be used more widely outside of just debugging environments. What's the impact of this in a production environment?
diff --git a/arch/x86/include/asm/cache.h b/arch/x86/include/asm/cache.h index 69404eae9983..3232583b5487 100644 --- a/arch/x86/include/asm/cache.h +++ b/arch/x86/include/asm/cache.h @@ -21,4 +21,8 @@ #endif #endif +#ifdef CONFIG_KASAN_SW_TAGS +#define ARCH_SLAB_MINALIGN (1ULL << KASAN_SHADOW_SCALE_SHIFT) +#endif + #endif /* _ASM_X86_CACHE_H */
Adjust x86 minimal SLAB alignment to match KASAN granularity size. In tag-based mode the size changes to 16 bytes so the value needs to be 16. Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com> --- Changelog v3: - Fix typo in patch message 4 -> 16. - Change define location to arch/x86/include/asm/cache.c. arch/x86/include/asm/cache.h | 4 ++++ 1 file changed, 4 insertions(+)