netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oleksandr Natalenko <oleksandr@natalenko.name>
To: Jiong Wang <jiong.wang@netronome.com>
Cc: Jakub Kicinski <jakub.kicinski@netronome.com>,
	"David S. Miller" <davem@davemloft.net>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
	Yonghong Song <yhs@fb.com>,
	Jesper Dangaard Brouer <hawk@kernel.org>,
	John Fastabend <john.fastabend@gmail.com>,
	netdev@vger.kernel.org, bpf@vger.kernel.org,
	oss-drivers@netronome.com, linux-kernel@vger.kernel.org,
	xdp-newbies@vger.kernel.org, valdis@vt.edu
Subject: Re: [oss-drivers] netronome/nfp/bpf/jit.c cannot be build with -O3
Date: Tue, 07 May 2019 07:05:18 +0200	[thread overview]
Message-ID: <4414f1798ea3c0f70128b7e4caa14edc@natalenko.name> (raw)
In-Reply-To: <87mujzutsw.fsf@netronome.com>

Hi.

On 07.05.2019 00:01, Jiong Wang wrote:
> I guess it's because constant prop. Could you try the following change 
> to
> __emit_shift?
> 
> drivers/net/ethernet/netronome/nfp/bpf/jit.c
> __emit_shift:331
> -       if (sc == SHF_SC_L_SHF)
> +       if (sc == SHF_SC_L_SHF && shift)
>                 shift = 32 - shift;
> 
> emit_shf_indir is passing "0" as shift to __emit_shift which will
> eventually be turned into 32 and it was OK because we truncate to 
> 5-bit,
> but before truncation, it will overflow the shift mask.

Yup, it silences the error for me.

-- 
   Oleksandr Natalenko (post-factum)

  reply	other threads:[~2019-05-07  5:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-06 19:40 netronome/nfp/bpf/jit.c cannot be build with -O3 Oleksandr Natalenko
2019-05-06 21:00 ` Jakub Kicinski
2019-05-06 21:24   ` Oleksandr Natalenko
2019-05-06 21:35     ` Jakub Kicinski
2019-05-07  5:01       ` Oleksandr Natalenko
2019-05-06 22:01 ` [oss-drivers] " Jiong Wang
2019-05-07  5:05   ` Oleksandr Natalenko [this message]
2019-05-07 11:31     ` Jiong Wang

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=4414f1798ea3c0f70128b7e4caa14edc@natalenko.name \
    --to=oleksandr@natalenko.name \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=hawk@kernel.org \
    --cc=jakub.kicinski@netronome.com \
    --cc=jiong.wang@netronome.com \
    --cc=john.fastabend@gmail.com \
    --cc=kafai@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oss-drivers@netronome.com \
    --cc=songliubraving@fb.com \
    --cc=valdis@vt.edu \
    --cc=xdp-newbies@vger.kernel.org \
    --cc=yhs@fb.com \
    /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).