Message ID | 169697544974.3135.4822379707412006238.tip-bot2@tip-bot2 |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp161588vqb; Tue, 10 Oct 2023 15:04:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEMNop6RfzYekv1WsdQ9KHpKxU8Z77+QNzO+ZRiExlL+g1QXz3wgBTA1jAeW04r6sTBcl30 X-Received: by 2002:a17:902:ce84:b0:1c3:a4f2:7c99 with SMTP id f4-20020a170902ce8400b001c3a4f27c99mr21952628plg.4.1696975494170; Tue, 10 Oct 2023 15:04:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696975494; cv=none; d=google.com; s=arc-20160816; b=DAgA/RTk0WHbrGdxTAG0sLVy+51OdnyTB0dEEZdNPQmlOKDHs0PAAZLoiR8WwheAZ6 yAmfSOedt6DJXcZCCiH3isHTYpKcIBuzlHoChk9cty71ZgMShHSgaYg0cnzeAx7ALeDT 90nTRiqBBBdnhqFyqjsUYGHuI1OhGUTw89kPKMbLncywNjME0rEvz0ut5u+MjATupDFY NNIomXOuWD+mKiFpcXDu405Sq3KXNi1W1DXrJ8qS6qiAMRmWVj1iiAxHnfA9VnCUnmjJ Vh0IdJFNoFbaOWa4lSyhoN3aQwpeuacPV9WlEi9Edx387vROvlHhEr2nXcsl/7vNRZWN 3Khg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=b/9Sso2alxhsb0I75/YmVzI4zCmw+dUkaR4lEvo/XEU=; fh=5E4dng1Qch5g8X9pbgYtMDRXF3VlJsTD5h6q+K3t/4c=; b=odO8qcUhH8JXQkS1p06gl18DB4LuVS0ImzC6D2Pg0ZYTTZlNyPIgInFVt+QFk9KvDv YHhrbTBGxWYk9l/WH8Ntj63Pmx3peZZVSrIj3nVgCd8r5oNujfynEfcb5ZJfROaq6Xsh RI2n/v1OySkFhgz9V2jz7V3K4qL7I9h7dZbT5D+Vm0Y09UE3HT7mkvNxkfdIYdDAfNHn 5NR9SYsbzVfkStq1rVQuj+QO2pbE65gutVoS497weswjo2wJLFcotsVxryufk3ZT5nLU EtQajWMiGKbgkHisGyVDOQYrhS0WcQZ6fnvg6YXSyANr2uOxB6mE2wX3nHJBo9wwSxTX 1AKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Vn0PBfL+; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="g/4XYwMe"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id j8-20020a170903024800b001c8944c933dsi10330477plh.380.2023.10.10.15.04.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 15:04:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Vn0PBfL+; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="g/4XYwMe"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 9904880B6C0B; Tue, 10 Oct 2023 15:04:51 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229864AbjJJWEO (ORCPT <rfc822;rua109.linux@gmail.com> + 19 others); Tue, 10 Oct 2023 18:04:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229578AbjJJWEN (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 10 Oct 2023 18:04:13 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF26C98; Tue, 10 Oct 2023 15:04:11 -0700 (PDT) Date: Tue, 10 Oct 2023 22:04:09 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1696975450; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=b/9Sso2alxhsb0I75/YmVzI4zCmw+dUkaR4lEvo/XEU=; b=Vn0PBfL+YE2HoK+kf5JJ38nxe6DUwGKUUM4+2XPmn1C+0sB4YHFP+KbBGCDlWA6wnvEEHD hiMSWkKgomRpbZDpXxQtEAuCJhO/0Yg2LuXj+kFVOTEAaichDp1XYwVQXNNQGKhsUlYc4F 6HLArONryo2BJchVj6Zb5b4VVLkKxisNuhlLmdLQzBFHvb7XJG7IHfGpkfxuyVOgF/7DIm yXoYR4XMnDmz9IYJg++LmwpQ/HKKpasBTR8MvNhqz4aWAZSk9/8BcMuN9FMfk4YiJZD2Bp d2eUk0DJieOcaRG4aw56kfTISX+U9lSbP2ibohU+QksC33ictZYwcRVgv8mahw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1696975450; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=b/9Sso2alxhsb0I75/YmVzI4zCmw+dUkaR4lEvo/XEU=; b=g/4XYwMeRhbzqu/smi6nubCAnhTy4cv3A2z8PywVtN7+shujPsPc63XYs1YWRkAO/UW6VP npKeEwntNJpe2WBw== From: "tip-bot2 for Uros Bizjak" <tip-bot2@linutronix.de> Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/percpu] x86/percpu: Disable named address spaces for KASAN Cc: kernel test robot <oliver.sang@intel.com>, Uros Bizjak <ubizjak@gmail.com>, Ingo Molnar <mingo@kernel.org>, Andy Lutomirski <luto@kernel.org>, Brian Gerst <brgerst@gmail.com>, Denys Vlasenko <dvlasenk@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>, Linus Torvalds <torvalds@linux-foundation.org>, Peter Zijlstra <peterz@infradead.org>, Josh Poimboeuf <jpoimboe@redhat.com>, x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20231009151409.53656-1-ubizjak@gmail.com> References: <20231009151409.53656-1-ubizjak@gmail.com> MIME-Version: 1.0 Message-ID: <169697544974.3135.4822379707412006238.tip-bot2@tip-bot2> Robot-ID: <tip-bot2@linutronix.de> Robot-Unsubscribe: Contact <mailto:tglx@linutronix.de> to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 10 Oct 2023 15:04:51 -0700 (PDT) X-Spam-Level: ** X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779291440248777255 X-GMAIL-MSGID: 1779407775949663114 |
Series |
[tip:,x86/percpu] x86/percpu: Disable named address spaces for KASAN
|
|
Commit Message
tip-bot2 for Thomas Gleixner
Oct. 10, 2023, 10:04 p.m. UTC
The following commit has been merged into the x86/percpu branch of tip: Commit-ID: e29aad08b1da7772b362537be32335c0394e65fe Gitweb: https://git.kernel.org/tip/e29aad08b1da7772b362537be32335c0394e65fe Author: Uros Bizjak <ubizjak@gmail.com> AuthorDate: Mon, 09 Oct 2023 17:13:48 +02:00 Committer: Ingo Molnar <mingo@kernel.org> CommitterDate: Tue, 10 Oct 2023 23:57:35 +02:00 x86/percpu: Disable named address spaces for KASAN -fsanitize=kernel-address (KASAN) is at the moment incompatible with named address spaces - see GCC PR sanitizer/111736: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111736 GCC is doing a KASAN check on a percpu address which it shouldn't do, and didn't used to do because we did the access using inline asm. But now that GCC does the accesses as normal (albeit special address space) memory accesses, the KASAN code triggers on them too, and it all goes to hell in a handbasket very quickly. Those percpu accessor functions need to disable any KASAN checking or other sanitizer checking. Not on the percpu address, because that's not a "real" address, it's obviously just the offset from the segment register. And GCC should probably not have generated such code in the first place, so arguably this is a bug with -fsanitize=kernel-address. The patch also removes a stale dependency on CONFIG_SMP. Reported-by: kernel test robot <oliver.sang@intel.com> Signed-off-by: Uros Bizjak <ubizjak@gmail.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Andy Lutomirski <luto@kernel.org> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Link: https://lore.kernel.org/r/20231009151409.53656-1-ubizjak@gmail.com Closes: https://lore.kernel.org/oe-lkp/202310071301.a5113890-oliver.sang@intel.com --- arch/x86/Kconfig | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index ecb2569..54e79d3 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -2393,7 +2393,12 @@ config CC_HAS_NAMED_AS config USE_X86_SEG_SUPPORT def_bool y - depends on CC_HAS_NAMED_AS && SMP + depends on CC_HAS_NAMED_AS + # + # -fsanitize=kernel-address (KASAN) is at the moment incompatible + # with named address spaces - see GCC PR sanitizer/111736. + # + depends on !KASAN config CC_HAS_SLS def_bool $(cc-option,-mharden-sls=all)