From: Xenia Ragiadakou <burzalodowa@gmail.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Juergen Gross <jgross@suse.com>, xen-devel@lists.xenproject.org
Subject: Re: [PATCH v2] xen/hypfs: check the return value of snprintf to avoid leaking stack accidently
Date: Thu, 4 Aug 2022 16:16:01 +0300 [thread overview]
Message-ID: <43bbcdfb-a6f7-53b3-e7dc-899ac9ea038c@gmail.com> (raw)
In-Reply-To: <81276568-232d-b068-0237-f888ecb1ca91@suse.com>
On 8/4/22 16:13, Jan Beulich wrote:
> On 04.08.2022 15:10, Xenia Ragiadakou wrote:
>> On 8/4/22 16:01, Jan Beulich wrote:
>>> On 04.08.2022 14:47, Xenia Ragiadakou wrote:
>>>> Changes in v2:
>>>> - add ASSERT_UNREACHABLE()
>>>
>>> Hmm, this ...
>>>
>>>> --- a/xen/common/hypfs.c
>>>> +++ b/xen/common/hypfs.c
>>>> @@ -377,8 +377,10 @@ int hypfs_read_dyndir_id_entry(const struct hypfs_entry_dir *template,
>>>> unsigned int e_namelen, e_len;
>>>>
>>>> e_namelen = snprintf(name, sizeof(name), template->e.name, id);
>>>> - if ( e_namelen >= sizeof(name) )
>>>> + if ( e_namelen >= sizeof(name) ) {
>>>> + ASSERT_UNREACHABLE();
>>>> return -ENOBUFS;
>>>> + }
>>>
>>> ... looks to be an incremental patch on top of v1, not v2 of that
>>> patch?
>>
>> So, here, IIUC, I have to create a patch series and add the assert in
>> the second (2/2) patch? What should be the version number of the series?
>
> No, why? Simply fold this change into the earlier one, and call the
> result v3.
Okkk, I just realized what I have done.
--
Xenia
next prev parent reply other threads:[~2022-08-04 13:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-04 12:47 [PATCH v2] xen/hypfs: check the return value of snprintf to avoid leaking stack accidently Xenia Ragiadakou
2022-08-04 13:01 ` Jan Beulich
2022-08-04 13:10 ` Xenia Ragiadakou
2022-08-04 13:13 ` Jan Beulich
2022-08-04 13:16 ` Xenia Ragiadakou [this message]
2022-08-04 13:02 ` Juergen Gross
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=43bbcdfb-a6f7-53b3-e7dc-899ac9ea038c@gmail.com \
--to=burzalodowa@gmail.com \
--cc=jbeulich@suse.com \
--cc=jgross@suse.com \
--cc=xen-devel@lists.xenproject.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.