Messages in this thread | | | From | "Yu, Lang" <> | Subject | RE: [PATCH] sysfs: Remove page boundary align limitation on sysfs_emit and sysfs_emit_at | Date | Thu, 9 Sep 2021 05:31:40 +0000 |
| |
[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
| |