Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5654736rdb; Wed, 13 Dec 2023 15:38:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IE8LlUQenLBs6igXV4DSeYZiQwmjD5Bxze+c7gHYc17zCfcr0W3c92NDqHUfUBQ+6rtqDJo X-Received: by 2002:aa7:8896:0:b0:6ce:39f3:88f2 with SMTP id z22-20020aa78896000000b006ce39f388f2mr11095182pfe.23.1702510737741; Wed, 13 Dec 2023 15:38:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702510737; cv=none; d=google.com; s=arc-20160816; b=uG9+d3dsfJQrwAtzW3Y7iS3hEaFt4UMfz7qY3MHgcvzFCXDMkl10234hS0cbwtNh3t QM/5e2Ys7E2wLQEb8b6QGQwVNIO2Ttggm0Eb5ynkiM5IYxcQGhCGERTJA4KvFTUDmxJ0 Upk2NEFXiDxM7VBEQPC2Hm/QRkAITagV3t5kgzm/PTWq19nDRD4B+KJmxyny3mXa+vYv H9ikH4PyVA87tyf6tTQM0C6Q3ZucoBWs9OOIBipXOve5s3ifqVxXPGmuHoaHG5wQe8ku QXMdX6wqfJVMoEQrQd4h2vhKSvM4jxfIeDbztn66xZnPo1j2aY4dKfBnZQATEkGK/9ht S10g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=z5J7brqvs7iQUmi8H9IllLFRjEMOozIzZchhc/zzAHU=; fh=TQATEbdDZNcnk8L2eDP6eFL9HlexFaHIexhR1TH2IlY=; b=y4dU1JbMpT7y37620Eizd7Keupcx3QUkKxC9hHgVJHzOEA2LaYG0z09yfAKi0QHkeA kYGOweoXCkfiH2bg4cYt+ER6wNaspmqd0kaEswUFNjjT3zoiHt7MSs+N1Xyeyz5EDrYd Ca5uEOFG/+YV65jydJIkEw3QoRcAdZh0b+6sSBuoOCyuA/Jn8NIBo5OyX6XwZHhF4HOA R2cqSam2Dpm8+ruX6QadAbaH04ZY1rMQNBXbycyAGMIAyLvuaDXkllazTBOUnWjZHcD9 J3z74OhG5Jzwg/Um5JqUjcAkX5V6ffJQ2Dm51QW0F3vzS3pdLXzYeOnxH8n8up/Oyg3V RPHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=V256ksMV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id c6-20020a631c46000000b005b99ea783aasi10040353pgm.755.2023.12.13.15.38.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 15:38:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=V256ksMV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 50496802F576; Wed, 13 Dec 2023 15:38:55 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442959AbjLMXiQ (ORCPT + 99 others); Wed, 13 Dec 2023 18:38:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1442865AbjLMXhV (ORCPT ); Wed, 13 Dec 2023 18:37:21 -0500 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FF5FD45; Wed, 13 Dec 2023 15:37:18 -0800 (PST) Received: from pps.filterd (m0360072.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3BDNHcpJ002583; Wed, 13 Dec 2023 23:37:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=z5J7brqvs7iQUmi8H9IllLFRjEMOozIzZchhc/zzAHU=; b=V256ksMVqXfktUI/dmq84fvudEUMnhbgEDCIGla9LPeIfhJYDII+ppiqr4+KEmxZY5XG tLWpXbU1988W93aMEFpM8nWbfRVUhj2UiNuO7sDIwuA1PAfVLhWQuQlCKgkrSfid0unZ ICth5qXvVBJ7DDbMJCXBYAgMBBT5Doln45ZbVHD6hKH9O7YKqu23PUr93VrfDmWJagaa IAUQSVK7eFJ0AaLjhXzhkjLzi8WeQG7KZMQctMxIahgmDf+6+gMRLFGKP0te+h5v6t0Y kIEffIip8TUK09sEAn5xNYIoAVrRX3hFRgQAPBElSGk5juvYw7B9Kx4PeoKq4KHaa6X2 qg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3uyp5cgbe3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 13 Dec 2023 23:37:04 +0000 Received: from m0360072.ppops.net (m0360072.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3BDNSxlp029814; Wed, 13 Dec 2023 23:37:03 GMT Received: from ppma22.wdc07v.mail.ibm.com (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3uyp5cgbdp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 13 Dec 2023 23:37:03 +0000 Received: from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1]) by ppma22.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 3BDLCbYf028220; Wed, 13 Dec 2023 23:37:02 GMT Received: from smtprelay04.fra02v.mail.ibm.com ([9.218.2.228]) by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3uw2xyvrtw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 13 Dec 2023 23:37:02 +0000 Received: from smtpav02.fra02v.mail.ibm.com (smtpav02.fra02v.mail.ibm.com [10.20.54.101]) by smtprelay04.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3BDNaxte40567346 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 13 Dec 2023 23:36:59 GMT Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7327020040; Wed, 13 Dec 2023 23:36:59 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0A3D520043; Wed, 13 Dec 2023 23:36:58 +0000 (GMT) Received: from heavy.boeblingen.de.ibm.com (unknown [9.171.70.156]) by smtpav02.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 13 Dec 2023 23:36:57 +0000 (GMT) From: Ilya Leoshkevich To: Alexander Gordeev , Alexander Potapenko , Andrew Morton , Christoph Lameter , David Rientjes , Heiko Carstens , Joonsoo Kim , Marco Elver , Masami Hiramatsu , Pekka Enberg , Steven Rostedt , Vasily Gorbik , Vlastimil Babka Cc: 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 , Ilya Leoshkevich Subject: [PATCH v3 32/34] s390/unwind: Disable KMSAN checks Date: Thu, 14 Dec 2023 00:24:52 +0100 Message-ID: <20231213233605.661251-33-iii@linux.ibm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231213233605.661251-1-iii@linux.ibm.com> References: <20231213233605.661251-1-iii@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: Ms-EhDUZl8DdVSjxar4ujX-GpVodfDrl X-Proofpoint-GUID: oiTdss9fYYVlt96iU0FVBhj9BKbJ47sk X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-13_14,2023-12-13_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxscore=0 spamscore=0 malwarescore=0 mlxlogscore=857 bulkscore=0 suspectscore=0 phishscore=0 priorityscore=1501 adultscore=0 lowpriorityscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2312130167 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 13 Dec 2023 15:38:55 -0800 (PST) The unwind code can read uninitialized frames. Furthermore, even in the good case, KMSAN does not emit shadow for backchains. Therefore disable it for the unwinding functions. Reviewed-by: Alexander Potapenko Signed-off-by: Ilya Leoshkevich --- arch/s390/kernel/unwind_bc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/s390/kernel/unwind_bc.c b/arch/s390/kernel/unwind_bc.c index 0ece156fdd7c..cd44be2b6ce8 100644 --- a/arch/s390/kernel/unwind_bc.c +++ b/arch/s390/kernel/unwind_bc.c @@ -49,6 +49,8 @@ static inline bool is_final_pt_regs(struct unwind_state *state, READ_ONCE_NOCHECK(regs->psw.mask) & PSW_MASK_PSTATE; } +/* Avoid KMSAN false positives from touching uninitialized frames. */ +__no_kmsan_checks bool unwind_next_frame(struct unwind_state *state) { struct stack_info *info = &state->stack_info; @@ -118,6 +120,8 @@ bool unwind_next_frame(struct unwind_state *state) } EXPORT_SYMBOL_GPL(unwind_next_frame); +/* Avoid KMSAN false positives from touching uninitialized frames. */ +__no_kmsan_checks void __unwind_start(struct unwind_state *state, struct task_struct *task, struct pt_regs *regs, unsigned long first_frame) { -- 2.43.0