Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3368161pxv; Sun, 18 Jul 2021 20:45:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymRnlwZOwrLPilzv69SX696XWwjq/TE5rqY4XX7IeNEDcADad0gfocZGlUsgoNVYdO+a2/ X-Received: by 2002:a05:6402:298:: with SMTP id l24mr31689952edv.125.1626666312541; Sun, 18 Jul 2021 20:45:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626666312; cv=none; d=google.com; s=arc-20160816; b=c0eQF6wfnJJ2N+jsoNM4TIwSB/b8jhc1Kgr6tQLsMDBCKFS7gQf8fpnDkUWD+qThB+ E75B7KrWuEKKiQ1OBgtfBmwUVsaNuvoUuLGTujba+zcnp8UyJdh48BItyxQ2q5Sa9VSv mPgcDISPl0fqcNXFv1NM69xgyApGopbZCVPrNpbzj5V6lYHLNpcWACs4/j9UZdoJQUu7 RT1AF69/kIAe/hOd1Xo2c01OjEgiDlUY6zprfq1QhAcV9725DxsEUpESwbDKSzfr3a+n jXWhB2qfln2k4TcW374bRFZE0YE3ocp7Nu8nLtsBp/ZxN/ZPwI2qEA2cKi98wQw/7vhj LqAw== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=ONoVQ5THxMhl7DPI15ZFDi8zxLFgdWafLvVkEUKpWG8=; b=IvWwjC/ljCib6avL3Lk8KcoPIyq5l8bQCGharp/r8dRvPjl2nsEjoqFM6+/jEFMBls veqhIcRM+SRQlPlXsWENjo8WYwOcchWC1uNmwAP+A/QClOHsvPfMQyLtu7VtYzGImko8 ObhiNr4f2F5iVFrJdCf0Qf+wtOBuMgEKic89Dy3ukIfjcXtJoCSNOdqBu38ddOrSL8uf iHfptJP4VEVJnbn6+KptINirTM/HKzuhw6PJkz3GPzF4orKhR6qdnUnZYbtNCTacb5iU Z3AQLzgpenC4ldE/Z47ds3tG0X9cGXGzTWcTBiG5UPfS7gV83i9sv+qLzR0GUQgpvFJG x5mg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t5si18517530eds.212.2021.07.18.20.44.50; Sun, 18 Jul 2021 20:45:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234495AbhGSDqQ (ORCPT + 99 others); Sun, 18 Jul 2021 23:46:16 -0400 Received: from mail-wr1-f43.google.com ([209.85.221.43]:43954 "EHLO mail-wr1-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234437AbhGSDqP (ORCPT ); Sun, 18 Jul 2021 23:46:15 -0400 Received: by mail-wr1-f43.google.com with SMTP id a13so20094354wrf.10; Sun, 18 Jul 2021 20:43:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=ONoVQ5THxMhl7DPI15ZFDi8zxLFgdWafLvVkEUKpWG8=; b=SJMlUJ/O3c/KVMiispzCA4uwK66gpoK0mpIuqQyMiJzcgCdSEA6zSZ8IBVtOIE9lUc 1X0/G49Q1afRtdwiskNCeym7bB5ijf4ZDf8aERF3UMtUjvWJtIjo3Cyo4uCMSfUHpH14 UcXezIdFWRqVpzRutjRoz/kY+Je9HteqEJPbO/sEo5FFSfnB4RGnyD0KmfwJutJGv+2o NU9/qZKQ3SW7qyfSiZXT075hNeMNKixRCd2AHt/0UfZ/sIi7GgU8penlzDoFUsk24+Yz aybNssXBWwaH5F8pYCDBt6adcjqyrCwlV126v9t9Mj8iCFaNIkZuPKhjQYtB1wu2faZZ i3YQ== X-Gm-Message-State: AOAM533xlMVSsm9hCTbD+I/rxM7dTcNphrTPzRfDPN7uKZ9AV3/CwHVP fr1plYxfXpIlYeSSdtW0cdI= X-Received: by 2002:a5d:5552:: with SMTP id g18mr1884088wrw.333.1626666195718; Sun, 18 Jul 2021 20:43:15 -0700 (PDT) Received: from rocinante ([95.155.85.46]) by smtp.gmail.com with ESMTPSA id b15sm5575905wru.97.2021.07.18.20.43.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Jul 2021 20:43:15 -0700 (PDT) Date: Mon, 19 Jul 2021 05:43:13 +0200 From: Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= To: Kunihiko Hayashi Cc: Kishon Vijay Abraham I , Lorenzo Pieralisi , Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] PCI: endpoint: Use sysfs_emit() in "show" functions Message-ID: <20210719034313.GA274232@rocinante> References: <1626662666-15798-1-git-send-email-hayashi.kunihiko@socionext.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1626662666-15798-1-git-send-email-hayashi.kunihiko@socionext.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Hayashi-san, Thank you for sending the patch over! > Convert sprintf() in sysfs "show" functions to sysfs_emit() in order to > check for buffer overruns in sysfs outputs. Nice catch! A small nitpick: what you are changing here are technically not sysfs objects since all of these are related to configfs. Having said that, configfs shares the same semantics for normal attributes with sysfs, so a maximum size of PAGE_SIZE applies here too, and thus sysfs_emit() would work fine. Thank you for taking care of this! Reviewed-by: Krzysztof WilczyƄski Krzysztof