All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aleksandar Gerasimovski  <aleksandar.gerasimovski@hitachi-powergrids.com>
To: Mark Brown <broonie@kernel.org>
Cc: "linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>
Subject: RE: [PATCH] spi: tools: fix input string formatting
Date: Mon, 8 Feb 2021 17:08:28 +0000	[thread overview]
Message-ID: <VI1PR06MB4029F761DD1F4CBA39DF1969D28F9@VI1PR06MB4029.eurprd06.prod.outlook.com> (raw)
In-Reply-To: <20210208100901.GA8645@sirena.org.uk>

Ok, thanks for clarification.
You can forget this patch! 

-----Original Message-----
From: Mark Brown <broonie@kernel.org> 
Sent: Montag, 8. Februar 2021 11:09
To: Aleksandar Gerasimovski <aleksandar.gerasimovski@hitachi-powergrids.com>
Cc: linux-spi@vger.kernel.org
Subject: Re: [PATCH] spi: tools: fix input string formatting

On Sat, Feb 06, 2021 at 10:57:04AM +0000, Aleksandar Gerasimovski wrote:

> AG: to be sure we understand each other, you expect quotes to be sent to spi as well? That's expected by design behavior?
> Is there any possibility to avoid sending them then?

If you don't want quotes to be sent then don't send them - my expectation would be that if you're driving this from the shell then the shell would not be passing unescaped quotes through to the program.  For
example:

	$ echo "Hello, world!"
	Hello, world!

Here echo only saw the unqouted string so that's what it displays.  If you're not using a shell and starting this from another program then I'd assume there's some way to generate unquoted arguments in whatever you're using.

> 
> This appears to be requiring that anything passed into unescape() be a number which isn't something we'd obviously want?  I'd expect the function to unescape things, not to do other random validation which may or may not be appropriate in context.
> AG: so by design is expected that everything is accepted here, e.g \"1234qwert\\xde\\xad\"? If yes than I understood this tool wrongly.

Yes, that's my expecation - it's just processing escape sequences and passing everything else through.

      reply	other threads:[~2021-02-08 17:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-05  8:04 [PATCH] spi: tools: fix input string formatting Aleksandar Gerasimovski
2021-02-05 16:20 ` Mark Brown
2021-02-06 10:57   ` Aleksandar Gerasimovski
2021-02-08 10:09     ` Mark Brown
2021-02-08 17:08       ` Aleksandar Gerasimovski [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=VI1PR06MB4029F761DD1F4CBA39DF1969D28F9@VI1PR06MB4029.eurprd06.prod.outlook.com \
    --to=aleksandar.gerasimovski@hitachi-powergrids.com \
    --cc=broonie@kernel.org \
    --cc=linux-spi@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 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.