From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67A83C433F5 for ; Thu, 9 Sep 2021 05:19:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 51631600D4 for ; Thu, 9 Sep 2021 05:19:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350705AbhIIFU6 (ORCPT ); Thu, 9 Sep 2021 01:20:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:41852 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350703AbhIIFU4 (ORCPT ); Thu, 9 Sep 2021 01:20:56 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2E43C61139; Thu, 9 Sep 2021 05:19:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631164787; bh=B4SAHApMAPHV+o8srC8bZZpT4//0AtT8m/RZFLiyaRw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=SHJrqFkZRuypi27v5wVFXNpmTNv75JMrJF2rODli0iDaH1xqgvAYb38+zL57xhjka 612kZDf0KZqLG0y5LUzAFBjm+mNmh3L/dHnz/Ulv5xmEbD1d3C+YZnW4yIn6RBT0Ee 1IHEraEKSCTqYCbYr2wKFt/j+UTHZyxdNp3IE3ak= Date: Thu, 9 Sep 2021 07:19:25 +0200 From: Greg Kroah-Hartman To: "Yu, Lang" Cc: Joe Perches , "Rafael J . Wysocki" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] sysfs: Remove page boundary align limitation on sysfs_emit and sysfs_emit_at Message-ID: References: <20210908120723.3920701-1-lang.yu@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 08, 2021 at 03:33:51PM +0000, Yu, Lang wrote: > >Please feel free to add better documentation for the functions if you feel people > >are getting confused, do not change the existing behavior of the code as it rightly > >caught it being misused. > > You can find many patches named "convert sysfs scnprintf/snprintf to syfs_emit/sysfs_emit_at". > or "use sysfs_emit/sysfs_emit_at in show functions". They may think it's better to use syfs_emit/sysfs_emit_at > given its overrun avoidance. Yes, and using that in sysfs functions is fine, there is nothing wrong with this usage. > But there are still some corner cases(e.g., a non page boundary aligned buf address : ). I need a specific example of where this has gone wrong. Please provide a lore.kernel.org link as I fail to see the problem here. Are you sure that you are not just abusing sysfs and having more than one value per file? Does this mean I need to go audit all of the gpu sysfs file entries? thanks, greg k-h