Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5654510rdb; Wed, 13 Dec 2023 15:38:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IEYtzLZcQijc4jMZc1lnDqhbeJK+Sw3QjSl1Iir7KRjH93AYfgndEhGZgUg3musu0vqdvPb X-Received: by 2002:a05:6a00:10c3:b0:6ce:7d6:c317 with SMTP id d3-20020a056a0010c300b006ce07d6c317mr4891166pfu.15.1702510704684; Wed, 13 Dec 2023 15:38:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702510704; cv=none; d=google.com; s=arc-20160816; b=b8AKp7Iu9UdfTVEuVgSKjgUXKarRePwkjKbwmZsoVNwGn1Y220ILJ+dpTl/c2S+9J5 qoCW8ylVGQPv5fwlF4+9Rl9xushJ56DgSrLtOQbdF+2bdGPlWUIdC1sgr37rJRAwsCwf 0hvsUNlm4JDYg3KjlxYFqTAhKSQvRst3Ca/Og7zy0qsn+Z5SBK4NH4GMIlHFOQnRHsCR qSe+v8foumjxVrUsTfXKm43+hnTCOyjB6UaB63k9XpX9Dd65Pi9ZwF77+SyZWPwfjBTu 72IqFsSKf7/B0B85FVUSRxYFuxqBjE6uwkOSfOASlZhW4RJvP3+YwKuH/A1gw4qIlQ1H SICg== 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=45Nhhyp6yS18GqDvv/f0pUsyfshJSMjjruM4ZPbayJI=; fh=TQATEbdDZNcnk8L2eDP6eFL9HlexFaHIexhR1TH2IlY=; b=yOVpkeHqr/Dt7oZAfCTHMZeb4+8m/hXdhufGCBa2NxgMG1uT0PxMFWa3l3nYH4TZJD znzqICpoKV1tkOP3/gEPxl48fPspV1jsTQULel61E+pbQ1/+QVrKlNApFMYYv5XdjN2Z CZSeClyu4v/tkRRw5q8vRnItjV0vAeMH0l2TGbs85TZDM2cYqOlTtDj/lcPvjZ26H6uO Yz3FT3+9+8YgOqhFPHDXKb3krMbTvDnfPtfPpJakBUtRol1nv/74dpos1XA2blP0+1Q7 1V0uDB5Jb6Y+Vj+e0lGeD7O2fpaaqAWcBupVMOZNN1oB21Ll48q9Fau+rlgYocWy369q ZRsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b="Rl/rKJ6n"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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. [23.128.96.33]) by mx.google.com with ESMTPS id z4-20020a056a00240400b006cbb7e5e06fsi10351586pfh.125.2023.12.13.15.38.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 15:38:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b="Rl/rKJ6n"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 72436802F45F; Wed, 13 Dec 2023 15:38:20 -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 S1442946AbjLMXhk (ORCPT + 99 others); Wed, 13 Dec 2023 18:37:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1442830AbjLMXhK (ORCPT ); Wed, 13 Dec 2023 18:37:10 -0500 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B70D11B1; Wed, 13 Dec 2023 15:37:09 -0800 (PST) Received: from pps.filterd (m0353724.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3BDMNCmT009101; Wed, 13 Dec 2023 23:36:52 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=45Nhhyp6yS18GqDvv/f0pUsyfshJSMjjruM4ZPbayJI=; b=Rl/rKJ6nkVE2aRxzyYavTcSsPfVKwM6J5kCi+1n1VRpgnEGYNbuoHoxzv+5dB8qn6teW 9n/4c1YPv7QIayZNsmMDLjmMRrv822Cv3fMHcYbHrvQU+ohVTmAjqOMm47pdhS/G3iDj xUpznYpzu+OCnQjzW6ReqLnAdLnhgdCsuCdRsAadVUUxqZIKzwWDh7k/S+kk8bTq6YOh 4d/YY5ZXWhq2t8a+8KaF47eiicYUYnA8bH4GMLCBSKbEqgKLnQBKVcUOJ1uqFgXFXKLq yCMUUURBAUAPwvpoOa97uHGoZQ5a3AaM0GQypqkVUPlpAg35JTWiecReQpHntxMoTAU3 GQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3uynbt1cyf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 13 Dec 2023 23:36:52 +0000 Received: from m0353724.ppops.net (m0353724.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3BDNPaWh016517; Wed, 13 Dec 2023 23:36:51 GMT Received: from ppma21.wdc07v.mail.ibm.com (5b.69.3da9.ip4.static.sl-reverse.com [169.61.105.91]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3uynbt1cx8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 13 Dec 2023 23:36:51 +0000 Received: from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1]) by ppma21.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 3BDLqJBT012555; Wed, 13 Dec 2023 23:36:48 GMT Received: from smtprelay04.fra02v.mail.ibm.com ([9.218.2.228]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3uw3jp4na5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 13 Dec 2023 23:36:48 +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 3BDNajA143975038 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 13 Dec 2023 23:36:45 GMT Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9BEF220040; Wed, 13 Dec 2023 23:36:45 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 34F8220043; Wed, 13 Dec 2023 23:36:44 +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:44 +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 23/34] s390/cpacf: Unpoison the results of cpacf_trng() Date: Thu, 14 Dec 2023 00:24:43 +0100 Message-ID: <20231213233605.661251-24-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-GUID: 0dfgWLOx15d8NabICqrWpXu-GD2TJBSN X-Proofpoint-ORIG-GUID: YuP1Sp6QRPB7FpPhup6bxOwBsE2f0Wqq 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 priorityscore=1501 adultscore=0 clxscore=1015 bulkscore=0 mlxscore=0 spamscore=0 suspectscore=0 impostorscore=0 mlxlogscore=768 phishscore=0 lowpriorityscore=0 malwarescore=0 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:20 -0800 (PST) Prevent KMSAN from complaining about buffers filled by cpacf_trng() being uninitialized. Tested-by: Alexander Gordeev Reviewed-by: Alexander Potapenko Signed-off-by: Ilya Leoshkevich --- arch/s390/include/asm/cpacf.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/s390/include/asm/cpacf.h b/arch/s390/include/asm/cpacf.h index b378e2b57ad8..2bb6b4e7e082 100644 --- a/arch/s390/include/asm/cpacf.h +++ b/arch/s390/include/asm/cpacf.h @@ -12,6 +12,7 @@ #define _ASM_S390_CPACF_H #include +#include /* * Instruction opcodes for the CPACF instructions @@ -473,6 +474,8 @@ static inline void cpacf_trng(u8 *ucbuf, unsigned long ucbuf_len, : [ucbuf] "+&d" (u.pair), [cbuf] "+&d" (c.pair) : [fc] "K" (CPACF_PRNO_TRNG), [opc] "i" (CPACF_PRNO) : "cc", "memory", "0"); + kmsan_unpoison_memory(ucbuf, ucbuf_len); + kmsan_unpoison_memory(cbuf, cbuf_len); } /** -- 2.43.0