linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
To: Jes Sorensen <jes@trained-monkey.org>
Cc: colyli@suse.de, linux-raid@vger.kernel.org
Subject: Re: [PATCH 3/3] Limit length and set of characters allowed of devname
Date: Tue, 14 Mar 2023 09:14:58 +0100	[thread overview]
Message-ID: <20230314091458.00005c53@linux.intel.com> (raw)
In-Reply-To: <6ee775b9-291a-a2e7-1b30-3fc8e103e60d@trained-monkey.org>

On Mon, 13 Mar 2023 10:22:47 -0400
Jes Sorensen <jes@trained-monkey.org> wrote:

> On 12/21/22 06:50, Mariusz Tkaczyk wrote:
> > When the user creates a device with a name that contains whitespace,
> > mdadm timeouts and throws an error. This issue is caused by udev, which
> > truncates /dev/md link until the first whitespace.
> > 
> > This patch introduces prohibition of characters other than A-Za-z0-9.-_
> > in the device name. Also, it prohibits using leading "-" in device name,
> > so name won't be confused with cli parameter.
> > Set of allowed characters is taken from POSIX 3.280 Portable Character
> > Set. Also, device name length now is limited to NAME_MAX.
> > 
> > In some places there are other requirements for string length (e.g. size
> > up to MD_NAME_MAX for device name). This routine is made to follow POSIX
> > and other, more strict limitations should be checked separately.
> > We are aware of the risk of regression in exceptional cases (as
> > escape_devname function is removed) that should be fixed by updating
> > the array name.
> > 
> > The posix validation is added for:
> > - 'name' parameter in every mode.
> > - secondary device name (first devlist entry), only for create and
> > assembly.
> > 
> > To limit regression risk, config entries are excluded from POSIX
> > validation.
> > 
> > Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>  
> 
> Hi Mariusz,
> 
> This no longer applies cleanly. Any chance you can post an updated version?
> 

Hi Jes,
Working on next version. I think that I omitted one place, need to dig into
again. I should make a test for that too.

Thanks,
Mariusz


      reply	other threads:[~2023-03-14  8:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-21 11:50 [PATCH 0/3] Validation for names during creation Mariusz Tkaczyk
2022-12-21 11:50 ` [PATCH 1/3] mdadm: create ident_init() Mariusz Tkaczyk
2022-12-28 15:05   ` Jes Sorensen
2022-12-21 11:50 ` [PATCH 2/3] mdadm: refactor ident->name handling Mariusz Tkaczyk
2022-12-28 15:07   ` Jes Sorensen
2022-12-29  9:39     ` Mariusz Tkaczyk
2023-01-09 10:51       ` Mariusz Tkaczyk
2023-03-02 14:52       ` Jes Sorensen
2023-03-03 12:04         ` Mariusz Tkaczyk
2023-03-08 19:04           ` Jes Sorensen
2023-03-09  8:02             ` Mariusz Tkaczyk
2023-03-10 14:43               ` Jes Sorensen
2022-12-21 11:50 ` [PATCH 3/3] Limit length and set of characters allowed of devname Mariusz Tkaczyk
2023-03-13 14:22   ` Jes Sorensen
2023-03-14  8:14     ` Mariusz Tkaczyk [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=20230314091458.00005c53@linux.intel.com \
    --to=mariusz.tkaczyk@linux.intel.com \
    --cc=colyli@suse.de \
    --cc=jes@trained-monkey.org \
    --cc=linux-raid@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).