Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp731129rdb; Fri, 22 Dec 2023 03:28:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IGHd4/zPrFMXxNzCUei6IMdQQuuFCpw/A0uj8Jf5Ihd1xN4syQYVAcKDKuQ1S5eOYEQGmww X-Received: by 2002:aa7:9283:0:b0:6d0:8595:ab0c with SMTP id j3-20020aa79283000000b006d08595ab0cmr692603pfa.52.1703244520923; Fri, 22 Dec 2023 03:28:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703244520; cv=none; d=google.com; s=arc-20160816; b=iSfhHsW6z/8UfSS4BOrp95EfHcb5Dz8dWL5X3oBS1BMB6RRGNKwD8yg0Ms2LD5kqCu BroKWykXA8GZ70FgWGkOnZNfSSa4p/cg2mT8wynpY2P07B8XmG+4FPW2pE5xggkFNfk/ hvoSTqORM8uUlumhUVYPjQMK2+mEQgnY1A5e2QeA5GOX2s9QI5xJewq9/leu8JOuwlJK U7nwKQ2hPm39zjLPSs2PyoPIDz5JhLnCnd/ia8sgLG85ESfPE2VEmXclFjyuntjCoXZ0 G9mMuI/gE+gtTygpjF7Y7CqgthyvND/qU+s1RQnlOqWF7v9iMbw/oxp+wlXAiwKPkIR3 tuHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=1p7KqUeaWemOFaHH+JSolT+/fQ/fl1zP2/9KT4NrzQs=; fh=kmKVJfn1Y9YZhlVPpqCDHuVVZsVgm/oqvGOUm8JK+fE=; b=u/uiNKtkYVNDE3IW+TTqdRRc4JjZ911+qo1l+CE1flK3kwoFKd448l8ikIJXtGuDT7 nKAVMGchQkapynNEAAet8wVWEcamiIvBY/0g+qu2X1yess5KJuIM7y+m2KswrJgmEzRg UuzRxXOmxSXer1dI7UVZMAPsWPOea7wb5PtkzxrjVZ6iKSz4L+SODnGNXChqub7oyI/t +BKGPxyDmfdqhYIdUs9NPr55/guXI5diIbvEEJDw5afjpt50VnZohaPoQOcNDiShk3D8 9x/Tx1KvxZ84QG6MhuBFc9hHaRmr4ESLq6/PH2IK5hsKlc6gBu+Hj1TtAjecR5BVUojh mJRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=sEtBWDud; spf=pass (google.com: domain of linux-kernel+bounces-9662-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9662-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id k26-20020aa792da000000b006d444584009si3042522pfa.355.2023.12.22.03.28.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 03:28:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-9662-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=sEtBWDud; spf=pass (google.com: domain of linux-kernel+bounces-9662-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9662-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 6D669287136 for ; Fri, 22 Dec 2023 11:28:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 86F481773E; Fri, 22 Dec 2023 11:28:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="sEtBWDud" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-qv1-f46.google.com (mail-qv1-f46.google.com [209.85.219.46]) (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 6573517730 for ; Fri, 22 Dec 2023 11:28:31 +0000 (UTC) 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=google.com Received: by mail-qv1-f46.google.com with SMTP id 6a1803df08f44-67a338dfca7so10450896d6.2 for ; Fri, 22 Dec 2023 03:28:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1703244510; x=1703849310; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=1p7KqUeaWemOFaHH+JSolT+/fQ/fl1zP2/9KT4NrzQs=; b=sEtBWDude6HWs19lafdbEKl2ITBZWLxnvBlNmD1wXKZRmQ5Fw700bLGgf1AgDjWYZI p90Mot4L/KBL+CRZVWTkC7Q73Pnwq9Fn8mrQ+2z2D1IKCz+monFQE3vXKu8LSaWONASH DUdNuMayUvwttB4B1a3DbD4x0tvatna2N2PIgbD6L7KfntPLk6REcVazi5nOKmgbiMLr Kzca5tZZ+skU6Gs8xc2wuKmNZrghaZuxG8ATJNGohgNcRDovDQl+6Iw5N/hSByDjtGbr s3RmOugWDoBjZtttca7+aCFdMHerhCO9QUQyYRSlb7gG6A+YmDM7uqoWayUyvAFq24wi fODw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703244510; x=1703849310; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1p7KqUeaWemOFaHH+JSolT+/fQ/fl1zP2/9KT4NrzQs=; b=EVogZHIC6i7flrOzW/FjxJPX6bzmYEr6GIDqcoxyO34XUWgq6QgK+6CwXxWf0HigO9 PAWAJ4y4y3tJztrTVofaftzlUv9mZCtZV+k9bRDHbVpGabpWPck1D8IqyBFfU3Roh1W7 jMWhDcr10VsFwPyu/yM3yWcBRTITDTpWfYGDtwtnt6xga2VASBh2Pn4k0+i786/1btWo 7f6aoaihODOlWm4y+mc5uZvrcit09W+pTEnVIs1giad1hiGKtQJvE+B9JyhTrOn7CsRR +TIqR6z1IaJOpKWDuGp8K7lc4zfwhCR8k9rEsbWdKHN37+zgtYh/6UJPiQCSdTFitiZ1 3tgA== X-Gm-Message-State: AOJu0YzL3uYw1MDEYTLU96fWmcUHCkZI/HGhpjO8tVyNGZOCGG5grjAQ mEMXJhZ2rRdx2keqxN2vYvhhlp8IlYjZiPv5H8+C3FaKV6rW X-Received: by 2002:a05:6214:62a:b0:67f:9eb:f1ec with SMTP id a10-20020a056214062a00b0067f09ebf1ecmr1541233qvx.56.1703244510192; Fri, 22 Dec 2023 03:28:30 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231213233605.661251-1-iii@linux.ibm.com> <20231213233605.661251-28-iii@linux.ibm.com> In-Reply-To: <20231213233605.661251-28-iii@linux.ibm.com> From: Alexander Potapenko Date: Fri, 22 Dec 2023 12:27:50 +0100 Message-ID: Subject: Re: [PATCH v3 27/34] s390/irqflags: Do not instrument arch_local_irq_*() with KMSAN To: Ilya Leoshkevich Cc: Alexander Gordeev , Andrew Morton , Christoph Lameter , David Rientjes , Heiko Carstens , Joonsoo Kim , Marco Elver , Masami Hiramatsu , Pekka Enberg , Steven Rostedt , Vasily Gorbik , Vlastimil Babka , Christian Borntraeger , Dmitry Vyukov , Hyeonggon Yoo <42.hyeyoo@gmail.com>, kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-s390@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Mark Rutland , Roman Gushchin , Sven Schnelle Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Dec 14, 2023 at 12:36=E2=80=AFAM Ilya Leoshkevich wrote: > > KMSAN generates the following false positives on s390x: > > [ 6.063666] DEBUG_LOCKS_WARN_ON(lockdep_hardirqs_enabled()) > [ ...] > [ 6.577050] Call Trace: > [ 6.619637] [<000000000690d2de>] check_flags+0x1fe/0x210 > [ 6.665411] ([<000000000690d2da>] check_flags+0x1fa/0x210) > [ 6.707478] [<00000000006cec1a>] lock_acquire+0x2ca/0xce0 > [ 6.749959] [<00000000069820ea>] _raw_spin_lock_irqsave+0xea/0x190 > [ 6.794912] [<00000000041fc988>] __stack_depot_save+0x218/0x5b0 > [ 6.838420] [<000000000197affe>] __msan_poison_alloca+0xfe/0x1a0 > [ 6.882985] [<0000000007c5827c>] start_kernel+0x70c/0xd50 > [ 6.927454] [<0000000000100036>] startup_continue+0x36/0x40 > > Between trace_hardirqs_on() and `stosm __mask, 3` lockdep thinks that > interrupts are on, but on the CPU they are still off. KMSAN > instrumentation takes spinlocks, giving lockdep a chance to see and > complain about this discrepancy. > > KMSAN instrumentation is inserted in order to poison the __mask > variable. Disable instrumentation in the respective functions. They are > very small and it's easy to see that no important metadata updates are > lost because of this. > > Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko