lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMEtUuy_KZXmWAs6GkZe2HdJ_i0Go+FpJ09rA0AVg=dpWCevig@mail.gmail.com>
Date:	Wed, 2 Apr 2014 09:09:56 -0700
From:	Alexei Starovoitov <ast@...mgrid.com>
To:	David Miller <davem@...emloft.net>
Cc:	Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@...esas.com>,
	Daniel Borkmann <dborkman@...hat.com>,
	Paul Mundt <lethal@...ux-sh.org>,
	kbuild test robot <fengguang.wu@...el.com>,
	linux-sh <linux-sh@...r.kernel.org>,
	Network Development <netdev@...r.kernel.org>,
	Kaz Kojima <kkojima@...iij4u.or.jp>,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	linux-next@...r.kernel.org
Subject: Re: [PATCH net-next] sh: add missing fpscr_values

On Wed, Apr 2, 2014 at 5:47 AM, David Miller <davem@...emloft.net> wrote:
> From: Alexei Starovoitov <ast@...mgrid.com>
> Date: Tue,  1 Apr 2014 19:54:04 -0700
>
>> GCC on SuperH for the following program:
>> int foo(int i)
>> {
>>       static const void *table[2] = {
>>               [0] = &&label1,
>>               [1] = &&label2,
>>       };
>>       goto *table[i & 1];
>>
>>       label1:
>>               return 1;
>>       label2:
>>               return 2;
>> }
>> generates code:
>>       mov.l   .L9,r1
>>       mov     #1,r0
>>       rts
>>       lds.l   @r1+,fpscr
>> .L9:
>>       .long   __fpscr_values+4
>>
>> so kernel has to provide body of fpscr_values just like glibc does
>>
>> Fixes: bd4cf0ed331a ("net: filter: rework/optimize internal BPF interpreter's instruction set")
>> Reported-by: Fengguang Wu <fengguang.wu@...el.com>
>> Signed-off-by: Alexei Starovoitov <ast@...mgrid.com>
>
> You guys really need to just fix the compiler, sorry.

agree.

To summarize:
according to Kaz:
"For sh2a, configuring gcc with --with-multilib-list=m2a,m2a-nofpu
 and specifying -m2a-nofpu during compiling kernel would work."

and as Geert pointed out we already have:
arch/sh/Makefile:
cflags-$(CONFIG_CPU_SH2A)               += $(call cc-option,-m2a,) \
                                           $(call cc-option,-m2a-nofpu,)

so no kernel changes needed and gcc just needs to be reconfigured.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