Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp2130302rdf; Mon, 6 Nov 2023 05:44:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IGtt0YEnCkEKFb+2ymXGc5WnfceoofI0JEL83qa2lj+zphmiAE492djbqhRmPvdrn6ghOrJ X-Received: by 2002:a17:902:f394:b0:1c5:f0fd:51be with SMTP id f20-20020a170902f39400b001c5f0fd51bemr22681982ple.69.1699278240674; Mon, 06 Nov 2023 05:44:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699278240; cv=none; d=google.com; s=arc-20160816; b=Ww/ZfSxz3uNQ1hCUDng5E34GV/eTWARoyTW5xaW8sZp//xUp84Zzod4SUdeDmJNPw0 K21/EYKSce/YoTq7NJ8cSO3wFpE3/0xtjkg/GbROtSyuub/L70a7YJLBSNcY0Zyw3HLN xhWqQRrpE0/YLTXiPqj2OjUwjpXQrP844f/OwIt2M3yOoM2yXu3JNaJ/OEblmKyu701P 2BNcIXtDJZJot2sRKF03qM7gNiWBYh1SNh2rYAMN2hess0t02RhGrB1eBg/wMDEtfyEM HcQMkQAQpk6S83+2nVC20m+KMvifO+akMevuXbnKmFQzDPd2ESf602hOgf4eKtUe3uTf mgdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=YZp4oLK5iXzn4ExIqPYZzqPlL5iac2fpiMqDfzauBNw=; fh=MmjkAU/8KKYeeTUjbFaA5PWZLggz1Sf3CyOCNCFQVeU=; b=goqWKwmchfxpvVmr/HSdHVZEw0lvDld3BGJHZ+gGqFCxyIvblVld7xiAWGzSFLBiZT 5aHtct9f+b0bmbYwI1DhvwDoW2Ak4UEJsjfK0PnOrDYIlFj1DicpxWyqvQWUeLeWxNqS J4v4eOxP/a3UK0M4CtvNwnjJqUIs8BMShHEprDzQqcx8+PCwxvWMBbhm4yG/Ad+wvNfn NwD5/sydbQV0sQs25S+fousy7pBTu/EU/P4p2MfHcFCYMjoFkwTChYF3uPbUjVjqT5qA PLOQYLjtedOm9LOzFrGPGNYHvFB/pZWfIVvO2juFknlVIFgO6xnmyZob2Efu7NF/Jd3P DWyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=JI1Cnh1z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id l8-20020a170903244800b001bb3bcd05bbsi8361408pls.471.2023.11.06.05.44.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 05:44:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=JI1Cnh1z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (Postfix) with ESMTP id 1D6848068211; Mon, 6 Nov 2023 05:43:58 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231872AbjKFNnk (ORCPT + 99 others); Mon, 6 Nov 2023 08:43:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230192AbjKFNnh (ORCPT ); Mon, 6 Nov 2023 08:43:37 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D430CBF; Mon, 6 Nov 2023 05:43:34 -0800 (PST) Received: from pps.filterd (m0360083.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A6Coo77004819; Mon, 6 Nov 2023 13:43:34 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=pp1; bh=YZp4oLK5iXzn4ExIqPYZzqPlL5iac2fpiMqDfzauBNw=; b=JI1Cnh1z60/7ibR0HLg0C1sizeHkW7P6MMfA41O44AsEOLIOGhMOo7UjkZdbbqEgm+ch gA+w0VG+W6EFKEpGbN5xM2yGwqyvOarhKbozg/MHMnhEJ9OLuxEACAMszzR9b0N7j3LH IuzDOwd0JFhLJ5BvTVhUxX1Dtw+TzWJpbQFbALvXYn/JNb4uekYBFD2uvIYrFNpiPjJT mOsX7hEKSfAfWxjmswi3upL0UlF9k/xHmA4ZGs6GlLwx2Ftbajs5bEnkh78v1vL+1a49 EeCANwkynoJX3etP9e+GrnlbtrRUehFI4+bylFnlhYzgWaexFjEOIAzK5yZ/TFJ1sYsU 2A== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3u705rj62t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Nov 2023 13:43:34 +0000 Received: from m0360083.ppops.net (m0360083.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3A6DC43r026866; Mon, 6 Nov 2023 13:43:33 GMT Received: from ppma11.dal12v.mail.ibm.com (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3u705rj62b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Nov 2023 13:43:33 +0000 Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1]) by ppma11.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 3A6D4vQQ016958; Mon, 6 Nov 2023 13:43:33 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 3u6301h1bp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Nov 2023 13:43:32 +0000 Received: from smtpav07.fra02v.mail.ibm.com (smtpav07.fra02v.mail.ibm.com [10.20.54.106]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3A6DhRSP11076212 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 6 Nov 2023 13:43:27 GMT Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F245120040; Mon, 6 Nov 2023 13:43:26 +0000 (GMT) Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5070B20043; Mon, 6 Nov 2023 13:43:26 +0000 (GMT) Received: from osiris (unknown [9.171.27.3]) by smtpav07.fra02v.mail.ibm.com (Postfix) with ESMTPS; Mon, 6 Nov 2023 13:43:26 +0000 (GMT) Date: Mon, 6 Nov 2023 14:43:24 +0100 From: Heiko Carstens To: Nina Schoetterl-Glausch Cc: David Hildenbrand , Alexander Gordeev , Claudio Imbrenda , Christian Borntraeger , Vasily Gorbik , Janosch Frank , David Hildenbrand , Cornelia Huck , linux-s390@vger.kernel.org, Sven Schnelle , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Mueller Subject: Re: [PATCH 2/4] KVM: s390: vsie: Fix length of facility list shadowed Message-ID: <20231106134324.12197-B-hca@linux.ibm.com> References: <20231103173008.630217-1-nsg@linux.ibm.com> <20231103173008.630217-3-nsg@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-TM-AS-GCONF: 00 X-Proofpoint-GUID: VWtgHUFx8d9AAqCwkp6KIM0A5_ZH2oUJ X-Proofpoint-ORIG-GUID: N8lA1Ldrmw2cU4pgGuYc8wa-U2l_4O0z X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-06_12,2023-11-02_03,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 malwarescore=0 impostorscore=0 lowpriorityscore=0 priorityscore=1501 mlxscore=0 spamscore=0 mlxlogscore=404 clxscore=1011 phishscore=0 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2310240000 definitions=main-2311060110 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 groat.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 (groat.vger.email [0.0.0.0]); Mon, 06 Nov 2023 05:43:58 -0800 (PST) On Mon, Nov 06, 2023 at 02:06:22PM +0100, Nina Schoetterl-Glausch wrote: > > > +unsigned int stfle_size(void) > > > +{ > > > + static unsigned int size = 0; > > > + u64 dummy; > > > + > > > + if (!size) { > > > + size = __stfle_asm(&dummy, 1) + 1; > > > + } Please get rid of the braces here. checkpatch.pl with "--strict" should complain too, I guess. > > Possible races? Should have to use an atomic? > > Good point. Calling __stfle_asm multiple times is fine > and AFAIK torn reads/writes aren't possible. I don't see a way > for the compiler to break things either. > But it might indeed be nicer to use an atomic, without > any downsides. Please use WRITE_ONCE() and READ_ONCE(); that's more than sufficient here.