All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Cc: stable@vger.kernel.org, sashal@kernel.org,
	Davidlohr Bueso <dave@stgolabs.net>,
	Davidlohr Bueso <dbueso@suse.de>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [RFC/PATCH for 4.14 and 4.19] lib/timerqueue: Rely on rbtree semantics for next timer
Date: Fri, 8 Oct 2021 11:10:53 +0200	[thread overview]
Message-ID: <YWALHdipnUQT6mBQ@kroah.com> (raw)
In-Reply-To: <20211007123243.595438-1-nobuhiro1.iwamatsu@toshiba.co.jp>

On Thu, Oct 07, 2021 at 09:32:43PM +0900, Nobuhiro Iwamatsu wrote:
> From: Davidlohr Bueso <dave@stgolabs.net>
> 
> commit 511885d7061eda3eb1faf3f57dcc936ff75863f1 upstream.
> 
> Simplify the timerqueue code by using cached rbtrees and rely on the tree
> leftmost node semantics to get the timer with earliest expiration time.
> This is a drop in conversion, and therefore semantics remain untouched.
> 
> The runtime overhead of cached rbtrees is be pretty much the same as the
> current head->next method, noting that when removing the leftmost node,
> a common operation for the timerqueue, the rb_next(leftmost) is O(1) as
> well, so the next timer will either be the right node or its parent.
> Therefore no extra pointer chasing. Finally, the size of the struct
> timerqueue_head remains the same.
> 
> Passes several hours of rcutorture.
> 
> Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Link: https://lkml.kernel.org/r/20190724152323.bojciei3muvfxalm@linux-r8p5
> Reference: CVE-2021-20317
> Signed-off-by: Nobuhiro Iwamatsu (CIP) <nobuhiro1.iwamatsu@toshiba.co.jp>
> ---

Now queued up, thanks.

greg k-h

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

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-07 12:32 [RFC/PATCH for 4.14 and 4.19] lib/timerqueue: Rely on rbtree semantics for next timer Nobuhiro Iwamatsu
2021-10-08  9:10 ` Greg KH [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=YWALHdipnUQT6mBQ@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=dave@stgolabs.net \
    --cc=dbueso@suse.de \
    --cc=nobuhiro1.iwamatsu@toshiba.co.jp \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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.