mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Leon Romanovsky <leonro@mellanox.com>
To: Kees Cook <keescook@chromium.org>
Cc: Bart Van Assche <bvanassche@acm.org>,
	Jason Gunthorpe <jgg@mellanox.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>
Subject: Re: [PATCH] Avoid that check_shl_overflow() triggers a compiler warning when building with W=1
Date: Thu, 7 Mar 2019 17:36:44 +0000	[thread overview]
Message-ID: <20190307173640.GB32625@mtr-leonro.mtl.com> (raw)
In-Reply-To: <CAGXu5jJDmEFA7=WuDnr0U6t9BTDFtd_WsB5HeryNKoZSaBW8oA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2086 bytes --]

On Thu, Mar 07, 2019 at 09:12:40AM -0800, Kees Cook wrote:
> On Thu, Mar 7, 2019 at 9:02 AM Leon Romanovsky <leonro@mellanox.com> wrote:
> >
> > On Thu, Mar 07, 2019 at 08:52:51AM -0800, Kees Cook wrote:
> > > On Thu, Mar 7, 2019 at 7:40 AM Leon Romanovsky <leonro@mellanox.com> wrote:
> > > >
> > > > On Thu, Mar 07, 2019 at 06:53:54AM -0800, Bart Van Assche wrote:
> > > > > On 3/6/19 11:24 PM, Leon Romanovsky wrote:
> > > > > > My simple patch passes too :).
> > > > >
> > > > > Can you repost your patch?
> > > >
> > > > https://patchwork.kernel.org/patch/10841079/
> > > >
> > > > As Rasmus wrote, the thing is to avoid a < 0 check. In my patch,
> > > > I converted a <= 0 to !(a > 0 || a == 0) expression.
> > >
> > > I'd be happy either way. Is there a larger benefit to having a safe
> > > "is_non_negative()" helper, or should we go with the minimal change to
> > > the shl macro?
> >
> > I personally prefer simplest possible solution.
>
> Acked-by: Kees Cook <keescook@chromium.org>

Thanks

>
> Can this go via the rdma tree?

I think so, Jason advertised that we will have second PR to Linus
this merge window.

Thanks

>
> -Kees
>
> >
> > >
> > > -Kees
> > >
> > > --
> > > Kees Cook
> > -----BEGIN PGP SIGNATURE-----
> >
> > iQIcBAEBAgAGBQJcgU6mAAoJEORje4g2clinE94P/0pHFmUgwzRrVLxjqmnynNPC
> > e+azQISKrZ4EBI5Is7VwFJuxtiZvsTveCxX0NpRxk3TLfHbA4V9jz4meJ6smp4UQ
> > Z1uRnPbj2z5iucFN/8SelQvNTmqfvbuRSKpZ08XLxBB4XIAjFaNBbmD+REe7iSGD
> > xiYNp96oHvKnzGZq/eViqz0rogewsTLHoEBwDkfgyDIqwO0/3qVElNhW7Z6g/v/7
> > 2D4yZiB82wIBf+00taEQNnpI/3naVvqdfl34iYGuq51Fd2S36lfmMZ1DUffd/Eq+
> > jRq8PiNisFK+0A/96hwi2npVN0LS4tA5at6PHhqOfVxMOt/XAmeKu3cCaxHhjbfb
> > Oi2+X9/EBDdgVmylssQFwjNaLuXB00109IVDcQGgzTsN8xoTNiwla8gt3fVhDWt+
> > X0jQuSnqtANt75/0mucirBoUppCB59aZ9ygolWe4UwBpVV0ZGH/0MFwcOhlpglGB
> > PbrKaTxP3qQeil8wGXQsJyPGOCLBGh1Qj0C6NG1wsJSX/Zq8awEoz+JlYCXezaq6
> > 4R0jSHu50BGp7gt5iePRGeUhjPFVGHucJZ2b6fuDZ3ARN8MtQYmrYDyRqnFJZsCE
> > UZFd4SZ8UzfIETd17IowOmOs62HwXyIi1WzoWjiHsNjH2dxwiB6Lh1JBvAFQgzJ1
> > 0wRa0DMnyLzmIoOdyvQm
> > =NFtk
> > -----END PGP SIGNATURE-----
>
>
>
> --
> Kees Cook

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

  reply	other threads:[~2019-03-07 17:36 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-07  1:01 Bart Van Assche
2019-03-07  1:24 ` Jason Gunthorpe
2019-03-07  2:14   ` Bart Van Assche
2019-03-07  7:18     ` Rasmus Villemoes
2019-03-08  0:08       ` Bart Van Assche
2019-03-08  7:01         ` Leon Romanovsky
2019-03-08  8:09           ` Rasmus Villemoes
2019-03-08 15:53             ` Leon Romanovsky
2019-03-08 21:32               ` Rasmus Villemoes
2019-03-08  7:58         ` Rasmus Villemoes
2019-03-08 12:41           ` Jason Gunthorpe
2019-03-07  7:24     ` Leon Romanovsky
2019-03-07 14:53       ` Bart Van Assche
2019-03-07 15:40         ` Leon Romanovsky
2019-03-07 16:52           ` Kees Cook
2019-03-07 17:02             ` Leon Romanovsky
2019-03-07 17:12               ` Kees Cook
2019-03-07 17:36                 ` Leon Romanovsky [this message]
2019-03-07 20:28                 ` Rasmus Villemoes
2019-03-08  7:03                   ` Leon Romanovsky

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=20190307173640.GB32625@mtr-leonro.mtl.com \
    --to=leonro@mellanox.com \
    --cc=bvanassche@acm.org \
    --cc=jgg@mellanox.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    /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

all inboxes | Powered by JetHome®