From: Greg KH <gregkh@linuxfoundation.org>
To: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Alan Stern <stern@rowland.harvard.edu>,
Chris Bainbridge <chris.bainbridge@gmail.com>,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: UBSAN: Undefined behaviour in drivers/usb/core/devio.c:1517:25
Date: Tue, 26 Jan 2016 08:43:54 -0800 [thread overview]
Message-ID: <20160126164354.GA19916@kroah.com> (raw)
In-Reply-To: <56A798DB.8000200@virtuozzo.com>
On Tue, Jan 26, 2016 at 07:03:39PM +0300, Andrey Ryabinin wrote:
> On 01/26/2016 06:25 PM, Alan Stern wrote:
> > On Tue, 26 Jan 2016, Chris Bainbridge wrote:
> >
> >> Booting 4.5.0-rc1 with new UBSAN checker enabled:
> >>
> >> [ 4.556968] ================================================================================
> >> [ 4.556972] UBSAN: Undefined behaviour in drivers/usb/core/devio.c:1517:25
> >> [ 4.556975] shift exponent -1 is negative
> >
> > Does a left shift by a negative amount matter if the result isn't used?
> >
>
> By definition, any code with undefined behavior could do anything.
But in reality, we are ok here, gcc isn't that foolish.
> But in practice, undefined shift just leads to undefined result of shift operation
> (it depends on operands and architecture).
But if we don't use the value...
Anyway, please send a patch if you wish this issue to be fixed and we
can discuss it that way.
thanks,
greg k-h
prev parent reply other threads:[~2016-01-26 16:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-26 10:11 UBSAN: Undefined behaviour in drivers/usb/core/devio.c:1517:25 Chris Bainbridge
2016-01-26 15:25 ` Alan Stern
2016-01-26 16:03 ` Andrey Ryabinin
2016-01-26 16:43 ` 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=20160126164354.GA19916@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=aryabinin@virtuozzo.com \
--cc=chris.bainbridge@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/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.