Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp236301lqs; Thu, 13 Jun 2024 08:43:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUjzoRToGcrPItIRRDdaE9E+07ggMgcoq26OmaviEnKBm2hC1nfujp6o9bXzZYFGUMTTs5jo7GyzpTxtWTB+ggit0/7ZnZHRhN9R2FXng== X-Google-Smtp-Source: AGHT+IG6M2k5Y35u94TewsIr1pBwzfGrUXrRRVJZWd1O4RcAmkjdH2ibcPXVzRtn4FWfdi2QjPOK X-Received: by 2002:a25:d894:0:b0:dcd:19ba:10df with SMTP id 3f1490d57ef6-dfe68c0eb24mr4832270276.56.1718293396881; Thu, 13 Jun 2024 08:43:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718293396; cv=pass; d=google.com; s=arc-20160816; b=PfXbxf43XP7mYNSJPxmZvSLgmNd8gihUzsam90OAX72I0+N/3SbWht6puNFNlREEsv BI1cyLI1eCCYvwcW8OlPBY8RW+DHopCSSurciIVn8to2NKwP3H9ZYuFvcFEWHPKViNVi MqHbLnsCZ9pDDt/PK1xLmMVzOJMoH13TS+ZrVtKtj3AmhPon9c3tKXs0iKaaXS9vYdsl aRoGIH/+sGVEzFUcOMBih5wIBTK3xJWaEJz8bs/9dQCp7QkLCkqqkuIuqyS9H2aQV2wQ pejwwIuzVLLLLPbw/n2rzCUYNuKYsmRnn6uClTIkOiT4UB7BDdnvSQgpEGl87HZj2oND exzw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=WE3ASvt90HWWKhjLUTLn3R+jUtOfzIMMtdYDGL1//DQ=; fh=TQATEbdDZNcnk8L2eDP6eFL9HlexFaHIexhR1TH2IlY=; b=eMPD6Mpnvcg5QDCghMSLNkyzdoGeGlzhz1g2qgI9TrY9c7c8V02YwBxGMhvpz8o6sS xw1b0EnmyelkaxIa8T11bemTCoQtDW9GMFwPD1jx0vbAUS3JQP3HPAZCXMzUCv9QJx0N 0GR+ukx+iEmbyytYxmoZKpU+bhJHfyUq5XfnQ4h2ETQjlPicEI6a0VNB6lzKlDUk115s TwLU/mABEN1A/CvSr5A1LrdLZkkxymuwnSaOby79jT4v0sLQTSyqUT/zOx0Xy5b9a1H8 pBOQ49WAvmzH5xULU7oXNwptAyiRdGWgXulApMX5NtEq0uEuhnYLsmjp7+dLpZ3l8jg/ A+vA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=OO19bEtV; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-kernel+bounces-213570-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213570-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6b2a5afe49bsi17413566d6.288.2024.06.13.08.43.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 08:43:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-213570-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=OO19bEtV; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-kernel+bounces-213570-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213570-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 93D891C243CB for ; Thu, 13 Jun 2024 15:43:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B1E1D155CA0; Thu, 13 Jun 2024 15:40:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="OO19bEtV" Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C1A0912E1C5; Thu, 13 Jun 2024 15:40:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.158.5 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718293214; cv=none; b=uOheh6nn3x8Bw+nbsFebgJ55JVVUBUFS9+CGMnMgNE65WXEu4cbCMGr5Rr5lEBJUfHy19y/HlUhYN2GWJM4LKOFZ6u8ImRKg+u18fcw4gnjcYN/tv5Tj2v68UQ3ljSeJjDw4Et1xfPBXGvn244+me6KHktOGz1O5Vl0MHTwr8L8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718293214; c=relaxed/simple; bh=3GHRzbDlmL8uszvFCym0Jw3M14iwTN/fdxjRMi2obBI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eW4ysqNO9HhoSaLxkaK1S7WQV273oh1i9cB9JhZOQY3hAkdfK/9d3JF3LzRSgvMK5TEfOa87IcM2cNUABBbf+sW1cqNkxAc494Frqvg4QO3mRX/+ILQgdeVA6xUBEIaP05TG4GzCouv4mayeCHSunvkzGEojUNaPR4QbCKcnSBc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=OO19bEtV; arc=none smtp.client-ip=148.163.158.5 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Received: from pps.filterd (m0353725.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45DFb2rh029023; Thu, 13 Jun 2024 15:39:53 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=WE3ASvt90HWWK hjLUTLn3R+jUtOfzIMMtdYDGL1//DQ=; b=OO19bEtVtKBKVVcGKT/C74RqwSa1B qUSDYpILt7gsTYZ7QNSrXBWsFScxl3omhmJiREfBpMMkmWTb0cjc6NCS9iVQ+Au+ /aDcY0nqk8+BwnrNlMoRiQPszpt72+3N3ypN0lHAunKmu4cbOZu0d7SFVvpqO1NN 4swQz6QTIrMpwCQPMlS/QTHyAjt9zpx5/0Ma0Dg4dSrsNpeH0B868z76mXvusZsf iqaDGJ2EfnSsPOH+ttK177nrI1g9NgzYWNerAP15YXY0u6ODpqXfugDNX1nwBIQD ILs2Ce1u2e+aguMnduSfcN49CK7NdFuFn7W5+HeU/MJNhH3QJtWLQb3Jg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3yr320r339-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Jun 2024 15:39:53 +0000 (GMT) Received: from m0353725.ppops.net (m0353725.ppops.net [127.0.0.1]) by pps.reinject (8.18.0.8/8.18.0.8) with ESMTP id 45DFdqjx002506; Thu, 13 Jun 2024 15:39:52 GMT Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3yr320r336-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Jun 2024 15:39:52 +0000 (GMT) Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 45DFQIkC020048; Thu, 13 Jun 2024 15:39:51 GMT Received: from smtprelay04.fra02v.mail.ibm.com ([9.218.2.228]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3yn34nh0cs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Jun 2024 15:39:51 +0000 Received: from smtpav07.fra02v.mail.ibm.com (smtpav07.fra02v.mail.ibm.com [10.20.54.106]) by smtprelay04.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 45DFdjs034407104 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 13 Jun 2024 15:39:47 GMT Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8F1C12004F; Thu, 13 Jun 2024 15:39:45 +0000 (GMT) Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1CB012004E; Thu, 13 Jun 2024 15:39:45 +0000 (GMT) Received: from black.boeblingen.de.ibm.com (unknown [9.155.200.166]) by smtpav07.fra02v.mail.ibm.com (Postfix) with ESMTP; Thu, 13 Jun 2024 15:39:45 +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 v4 23/35] s390/checksum: Add a KMSAN check Date: Thu, 13 Jun 2024 17:34:25 +0200 Message-ID: <20240613153924.961511-24-iii@linux.ibm.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240613153924.961511-1-iii@linux.ibm.com> References: <20240613153924.961511-1-iii@linux.ibm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: ulTkjm7pMVe1lJk0PKbDneTOx4OY0nhv X-Proofpoint-ORIG-GUID: 9ji9F25my1L1xSdWHnNVFlCBm10zOxYa X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-13_09,2024-06-13_02,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 impostorscore=0 mlxscore=0 adultscore=0 mlxlogscore=936 spamscore=0 suspectscore=0 phishscore=0 priorityscore=1501 clxscore=1015 lowpriorityscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405170001 definitions=main-2406130112 Add a KMSAN check to the CKSM inline assembly, similar to how it was done for ASAN in commit e42ac7789df6 ("s390/checksum: always use cksm instruction"). Acked-by: Alexander Gordeev Reviewed-by: Alexander Potapenko Signed-off-by: Ilya Leoshkevich --- arch/s390/include/asm/checksum.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/s390/include/asm/checksum.h b/arch/s390/include/asm/checksum.h index b89159591ca0..46f5c9660616 100644 --- a/arch/s390/include/asm/checksum.h +++ b/arch/s390/include/asm/checksum.h @@ -13,6 +13,7 @@ #define _S390_CHECKSUM_H #include +#include #include static inline __wsum cksm(const void *buff, int len, __wsum sum) @@ -23,6 +24,7 @@ static inline __wsum cksm(const void *buff, int len, __wsum sum) }; instrument_read(buff, len); + kmsan_check_memory(buff, len); asm volatile("\n" "0: cksm %[sum],%[rp]\n" " jo 0b\n" -- 2.45.1