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,URIBL_BLOCKED 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 2D6F2C433EF for ; Thu, 9 Sep 2021 06:05:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 18B2560F43 for ; Thu, 9 Sep 2021 06:05:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351030AbhIIGGe (ORCPT ); Thu, 9 Sep 2021 02:06:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:43648 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230416AbhIIGGa (ORCPT ); Thu, 9 Sep 2021 02:06:30 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AAAF161179; Thu, 9 Sep 2021 06:05:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631167521; bh=+J4KXjBeG3cAtBstnQyJvR39htCdgo/LRw5guWIeF9E=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iV15742uImo5txCs9urHsllg1qEkqhE26niC0ZUGAnvsHV+9O486KrEZLM0Uts8// 4HxCGHYy2+XZJGev7MFI8QzDWS1eXl52KM0aBdVriYUK09hXbnC/l9zeC8sjgms6xe cMmk8njji8/Tf3rivsNI9C1qyS4G9dd42Rd4b+pY= Date: Thu, 9 Sep 2021 08:05:18 +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 Thu, Sep 09, 2021 at 05:31:40AM +0000, Yu, Lang wrote: > [AMD Official Use Only] > > > > >-----Original Message----- > >From: Greg Kroah-Hartman > >Sent: Thursday, September 9, 2021 1:19 PM > >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 > > > >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? > > > Indeed, the one value per file rule was broken... Thanks. Great, which file is that so we can fix it! thanks, greg k-h