linux-firmware.lore.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Emil Velikov <emil.l.velikov@gmail.com>
To: Josh Boyer <jwboyer@kernel.org>
Cc: linux-firmware@kernel.org, Adam Sampson <ats@offog.org>,
	 David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH RESEND v2 03/16] check_whence, WHENCE, copy-firmware: escape filenames with spaces
Date: Tue, 7 Mar 2023 20:48:21 +0000	[thread overview]
Message-ID: <CACvgo52=SvHghNbNy2WNZXJNqF=YMUX0ECopNB+ngYtudi8EPQ@mail.gmail.com> (raw)
In-Reply-To: <CA+5PVA4B1WN2Hc14suOVRG76ANrgLnzPcUUxMryk+pzjEhUjPQ@mail.gmail.com>

On Tue, 7 Mar 2023 at 18:00, Josh Boyer <jwboyer@kernel.org> wrote:
>
> On Tue, Mar 7, 2023 at 12:30 PM Emil Velikov <emil.l.velikov@gmail.com> wrote:
> >
> > On Tue, 7 Mar 2023 at 14:58, Josh Boyer <jwboyer@kernel.org> wrote:
> > >
> > > On Wed, Mar 1, 2023 at 1:56 PM Emil Velikov via B4 Relay
> > > <devnull+emil.l.velikov.gmail.com@kernel.org> wrote:
> > > >
> > > > From: Emil Velikov <emil.l.velikov@gmail.com>
> > > >
> > > > We have a handful of instances which have space in the filename - just
> > > > escape them (like we do for the symlinks) and drop the extra re pattern.
> > > >
> > > > With this we can also drop the extra sed pattern, stripping out the
> > > > quotation marks.
> > >
> > > While that is all true, why is it necessary?  I suspect patch
> > > submitters are far more likely to forget to escape the spaces than
> > > they are to just include quotes.  I see this change as making it
> > > slightly harder to submit correct patches and I'm not sure it's worth
> > > it.
> > >
> >
> > We already have properly escaped paths in WHENCE, so it only makes
> > sense to fix the outliers.
>
> That's true if we believe escaped paths are the suggested way to do
> it.  I'm questioning if we really want that.
>
> If you're a firmware submitter, which is more natural to you?
>
> File: "foo bar with spaces.bin"
>
> or
>
> File: foo\ bar\ with\ spaces.bin
>

If I'm distracted I would use the following, which would be flagged by
check_whence.py and rectified immediately by skimming through WHENCE.
File: foo bar with spaces.bin

Although if I'm careful I would first grep through WHENCE for examples.

> Based on the number of occurrences in WHENCE, quoting the filename
> seems to be more prevalent.
>
> > Would you be in favour if check_whence.py checks for quoted files and
> > produces meaningful error message?
>
> Not really.  I don't understand why we have to force only one format.
> The code already supports both.  What is the benefit of dropping that?
>

Yes, escaped files are more common. And no the code does not support both.

Look at how Link: is handled. It fails miserably if either target or
link are quoted, regardless if they have space in the name.
Fixing that is an option, although since less than 1% is "quirky" it's
not worth adding any extra code. But fixing them instead.

Plus a mismatched quotation will (currently) lead to greater chaos, or
confusion if one is so inclined, IMHO.

Does that make sense?

