lkml.org 
[lkml]   [2021]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] sysfs: Remove page boundary align limitation on sysfs_emit and sysfs_emit_at
Date
[AMD Official Use Only]



>-----Original Message-----
>From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>Sent: Thursday, September 9, 2021 1:19 PM
>To: Yu, Lang <Lang.Yu@amd.com>
>Cc: Joe Perches <joe@perches.com>; Rafael J . Wysocki <rafael@kernel.org>;
>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.

Regard,
Lang

>thanks,
>
>greg k-h

\
 
 \ /
  Last update: 2021-09-09 07:32    [W:0.046 / U:0.772 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site