linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Fitzgerald <rf@opensource.cirrus.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Petr Mladek <pmladek@suse.com>, <linux-kernel@vger.kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Sergey Senozhatsky <senozhatsky@chromium.org>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	kernel test robot <oliver.sang@intel.com>
Subject: Re: [PATCH v1 1/1] lib/test_scanf: Handle n_bits == 0 in random tests
Date: Tue, 27 Jul 2021 16:27:37 +0100	[thread overview]
Message-ID: <db516512-2f52-9526-f5f5-0571061c5990@opensource.cirrus.com> (raw)
In-Reply-To: <20210727150132.28920-1-andriy.shevchenko@linux.intel.com>

On 27/07/2021 16:01, Andy Shevchenko wrote:
> UBSAN reported (via LKP)
> 
> [   11.021349][    T1] UBSAN: shift-out-of-bounds in lib/test_scanf.c:275:51
> [   11.022782][    T1] shift exponent 32 is too large for 32-bit type 'unsigned int'
> 
> When n_bits == 0, the shift is out of range. Switch code to use GENMASK
> to handle this case.
> 
> Fixes: 50f530e176ea ("lib: test_scanf: Add tests for sscanf number conversion")
> Reported-by: kernel test robot <oliver.sang@intel.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---

Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>

Sorry about that. Would have been sensible to use GENMASK anyway.

  reply	other threads:[~2021-07-27 15:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-27 15:01 [PATCH v1 1/1] lib/test_scanf: Handle n_bits == 0 in random tests Andy Shevchenko
2021-07-27 15:27 ` Richard Fitzgerald [this message]
2021-07-30 10:45 ` Petr Mladek

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=db516512-2f52-9526-f5f5-0571061c5990@opensource.cirrus.com \
    --to=rf@opensource.cirrus.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=oliver.sang@intel.com \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=senozhatsky@chromium.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 NNTP newsgroup(s).