mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ian Kent <raven@themaw.net>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Siddhesh Poyarekar <siddhesh@gotplt.org>,
	David Howells <dhowells@redhat.com>,
	Miklos Szeredi <miklos@szeredi.hu>,
	Carlos Maiolino <cmaiolino@redhat.com>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] vfs: parse: deal with zero length string value
Date: Wed, 29 Jun 2022 09:06:13 +0800	[thread overview]
Message-ID: <e2c566f9-47e4-cfdc-ad4a-426ecdfb16e4@themaw.net> (raw)
In-Reply-To: <YrtAqQoyFG/6Y4un@ZenIV>


On 29/6/22 01:55, Al Viro wrote:
> On Tue, Jun 28, 2022 at 08:30:52AM +0800, Ian Kent wrote:
>> Parsing an fs string that has zero length should result in the parameter
>> being set to NULL so that downstream processing handles it correctly.
>> For example, the proc mount table processing should print "(none)" in
>> this case to preserve mount record field count, but if the value points
>> to the NULL string this doesn't happen.
> 	Hmmm...  And what happens if you feed that to ->parse_param(), which
> calls fs_parse(), which decides that param->key looks like a name of e.g.
> u32 option and calls fs_param_is_u32() to see what's what?  OOPS is a form
> of rejection, I suppose, but...

Oh ... yes, would you be ok with an update that moves the

"param.type = fs_value_is_string;" inside the above else

clause?


Ian


  reply	other threads:[~2022-06-29  1:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-28  0:30 [PATCH 0/2] vfs: fix a couple of mount table handling problems Ian Kent
2022-06-28  0:30 ` [PATCH 1/2] vfs: parse: deal with zero length string value Ian Kent
2022-06-28 17:55   ` Al Viro
2022-06-29  1:06     ` Ian Kent [this message]
2022-07-01  6:29       ` Ian Kent
2022-06-28  0:30 ` [PATCH 2/2] vfs: escape hash as well Ian Kent
2022-06-28 17:57   ` Al Viro
  -- strict thread matches above, loose matches on Subject: below --
2022-06-17  5:08 [PATCH 0/2] vfs: fix a couple of mount table handling problems Ian Kent
2022-06-17  5:09 ` [PATCH 1/2] vfs: parse: deal with zero length string value Ian Kent
2022-06-28 13:03   ` Christian Brauner
2021-10-25  4:05 Ian Kent

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=e2c566f9-47e4-cfdc-ad4a-426ecdfb16e4@themaw.net \
    --to=raven@themaw.net \
    --cc=akpm@linux-foundation.org \
    --cc=cmaiolino@redhat.com \
    --cc=dhowells@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=siddhesh@gotplt.org \
    --cc=viro@zeniv.linux.org.uk \
    /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

all inboxes | Powered by JetHome®