Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp7148506rwd; Tue, 6 Jun 2023 07:03:11 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6OsYtA9SIpzZpDlMx2WpQEVDgkPJfqpkYhOJosuLP/gu3U5dZUSvbB/4GBEAlPTXX+aiui X-Received: by 2002:a05:620a:2913:b0:75b:23a1:830b with SMTP id m19-20020a05620a291300b0075b23a1830bmr2753465qkp.6.1686060191559; Tue, 06 Jun 2023 07:03:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686060191; cv=none; d=google.com; s=arc-20160816; b=x9axYzY3oBHAkYNqHJVcihiQ6zLPmQigzE0MyyVGRNNv2/g3UJsHakf3NEy7HQ9dCx lDb0TcCCL3nnkBNtpMa3ypl3/uYuruFhnnW6o+YzD9jn9YP0aN6MMTJRHNthUQPinetA bmhHiW3TIVQeKpLd/rtgTdz6t2ZznOJchxCO5joXhXaHSgujc0wHo+jv1rx6uk8Y9h5w mLQ21OQ0Aq5WyZWHNt+d+cTHU/CvC5k/R6kGi9mxCN8IXygOUCmTO0ROfzreEXrYl3tV K+orDPWqm8nxrq5OlJ8+eOT/md/z9VzSTGWVYKrhuhYNKPqBomEVfYOHSRhidKX8PiFT OzAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=uuTXB1/13i8UKUnrmZMw8IqxKocp9zYcPYHvJb6RT6g=; b=SAJV8oQ4Ar4sDwqbrNmafQNBH6640u/8rL16K74eRTx0IQ4gtO8VS4YQy5emYZYVBI Ay9ZKSk8D/AQQE6O+NphoEbotpBf2QI7b1epHAnMc2g3dm1FE6YzyDya8K1/65d1hllr n3LKOOImlocKlCG+Eg8lQ6om46J43IG8wCUjDVYRBvneVoMvjg9/9blOgyQLlDmsZNDa QXwPRK8YdObCLA6ISpYXnHNoIdA9j7myYKqWXBuEVDVW7tSNe3UyFFw9HlS3kOL3pUnt gRt6H3YSMmEC6HL/0GTwmA2bsp9vPir7KIrEK3zzhQuF3Lt9DBph2YXebpwRjKgmLS5x WtJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=Q1Bfn9js; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o16-20020a05620a111000b0075d59dec7desi3282827qkk.456.2023.06.06.07.02.55; Tue, 06 Jun 2023 07:03:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=Q1Bfn9js; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237310AbjFFNuc (ORCPT + 99 others); Tue, 6 Jun 2023 09:50:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232541AbjFFNub (ORCPT ); Tue, 6 Jun 2023 09:50:31 -0400 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44B0A83; Tue, 6 Jun 2023 06:50:30 -0700 (PDT) Received: from pps.filterd (m0356516.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 356DifJq027703; Tue, 6 Jun 2023 13:50:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=uuTXB1/13i8UKUnrmZMw8IqxKocp9zYcPYHvJb6RT6g=; b=Q1Bfn9jsqePBTWAcJZS13SIEHaQ0EwxiFSaWAd0u6GbT4/GcZ+q0y4p8LZZ6MyWpD7IZ 210nIj4B9GXY4WMd+NPAX++kAUTD/SX0tGBSMknqzpoBxHtc3HsMDvKKu5KJjzfafUt7 z4pbsuaikuPs/GKPYSi7M+zhS8jsaBfrpAATYFZjHZVBF99FB08JdZpYZ6x+fvHsFbQP OZxQJQ7ooNWB3++aoSg/18Kw9uSpxq0T1KZvy7XfQTyr6yrLuU75di5kxxNyGhzHm3ae eU2lV+5Y2nPYi7huGwkdh59Hug8I/TbC4iaN6Jo98NZ8i3ufDIVIKWlxOuq9GesU6Phx Hg== Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3r25xu85en-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 06 Jun 2023 13:50:29 +0000 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 3566NghN021520; Tue, 6 Jun 2023 13:50:27 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma06ams.nl.ibm.com (PPS) with ESMTPS id 3qyxmyj085-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 06 Jun 2023 13:50:27 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 356DoNI058327308 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 6 Jun 2023 13:50:23 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 112352004B; Tue, 6 Jun 2023 13:50:23 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8AA0220043; Tue, 6 Jun 2023 13:50:22 +0000 (GMT) Received: from [9.171.79.116] (unknown [9.171.79.116]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 6 Jun 2023 13:50:22 +0000 (GMT) Message-ID: <71a88dc7-dc27-937a-5e93-f74512f7a307@linux.ibm.com> Date: Tue, 6 Jun 2023 15:50:22 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v3 5/6] s390/uv: replace scnprintf with sysfs_emit Content-Language: en-US To: Steffen Eiden , kvm@vger.kernel.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, Viktor Mihajlovski Cc: Claudio Imbrenda , Nico Boehr , Christian Borntraeger , Heiko Carstens , Hendrik Brueckner References: <20230606113736.2934503-1-seiden@linux.ibm.com> <20230606113736.2934503-6-seiden@linux.ibm.com> From: Janosch Frank In-Reply-To: <20230606113736.2934503-6-seiden@linux.ibm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: ARQiWZxJ43WVeMG7h3Ly4uUxgOyh5d8n X-Proofpoint-ORIG-GUID: ARQiWZxJ43WVeMG7h3Ly4uUxgOyh5d8n X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-06-06_08,2023-06-06_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 mlxscore=0 malwarescore=0 suspectscore=0 spamscore=0 clxscore=1015 adultscore=0 impostorscore=0 mlxlogscore=999 lowpriorityscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2306060115 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/6/23 13:37, Steffen Eiden wrote: > Replace scnprintf(page, PAGE_SIZE, ...) with the page size aware > sysfs_emit(buf, ...) which adds some sanity checks. > > Signed-off-by: Steffen Eiden > --- > arch/s390/kernel/uv.c | 54 +++++++++++++++++++------------------------ > 1 file changed, 24 insertions(+), 30 deletions(-) > > diff --git a/arch/s390/kernel/uv.c b/arch/s390/kernel/uv.c > index cb2ee06df286..cd3a591edab3 100644 > --- a/arch/s390/kernel/uv.c > +++ b/arch/s390/kernel/uv.c > @@ -460,13 +460,13 @@ EXPORT_SYMBOL_GPL(arch_make_page_accessible); > static struct kobj_attribute uv_query_supp_att_pflags_attr = > @@ -605,7 +599,7 @@ static ssize_t uv_is_prot_virt_guest(struct kobject *kobj, > #ifdef CONFIG_PROTECTED_VIRTUALIZATION_GUEST > val = prot_virt_guest; > #endif > - return scnprintf(page, PAGE_SIZE, "%d\n", val); > + return sysfs_emit(page, "%d\n", val); > } > > static ssize_t uv_is_prot_virt_host(struct kobject *kobj, > @@ -617,7 +611,7 @@ static ssize_t uv_is_prot_virt_host(struct kobject *kobj, > val = prot_virt_host; > #endif > > - return scnprintf(page, PAGE_SIZE, "%d\n", val); > + return sysfs_emit(page, "%d\n", val); > } These are still named page