-Emil

  reply	other threads:[~2023-03-07 20:48 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-01 18:56 [PATCH RESEND v2 00/16] Misc fixes, sanity checks and xz/zstd compression Emil Velikov via B4 Relay
2023-03-01 18:56 ` [PATCH RESEND v2 01/16] WHENCE: remove trailing white space Emil Velikov via B4 Relay
2023-03-07 14:53   ` Josh Boyer
2023-03-01 18:56 ` [PATCH RESEND v2 02/16] WHENCE: remove unnecessary filename quotation Emil Velikov via B4 Relay
2023-03-07 14:56   ` Josh Boyer
2023-03-07 17:53     ` Emil Velikov
2023-03-07 18:01       ` Josh Boyer
2023-03-01 18:56 ` [PATCH RESEND v2 03/16] check_whence, WHENCE, copy-firmware: escape filenames with spaces Emil Velikov via B4 Relay
2023-03-07 14:58   ` Josh Boyer
2023-03-07 17:30     ` Emil Velikov
2023-03-07 18:00       ` Josh Boyer
2023-03-07 20:48         ` Emil Velikov [this message]
2023-03-01 18:56 ` [PATCH RESEND v2 04/16] WHENCE: remove duplicate File entries Emil Velikov via B4 Relay
2023-03-07 15:01   ` Josh Boyer
2023-03-01 18:56 ` [PATCH RESEND v2 05/16] WHENCE: comment out duplicate MediaTek firmware Emil Velikov via B4 Relay
2023-03-07 15:02   ` Josh Boyer
2023-03-07 17:19     ` Emil Velikov
2023-03-07 18:08       ` Josh Boyer
2023-03-07 20:57         ` Emil Velikov
2023-03-10 12:42           ` Josh Boyer
2023-03-01 18:56 ` [PATCH RESEND v2 06/16] check_whence: error on duplicate file entries Emil Velikov via B4 Relay
2023-03-07 18:12   ` Josh Boyer
2023-03-01 18:56 ` [PATCH RESEND v2 07/16] check_whence: error on directory listed as File Emil Velikov via B4 Relay
2023-03-13 20:24   ` Emil Velikov
2023-03-21 10:31     ` Emil Velikov
2023-03-29 14:47       ` Emil Velikov
2023-03-01 18:56 ` [PATCH RESEND v2 08/16] copy-firmware: remove non-applicable file presence test Emil Velikov via B4 Relay
2023-05-08 12:39   ` Josh Boyer
2023-03-01 18:56 ` [PATCH RESEND v2 09/16] check_whence: error if File: is actually a link Emil Velikov via B4 Relay
2023-05-08 12:41   ` Josh Boyer
2023-03-01 18:56 ` [PATCH RESEND v2 10/16] check_whence: error if symlinks are in-tree Emil Velikov via B4 Relay
2023-05-08 12:45   ` Josh Boyer
2023-03-01 18:56 ` [PATCH RESEND v2 11/16] copy-firmware: remove unreachable symlink workarounds Emil Velikov via B4 Relay
2023-03-01 18:56 ` [PATCH RESEND v2 12/16] copy-firmware: quote deskdir to prevent word splitting Emil Velikov via B4 Relay
2023-05-08 12:47   ` Josh Boyer
2023-03-01 18:56 ` [PATCH RESEND v2 13/16] copy-firmware: tweak sed invocation Emil Velikov via B4 Relay
2023-05-08 12:48   ` Josh Boyer
2023-03-01 18:56 ` [PATCH RESEND v2 14/16] copy-firmware: quote the output of dirname Emil Velikov via B4 Relay
2023-03-01 18:56 ` [PATCH RESEND v2 15/16] copy-firmware: silence the last shellcheck warnings Emil Velikov via B4 Relay
2023-03-01 18:56 ` [PATCH RESEND v2 16/16] Makefile, copy-firmware: support xz/zstd compressed firmware Emil Velikov via B4 Relay
2023-03-06 14:23   ` Emil Velikov
2023-05-08 12:51 ` [PATCH RESEND v2 00/16] Misc fixes, sanity checks and xz/zstd compression Josh Boyer
2023-05-20 11:05   ` Emil Velikov

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='CACvgo52=SvHghNbNy2WNZXJNqF=YMUX0ECopNB+ngYtudi8EPQ@mail.gmail.com' \
    --to=emil.l.velikov@gmail.com \
    --cc=ats@offog.org \
    --cc=dwmw2@infradead.org \
    --cc=jwboyer@kernel.org \
    --cc=linux-firmware@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).