From patchwork Wed Nov 2 11:06:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Potapenko X-Patchwork-Id: 13027974 Return-Path: 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 4F713C433FE for ; Wed, 2 Nov 2022 11:06:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DC6F48E0007; Wed, 2 Nov 2022 07:06:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D76E78E0001; Wed, 2 Nov 2022 07:06:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C65F78E0007; Wed, 2 Nov 2022 07:06:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id B8AFA8E0001 for ; Wed, 2 Nov 2022 07:06:25 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 86315A1151 for ; Wed, 2 Nov 2022 11:06:25 +0000 (UTC) X-FDA: 80088223530.08.F2118DF Received: from mail-wr1-f74.google.com (mail-wr1-f74.google.com [209.85.221.74]) by imf09.hostedemail.com (Postfix) with ESMTP id 15987140003 for ; Wed, 2 Nov 2022 11:06:24 +0000 (UTC) Received: by mail-wr1-f74.google.com with SMTP id j20-20020adfb314000000b002366d9f67aaso4648174wrd.3 for ; Wed, 02 Nov 2022 04:06:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=WrClR7h0c/XU2pAfJHOZckEycFJJtsgVk0eEUZJfByQ=; b=p8C9AfvzfTHb4amAZyR7Huo6iTM2OmZ596wuVutv4RMIjPVHhzGcRhijW0Wdzbgz/4 mg8h+O0U7SL3esE9xQvb/5kztONm+5qgbpw+tJlE//0bLZKuFkjRAzzQj+0wx1PDrFL6 Gauls6F4ST7RPiHkY++x7dd+3pFWOzDJv/RKpYF7ClI+YHFIqhcGVGIZOl7rqs/xFadg JoL4S1a87PsVKKh6JjnOfr+h9u34ulSYmsJAwMO91rHcN2Iy4iWb7e3lSQdY6fNFQ1ky oJ0NvFIbyshMi4t2Q/NN65+FNBXzM8tc6cSwn+oFCnYObruLNwf8GKhvRyngWCXgMNCu nieA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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; bh=WrClR7h0c/XU2pAfJHOZckEycFJJtsgVk0eEUZJfByQ=; b=Sy2odvjxp0iOFjnhhf1yiDXAFJUczbVy8bhDhGLJ+L/NhdMysuE//AJsmuljchYh0Z 0eLDY5vu5JPVmUreQCVKLsD4BZeRlmsF02oSQcgk5yvFTjeQFKsshVW35ldBva0j/J2Z 8Hq5S2B7pDb1FdGYprGu5q8MaSRmroIsnlTCw8GTFa7SGZ1GmmbEYX2hkxRHCdUn1kVw Ro85twxR7FwhelQml/JsQRlVEguG+TtxX/8hkV8xYpXpOGBBCuM5gKjLfwkmrqZyOW+a HA8MvB/y2mwYSSQ7kFhhdEJEox2vU2AkwzGWu8t2R9QHca0tdGvq6slbMfrgLByHnarO ZzBQ== X-Gm-Message-State: ACrzQf3jaL3m2XDyCdy3Cm3NS91zlYTO78LmU20b+/Z0Yp20AH+ETSsL aY0JbF8cSzO4pfBJEDKdLP++N663wnw= X-Google-Smtp-Source: AMsMyM74mWMhrgnaynccgvDcG2odp7kJoqQH6hJmlTrNDoPthPuQMBlGWcgbtLnfVHNrarTgP4wSHzfbzMc= X-Received: from glider.muc.corp.google.com ([2a00:79e0:9c:201:7f41:af20:8:a96d]) (user=glider job=sendgmr) by 2002:adf:dd91:0:b0:236:a261:6930 with SMTP id x17-20020adfdd91000000b00236a2616930mr14444934wrl.551.1667387183641; Wed, 02 Nov 2022 04:06:23 -0700 (PDT) Date: Wed, 2 Nov 2022 12:06:10 +0100 In-Reply-To: <20221102110611.1085175-1-glider@google.com> Mime-Version: 1.0 References: <20221102110611.1085175-1-glider@google.com> X-Mailer: git-send-email 2.38.1.273.g43a17bfeac-goog Message-ID: <20221102110611.1085175-4-glider@google.com> Subject: [PATCH 4/5] kmsan: make sure PREEMPT_RT is off From: Alexander Potapenko To: glider@google.com Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , Dmitry Vyukov , Marco Elver , Peter Zijlstra ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1667387185; 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-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=WrClR7h0c/XU2pAfJHOZckEycFJJtsgVk0eEUZJfByQ=; b=eupvGanzPJOZE1stK9Gm7JzjBDwaP+Wc86u7MooNO6MTszQJTEszlG2Jm1IxQZE7Jmn/Ik Eoo9zl2gCyRUNfX9KiNgEUX7N1xh8gqhNvTEkVB1itaf0YMPVBxuVBCs6iCGlGqnlo1ZKo Qg7hs7lkOmdxkyfXdI+dG+SeOV7uaVk= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=p8C9Afvz; spf=pass (imf09.hostedemail.com: domain of 3L09iYwYKCHgcheZanckkcha.Ykihejqt-iigrWYg.knc@flex--glider.bounces.google.com designates 209.85.221.74 as permitted sender) smtp.mailfrom=3L09iYwYKCHgcheZanckkcha.Ykihejqt-iigrWYg.knc@flex--glider.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1667387185; a=rsa-sha256; cv=none; b=gkDbfSw3FMhd2z4cXjHldRaBLkav/vMa1+FdABCfcpJTuHrifToDXmXgjEX0nLoUIAHRAS QXiHGVXj7JDNe64e/1OyuilqlYlNEQgXGk4/e2VlOLzIUj4dy1bW8rwLbx1Jar/9OYnIeg Qqn8I/53gzRtWFxXKw58bZ8MMbfDhlc= X-Stat-Signature: tidxhp38uwaidupwpn51ofxnkx4i977e X-Rspamd-Queue-Id: 15987140003 X-Rspamd-Server: rspam06 X-Rspam-User: Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=p8C9Afvz; spf=pass (imf09.hostedemail.com: domain of 3L09iYwYKCHgcheZanckkcha.Ykihejqt-iigrWYg.knc@flex--glider.bounces.google.com designates 209.85.221.74 as permitted sender) smtp.mailfrom=3L09iYwYKCHgcheZanckkcha.Ykihejqt-iigrWYg.knc@flex--glider.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com X-HE-Tag: 1667387184-88793 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: As pointed out by Peter Zijlstra, __msan_poison_alloca() does not play well with IRQ code when PREEMPT_RT is on, because in that mode even GFP_ATOMIC allocations cannot be performed. Fixing this would require making stackdepot completely lockless, which is quite challenging and may be excessive for the time being. Instead, make sure KMSAN is incompatible with PREEMPT_RT, like other debug configs are. Cc: Andrew Morton Cc: Dmitry Vyukov Cc: Marco Elver Cc: Peter Zijlstra (Intel) Link: https://lore.kernel.org/lkml/20221025221755.3810809-1-glider@google.com/ Signed-off-by: Alexander Potapenko Acked-by: Peter Zijlstra (Intel) --- lib/Kconfig.kmsan | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Kconfig.kmsan b/lib/Kconfig.kmsan index b2489dd6503fa..ef2c8f256c57d 100644 --- a/lib/Kconfig.kmsan +++ b/lib/Kconfig.kmsan @@ -12,6 +12,7 @@ config KMSAN bool "KMSAN: detector of uninitialized values use" depends on HAVE_ARCH_KMSAN && HAVE_KMSAN_COMPILER depends on SLUB && DEBUG_KERNEL && !KASAN && !KCSAN + depends on !PREEMPT_RT select STACKDEPOT select STACKDEPOT_ALWAYS_INIT help