All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Ross Lagerwall <ross.lagerwall@citrix.com>,
	Anthony PERARD <anthony.perard@citrix.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v3 1/4] xen-livepatch: fix parameter name parsing
Date: Tue, 23 Apr 2024 16:11:42 +0200	[thread overview]
Message-ID: <ZifBnp4w8Cc1mH2R@macbook> (raw)
In-Reply-To: <e685068a-6df7-4a70-b62a-43982b05d4d9@suse.com>

On Tue, Apr 23, 2024 at 03:33:36PM +0200, Jan Beulich wrote:
> On 23.04.2024 15:12, Roger Pau Monne wrote:
> > It's incorrect to restrict strncmp to the length of the command line input
> > parameter, as then a user passing a rune like:
> > 
> > % xen-livepatch up foo.livepatch
> > 
> > Would match against the "upload" command, because the string comparison has
> > been truncated to the length of the input argument.  Instead the truncation
> > should be done based on the length of the command name stored in the internal
> > array of actions.
> 
> But then "xen-livepatch upload-or-not foo.livepatch" would still wrongly
> match. Why strncmp() at all, rather than strcmp()?

Bah, indeed, how dumb of me.  Will switch to strcmp in the next
version.

Thanks, Roger.-


  reply	other threads:[~2024-04-23 14:12 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-23 13:12 [PATCH v3 0/4] livepatch: minor bug fixes and improvements Roger Pau Monne
2024-04-23 13:12 ` [PATCH v3 1/4] xen-livepatch: fix parameter name parsing Roger Pau Monne
2024-04-23 13:33   ` Jan Beulich
2024-04-23 14:11     ` Roger Pau Monné [this message]
2024-04-23 13:12 ` [PATCH v3 2/4] livepatch: introduce --force option Roger Pau Monne
2024-04-23 13:38   ` Jan Beulich
2024-04-23 16:05   ` Anthony PERARD
2024-04-23 13:12 ` [PATCH v3 3/4] livepatch: refuse to resolve symbols that belong to init sections Roger Pau Monne
2024-04-23 13:44   ` Jan Beulich
2024-04-23 14:26     ` Roger Pau Monné
2024-04-23 14:28       ` Jan Beulich
2024-04-23 15:03         ` Roger Pau Monné
2024-04-23 16:07           ` Jan Beulich
2024-04-23 13:12 ` [PATCH v3 4/4] x86/livepatch: perform sanity checks on the payload exception table contents Roger Pau Monne
2024-04-23 13:51   ` Jan Beulich
2024-04-23 14:31     ` Roger Pau Monné
2024-04-23 14:35       ` Jan Beulich

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=ZifBnp4w8Cc1mH2R@macbook \
    --to=roger.pau@citrix.com \
    --cc=anthony.perard@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=ross.lagerwall@citrix.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.