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>,
	Kevin Lampis <kevin.lampis@cloud.com>,
	Anthony PERARD <anthony.perard@vates.tech>,
	Juergen Gross <jgross@suse.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Michal Orzel <michal.orzel@amd.com>,
	Julien Grall <julien@xen.org>,
	Stefano Stabellini <sstabellini@kernel.org>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v2] livepatch: Pass buffer size to list sysctl
Date: Mon, 12 May 2025 12:54:33 +0200	[thread overview]
Message-ID: <aCHTaXClFFRUX2tv@macbook.lan> (raw)
In-Reply-To: <e9f0e66c-a05d-4e95-9446-435d9ca51753@suse.com>

On Mon, May 12, 2025 at 11:51:35AM +0200, Jan Beulich wrote:
> On 08.05.2025 19:01, Ross Lagerwall wrote:
> > @@ -1328,10 +1327,15 @@ static int livepatch_list(struct xen_sysctl_livepatch_list *list)
> >              status.rc = data->rc;
> >  
> >              name_len = strlen(data->name) + 1;
> > -            list->name_total_size += name_len;
> > -
> >              metadata_len = data->metadata.len;
> > -            list->metadata_total_size += metadata_len;
> > +
> > +            if ( (name_total_copied + name_len) > list->name_total_size ||
> > +                 (metadata_total_copied + metadata_len) >
> > +                 list->metadata_total_size )
> > +            {
> > +                rc = -ENOMEM;
> 
> -ENOBUFS or maybe -ENOSPC, but certainly not -ENOMEM.

Jan, are you fine if I replace with -ENOBUFS on commit?

Thanks, Roger.


  reply	other threads:[~2025-05-12 10:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-08 17:01 [PATCH v2] livepatch: Pass buffer size to list sysctl Ross Lagerwall
2025-05-09  9:38 ` Roger Pau Monné
2025-05-12  9:51 ` Jan Beulich
2025-05-12 10:54   ` Roger Pau Monné [this message]
2025-05-12 10:58     ` 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=aCHTaXClFFRUX2tv@macbook.lan \
    --to=roger.pau@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=jbeulich@suse.com \
    --cc=jgross@suse.com \
    --cc=julien@xen.org \
    --cc=kevin.lampis@cloud.com \
    --cc=michal.orzel@amd.com \
    --cc=ross.lagerwall@citrix.com \
    --cc=sstabellini@kernel.org \
    --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.