Linux-EFI Archive mirror
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ardb@kernel.org>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Michael Roth <michael.roth@amd.com>,
	linux-efi@vger.kernel.org, x86@kernel.org,
	 linux-coco@lists.linux.dev, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org,
	 "Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
	Nikolay Borisov <nik.borisov@suse.com>,
	 stable@kernel.org, Tom Lendacky <thomas.lendacky@amd.com>,
	 Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH v2] efi/unaccepted: Fix off-by-one when checking for overlapping ranges
Date: Tue, 28 Nov 2023 12:50:01 +0100	[thread overview]
Message-ID: <CAMj1kXE65htEpXSL+h1X-zQ2RH4Oc193rac7=PBYMYJvEUBXNA@mail.gmail.com> (raw)
In-Reply-To: <9be0159e-1762-6c07-e6eb-a86f1c780118@suse.cz>

On Tue, 28 Nov 2023 at 12:25, Vlastimil Babka <vbabka@suse.cz> wrote:
>
> On 11/8/23 12:21, Ard Biesheuvel wrote:
> > On Fri, 3 Nov 2023 at 16:30, Vlastimil Babka <vbabka@suse.cz> wrote:
> >>
> >> On 11/3/23 16:13, Michael Roth wrote:
> >> > When a task needs to accept memory it will scan the accepting_list
> >> > to see if any ranges already being processed by other tasks overlap
> >> > with its range. Due to an off-by-one in the range comparisons, a task
> >> > might falsely determine that an overlapping range is being accepted,
> >> > leading to an unnecessary delay before it begins processing the range.
> >> >
> >> > Fix the off-by-one in the range comparison to prevent this and slightly
> >> > improve performance.
> >> >
> >> > Fixes: 50e782a86c98 ("efi/unaccepted: Fix soft lockups caused by parallel memory acceptance")
> >> > Link: https://lore.kernel.org/linux-mm/20231101004523.vseyi5bezgfaht5i@amd.com/T/#me2eceb9906fcae5fe958b3fe88e41f920f8335b6
> >> > Reviewed-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> >> > Signed-off-by: Michael Roth <michael.roth@amd.com>
> >>
> >> More justification for introducing a common ranges_overlap() helper somewhere :)
> >>
> >> Acked-by: Vlastimil Babka <vbabka@suse.cz>
> >>
> >
> > Thanks, I'll take this as a fix.
>
> Ping, can't see it in mainline nor -next?
>

Apologies - queued up now.

      reply	other threads:[~2023-11-28 11:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-03 15:13 [PATCH v2] efi/unaccepted: Fix off-by-one when checking for overlapping ranges Michael Roth
2023-11-03 15:30 ` Vlastimil Babka
2023-11-08 11:21   ` Ard Biesheuvel
2023-11-28 11:25     ` Vlastimil Babka
2023-11-28 11:50       ` Ard Biesheuvel [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='CAMj1kXE65htEpXSL+h1X-zQ2RH4Oc193rac7=PBYMYJvEUBXNA@mail.gmail.com' \
    --to=ardb@kernel.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-coco@lists.linux.dev \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=michael.roth@amd.com \
    --cc=nik.borisov@suse.com \
    --cc=pbonzini@redhat.com \
    --cc=stable@kernel.org \
    --cc=thomas.lendacky@amd.com \
    --cc=vbabka@suse.cz \
    --cc=x86@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 read-only IMAP folder(s) and NNTP newsgroup(s).