From: Greg KH <gregkh@linuxfoundation.org>
To: Xia Fukun <xiafukun@huawei.com>
Cc: prajnoha@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kobject: Fix global-out-of-bounds in kobject_action_type()
Date: Tue, 7 Mar 2023 10:58:25 +0100 [thread overview]
Message-ID: <ZAcKwV4if7/1dCZV@kroah.com> (raw)
In-Reply-To: <50e3be73-5fb1-0505-6ddb-422cee6e466b@huawei.com>
On Tue, Mar 07, 2023 at 05:49:25PM +0800, Xia Fukun wrote:
> I know how to modify it to meet your requirements:
Again, please stop top-posting, as I can't follow what you are trying to
do here at all otherwise.
>
> for (action = 0; action < ARRAY_SIZE(kobject_actions); action++) {
> if (strncmp(kobject_actions[action], buf, count_first) != 0)
> continue;
> if (strlen(kobject_actions[action]) > count_first)
> continue;
> if (args)
> *args = args_start;
> *type = action;
> ret = 0;
> break;
> }
>
> So I will modify the patch and resubmit it. Please review it again
Please test your change and submit it and then I will add it to my
review queue like everything else I get :)
But again, this whole function feels very fragile, shouldn't it be
rewritten to be more clear?
thanks,
greg k-h
prev parent reply other threads:[~2023-03-07 9:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-07 6:37 [PATCH] kobject: Fix global-out-of-bounds in kobject_action_type() Xia Fukun
2023-03-07 8:16 ` Greg KH
2023-03-07 9:08 ` Xia Fukun
2023-03-07 9:27 ` Greg KH
2023-03-07 9:49 ` Xia Fukun
2023-03-07 9:58 ` Greg KH [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZAcKwV4if7/1dCZV@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=prajnoha@redhat.com \
--cc=xiafukun@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox