* [PATCH] MIPS: BPF: Disable JIT on R3000 (MIPS-I)
@ 2015-09-05 19:29 Ben Hutchings
2015-10-05 9:24 ` Ralf Baechle
0 siblings, 1 reply; 5+ messages in thread
From: Ben Hutchings @ 2015-09-05 19:29 UTC (permalink / raw)
To: linux-mips
[-- Attachment #1: Type: text/plain, Size: 739 bytes --]
The JIT does not include the load delay slots required by MIPS-I
processors.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
arch/mips/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 199a835..7ff9cba 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -12,7 +12,7 @@ config MIPS
select HAVE_ARCH_KGDB
select HAVE_ARCH_SECCOMP_FILTER
select HAVE_ARCH_TRACEHOOK
- select HAVE_BPF_JIT if !CPU_MICROMIPS
+ select HAVE_BPF_JIT if !CPU_MICROMIPS && !CPU_R3000
select ARCH_HAVE_CUSTOM_GPIO_H
select HAVE_FUNCTION_TRACER
select HAVE_DYNAMIC_FTRACE
--
Ben Hutchings
friends: People who know you well, but like you anyway.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] MIPS: BPF: Disable JIT on R3000 (MIPS-I)
2015-09-05 19:29 [PATCH] MIPS: BPF: Disable JIT on R3000 (MIPS-I) Ben Hutchings
@ 2015-10-05 9:24 ` Ralf Baechle
2015-10-05 9:51 ` Markos Chandras
2015-10-05 11:31 ` Ben Hutchings
0 siblings, 2 replies; 5+ messages in thread
From: Ralf Baechle @ 2015-10-05 9:24 UTC (permalink / raw)
To: Ben Hutchings; +Cc: linux-mips, Maciej W. Rozycki
On Sat, Sep 05, 2015 at 08:29:28PM +0100, Ben Hutchings wrote:
> The JIT does not include the load delay slots required by MIPS-I
> processors.
See 0c5d187828588dd1b36cb93b4481a8db467ef3e8 (MIPS: BPF: Fix load delay
slots.) for a proper fix.
I'm wondering, how did you find this issue, are you scanning the code
for broken instruction sequences?
Ralf
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] MIPS: BPF: Disable JIT on R3000 (MIPS-I)
@ 2015-10-05 9:51 ` Markos Chandras
0 siblings, 0 replies; 5+ messages in thread
From: Markos Chandras @ 2015-10-05 9:51 UTC (permalink / raw)
To: linux-mips
On 10/05/2015 10:24 AM, Ralf Baechle wrote:
> On Sat, Sep 05, 2015 at 08:29:28PM +0100, Ben Hutchings wrote:
>
>> The JIT does not include the load delay slots required by MIPS-I
>> processors.
>
> See 0c5d187828588dd1b36cb93b4481a8db467ef3e8 (MIPS: BPF: Fix load delay
> slots.) for a proper fix.
Since this patch didn't make it to the LMO and never discussed, i must
say that it's probably not complete. The bpf_jit.c code also emits load
instructions (for example see emit_load_imm). So I guess you need to
extend your patch to cover the C code as well.
--
markos
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] MIPS: BPF: Disable JIT on R3000 (MIPS-I)
@ 2015-10-05 9:51 ` Markos Chandras
0 siblings, 0 replies; 5+ messages in thread
From: Markos Chandras @ 2015-10-05 9:51 UTC (permalink / raw)
To: linux-mips
On 10/05/2015 10:24 AM, Ralf Baechle wrote:
> On Sat, Sep 05, 2015 at 08:29:28PM +0100, Ben Hutchings wrote:
>
>> The JIT does not include the load delay slots required by MIPS-I
>> processors.
>
> See 0c5d187828588dd1b36cb93b4481a8db467ef3e8 (MIPS: BPF: Fix load delay
> slots.) for a proper fix.
Since this patch didn't make it to the LMO and never discussed, i must
say that it's probably not complete. The bpf_jit.c code also emits load
instructions (for example see emit_load_imm). So I guess you need to
extend your patch to cover the C code as well.
--
markos
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] MIPS: BPF: Disable JIT on R3000 (MIPS-I)
2015-10-05 9:24 ` Ralf Baechle
2015-10-05 9:51 ` Markos Chandras
@ 2015-10-05 11:31 ` Ben Hutchings
1 sibling, 0 replies; 5+ messages in thread
From: Ben Hutchings @ 2015-10-05 11:31 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-mips, Maciej W. Rozycki
[-- Attachment #1: Type: text/plain, Size: 688 bytes --]
On Mon, 2015-10-05 at 11:24 +0200, Ralf Baechle wrote:
> On Sat, Sep 05, 2015 at 08:29:28PM +0100, Ben Hutchings wrote:
>
> > The JIT does not include the load delay slots required by MIPS-I
> > processors.
>
> See 0c5d187828588dd1b36cb93b4481a8db467ef3e8 (MIPS: BPF: Fix load delay
> slots.) for a proper fix.
How about all the inlined loads (emit_load, emit_load_byte,
emit_half_load)?
> I'm wondering, how did you find this issue, are you scanning the code
> for broken instruction sequences?
No, I was already looking at the BPF JIT implementation for some other
reason.
Ben.
--
Ben Hutchings
compatible: Gracefully accepts erroneous data from any source
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-10-05 11:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-05 19:29 [PATCH] MIPS: BPF: Disable JIT on R3000 (MIPS-I) Ben Hutchings
2015-10-05 9:24 ` Ralf Baechle
2015-10-05 9:51 ` Markos Chandras
2015-10-05 9:51 ` Markos Chandras
2015-10-05 11:31 ` Ben Hutchings
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.