[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DM6PR12MB4250302F4EB80233D5807CB6FBD49@DM6PR12MB4250.namprd12.prod.outlook.com>
Date: Wed, 8 Sep 2021 12:52:43 +0000
From: "Yu, Lang" <Lang.Yu@....com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC: Joe Perches <joe@...ches.com>,
"Rafael J . Wysocki" <rafael@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] sysfs: Remove page boundary align limitation on
sysfs_emit and sysfs_emit_at
[AMD Official Use Only]
Thanks for your reply.
Just curious if we don't put such a limitation, what are the consequences?
If we remove the limitation, sys_emit/sys_emit_at api will be more flexible.
Since the comments of sysfs_emit/ sys_emit_at api are
" sysfs_emit - scnprintf equivalent, aware of PAGE_SIZE buffer. ",
Why not make them more equivalent with scnprintf?
Regards,
Lang
>-----Original Message-----
>From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
>Sent: Wednesday, September 8, 2021 8:32 PM
>To: Yu, Lang <Lang.Yu@....com>
>Cc: Joe Perches <joe@...ches.com>; Rafael J . Wysocki <rafael@...nel.org>;
>linux-kernel@...r.kernel.org
>Subject: Re: [PATCH] sysfs: Remove page boundary align limitation on sysfs_emit
>and sysfs_emit_at
>
>On Wed, Sep 08, 2021 at 08:07:23PM +0800, Lang Yu wrote:
>> The key purpose of sysfs_emit and sysfs_emit_at is to ensure that no
>> overrun is done. Make them more equivalent with scnprintf.
>
>That's not the only purpose.
>
>So why are you changing this?
>
>What in-kernel users are being tripped up by this, shouldn't we fix them instead?
>
>Remember, sysfs files are "one value per file", so why are the boundries not
>properly set here?
>
>thanks,
>
>greg k-h
Powered by blists - more mailing lists