Re: [PATCH] mmc: brcmstb: Fix sdhci_pltfm_suspend link error

2021-01-26 Thread Nicolas Schichan
er works correctly even when CONFIG_PM_SLEEP is disabled Good evening Arnd, I have just given this patch a test, and the driver works fine on my side, afterwards. Tested-by: Nicolas Schichan > --- > drivers/mmc/host/sdhci-brcmstb.c | 3 ++- > 1 file changed, 2 insertions(+), 1

Re: [PATCH] mmc: sdhci-brcmstb: Fix mmc timeout errors on S5 suspend

2021-01-25 Thread Nicolas Schichan
L26 against undefined symbol `sdhci_pltfm_suspend' I'm not sure if definiting sdhci_pltfm_suspend() empty stubs in sdhci-pltfm.h when CONFIG_PM_SLEEP is not set would be prefered over adding #ifdef CONFIG_PM_SLEEP in sdhci-brcmstb.c, but I can send a patch for either solution. Regards, -- Nicolas Schichan

Re: [PATCH] gpiolib: fix sysfs when cdev is not selected

2020-11-05 Thread Nicolas Schichan
ubbed functions in gpiolib-cdev.h with macros in gpiolib.c > that perform the required device_add() and device_del() when > CONFIG_GPIO_CDEV is not selected. > > Fixes: d143493c01b7 (gpiolib: make cdev a build option) > Reported-by: Nicolas Schichan > Signed-off-by: Kent Gibson

[PATCH] init: use pr_cont() when displaying rotator during ramdisk loading.

2016-11-24 Thread Nicolas Schichan
Otherwise each individual rotator char would be printed in a new line: (...) [0.642350] - [0.644374] | [0.646367] - (...) Signed-off-by: Nicolas Schichan --- init/do_mounts_rd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init/do_mounts_rd.c b/init

[PATCH] net: mv643xx_eth: fix packet corruption with TSO and tiny unaligned packets.

2016-01-26 Thread Nicolas Schichan
hat same space to place the ip headers, overwritting that small fragment data. Fixes: 91986fd3d335 (net: mv643xx_eth: Ensure proper data alignment in TSO TX path) Signed-off-by: Nicolas Schichan --- drivers/net/ethernet/marvell/mv643xx_eth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deleti

[PATCH net-next V2] ARM: net: support BPF_ALU | BPF_MOD instructions in the BPF JIT.

2015-10-02 Thread Nicolas Schichan
PASS ARMv5 QEMU jit: test_bpf: #3 DIV_MOD_KX jited:1 1104 PASS ARMv5 kirkwood nojit: test_bpf: #3 DIV_MOD_KX jited:0 1103 PASS ARMv5 kirkwood jit: test_bpf: #3 DIV_MOD_KX jited:1 311 PASS Signed-off-by: Nicolas Schichan --- Changes from V1: - Address spelling in comment, following Russ

[PATCH net-next] ARM: net: support BPF_ALU | BPF_MOD instructions in the BPF JIT.

2015-10-02 Thread Nicolas Schichan
PASS ARMv5 QEMU jit: test_bpf: #3 DIV_MOD_KX jited:1 1104 PASS ARMv5 kirkwood nojit: test_bpf: #3 DIV_MOD_KX jited:0 1103 PASS ARMv5 kirkwood jit: test_bpf: #3 DIV_MOD_KX jited:1 311 PASS Signed-off-by: Nicolas Schichan --- arch/arm/net/bpf_jit_32.c | 38

[PATCH net] ARM: net: make BPF_LD | BPF_IND instruction trigger r_X initialisation to 0.

2015-10-02 Thread Nicolas Schichan
makes the test "LD_IND byte default X" pass in the test_bpf module when the ARM JIT is enabled. Signed-off-by: Nicolas Schichan --- arch/arm/net/bpf_jit_32.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c index 876060b..b8efb8c 10

[PATCH V2 net-next 2/6] test_bpf: allow tests to specify an skb fragment.

2015-08-04 Thread Nicolas Schichan
This introduce a new test->aux flag (FLAG_SKB_FRAG) to tell the populate_skb() function to add a fragment to the test skb containing the data specified in test->frag_data). Signed-off-by: Nicolas Schichan Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann --- lib/test_bpf.

[PATCH V2 net-next 1/6] test_bpf: avoid oopsing the kernel when generate_test_data() fails.

2015-08-04 Thread Nicolas Schichan
Signed-off-by: Nicolas Schichan Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann --- lib/test_bpf.c | 5 + 1 file changed, 5 insertions(+) diff --git a/lib/test_bpf.c b/lib/test_bpf.c index 3afddf2..6843d0b 100644 --- a/lib/test_bpf.c +++ b/lib/test_bpf.c @@ -4672,6 +4672,11

[PATCH V2 net-next 3/6] test_bpf: test LD_ABS and LD_IND instructions on fragmented skbs.

2015-08-04 Thread Nicolas Schichan
These new tests exercise various load sizes and offsets crossing the head/fragment boundary. Signed-off-by: Nicolas Schichan Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann --- lib/test_bpf.c | 142 + 1 file changed, 142

[PATCH V2 net-next 5/6] test_bpf: add more tests for LD_ABS and LD_IND.

2015-08-04 Thread Nicolas Schichan
This exerces the LD_ABS and LD_IND instructions for various sizes and alignments. This also checks that X when used as an offset to a BPF_IND instruction first in a filter is correctly set to 0. Signed-off-by: Nicolas Schichan Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann --- lib

[PATCH V2 net-next 6/6] test_bpf: add tests checking that JIT/interpreter sets A and X to 0.

2015-08-04 Thread Nicolas Schichan
It is mandatory for the JIT or interpreter to reset the A and X registers to 0 before running the filter. Check that it is the case on various ALU and JMP instructions. Signed-off-by: Nicolas Schichan Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann --- lib/test_bpf.c | 158

[PATCH V2 net-next 4/6] test_bpf: add module parameters to filter the tests to run.

2015-08-04 Thread Nicolas Schichan
or test name will result in -EINVAL being returned and no tests being run. Signed-off-by: Nicolas Schichan Acked-by: Daniel Borkmann --- lib/test_bpf.c | 71 ++ 1 file changed, 71 insertions(+) diff --git a/lib/test_bpf.c b/lib/test_bpf.c

[PATCH V2 net-next 0/6] test_bpf improvements

2015-08-04 Thread Nicolas Schichan
on in patch 4/6. Regards, Nicolas Schichan (6): test_bpf: avoid oopsing the kernel when generate_test_data() fails. test_bpf: allow tests to specify an skb fragment. test_bpf: test LD_ABS and LD_IND instructions on fragmented skbs. test_bpf: allow running of a single test specif

Re: [PATCH 2/6] test_bpf: allow tests to specify an skb fragment.

2015-08-03 Thread Nicolas Schichan
On 08/03/2015 05:29 PM, Daniel Borkmann wrote: > On 08/03/2015 04:02 PM, Nicolas Schichan wrote: > We now have 286 tests, which is awesome! > > Perhaps, we need to start thinking of a better test description method > soonish as the test_bpf.ko module grew to ~1.6M, i.e. whene

Re: [PATCH 4/6] test_bpf: add module parameters to filter the tests to run.

2015-08-03 Thread Nicolas Schichan
On 08/03/2015 05:58 PM, Daniel Borkmann wrote: > On 08/03/2015 04:02 PM, Nicolas Schichan wrote: >> When developping on the interpreter or a particular JIT, it can be >> insteresting to restrict the test list to a specific test or a > > s/insteresting/interesting/ [...]

[PATCH 4/6] test_bpf: add module parameters to filter the tests to run.

2015-08-03 Thread Nicolas Schichan
test name will result in -EINVAL being returned and no tests being run. Signed-off-by: Nicolas Schichan --- lib/test_bpf.c | 73 ++ 1 file changed, 73 insertions(+) diff --git a/lib/test_bpf.c b/lib/test_bpf.c index f5606fb..abd0507 100644

[PATCH 5/6] test_bpf: add more tests for LD_ABS and LD_IND.

2015-08-03 Thread Nicolas Schichan
This exerces the LD_ABS and LD_IND instructions for various sizes and alignments. This also checks that X when used as an offset to a BPF_IND instruction first in a filter is correctly set to 0. Signed-off-by: Nicolas Schichan Acked-by: Alexei Starovoitov --- lib/test_bpf.c | 296

[PATCH 2/6] test_bpf: allow tests to specify an skb fragment.

2015-08-03 Thread Nicolas Schichan
This introduce a new test->aux flag (FLAG_SKB_FRAG) to tell the populate_skb() function to add a fragment to the test skb containing the data specified in test->frag_data). Signed-off-by: Nicolas Schichan Acked-by: Alexei Starovoitov --- lib/test_bpf.

[PATCH 0/6] test_bpf improvements

2015-08-03 Thread Nicolas Schichan
interpreter or JIT correctly resets A and X to 0. This serie is against today's net-next tree. Regards, Nicolas Schichan (6): test_bpf: avoid oopsing the kernel when generate_test_data() fails. test_bpf: allow tests to specify an skb fragment. test_bpf: test LD_ABS and LD_IND instructio

[PATCH 1/6] test_bpf: avoid oopsing the kernel when generate_test_data() fails.

2015-08-03 Thread Nicolas Schichan
Signed-off-by: Nicolas Schichan Acked-by: Alexei Starovoitov --- lib/test_bpf.c | 5 + 1 file changed, 5 insertions(+) diff --git a/lib/test_bpf.c b/lib/test_bpf.c index 3afddf2..6843d0b 100644 --- a/lib/test_bpf.c +++ b/lib/test_bpf.c @@ -4672,6 +4672,11 @@ static int run_one(const struct

[PATCH 6/6] test_bpf: add tests checking that JIT/interpreter sets A and X to 0.

2015-08-03 Thread Nicolas Schichan
It is mandatory for the JIT or interpreter to reset the A and X registers to 0 before running the filter. Check that it is the case on various ALU and JMP instructions. Signed-off-by: Nicolas Schichan Acked-by: Alexei Starovoitov --- lib/test_bpf.c | 158

[PATCH 3/6] test_bpf: test LD_ABS and LD_IND instructions on fragmented skbs.

2015-08-03 Thread Nicolas Schichan
These new tests exercise various load sizes and offsets crossing the head/fragment boundary. Signed-off-by: Nicolas Schichan Acked-by: Alexei Starovoitov --- lib/test_bpf.c | 142 + 1 file changed, 142 insertions(+) diff --git a/lib

[PATCH V3 net-next 3/3] ARM: net: add support for BPF_ANC | SKF_AD_HATYPE in ARM JIT.

2015-07-27 Thread Nicolas Schichan
Signed-off-by: Nicolas Schichan --- arch/arm/net/bpf_jit_32.c | 22 -- arch/arm/net/bpf_jit_32.h | 3 +++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c index 3c73caf..876060b 100644 --- a/arch/arm/net

[PATCH V3 net-next 2/3] ARM: net: add support for BPF_ANC | SKF_AD_PAY_OFFSET in ARM JIT.

2015-07-27 Thread Nicolas Schichan
Signed-off-by: Nicolas Schichan --- arch/arm/net/bpf_jit_32.c | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c index 6ff248c..3c73caf 100644 --- a/arch/arm/net/bpf_jit_32.c +++ b/arch/arm/net/bpf_jit_32.c @@ -915,6 +915,14

[PATCH V3 net-next 1/3] ARM: net: add support for BPF_ANC | SKF_AD_PKTTYPE in ARM JIT.

2015-07-27 Thread Nicolas Schichan
Signed-off-by: Nicolas Schichan --- arch/arm/net/bpf_jit_32.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c index c011e22..6ff248c 100644 --- a/arch/arm/net/bpf_jit_32.c +++ b/arch/arm/net/bpf_jit_32.c @@ -895,6 +895,17

[PATCH V3 net-next 0/3] ARM BPF JIT features

2015-07-27 Thread Nicolas Schichan
serie sent earlier. Regards, Changes from V1 to V2: * split fixes and features in separate patch series. Changes from V2 to V3: * respin against latest net-next. Nicolas Schichan (3): ARM: net: add support for BPF_ANC | SKF_AD_PKTTYPE in ARM JIT. ARM: net: add support for BPF_ANC | SKF_AD_PAY_OFF

[PATCH V2 next-next 1/3] ARM: net: add support for BPF_ANC | SKF_AD_PKTTYPE in ARM JIT.

2015-07-21 Thread Nicolas Schichan
Signed-off-by: Nicolas Schichan --- arch/arm/net/bpf_jit_32.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c index 4550d24..67a2d44 100644 --- a/arch/arm/net/bpf_jit_32.c +++ b/arch/arm/net/bpf_jit_32.c @@ -864,6 +864,17

[PATCH V2 net-next 0/3] ARM BPF JIT features

2015-07-21 Thread Nicolas Schichan
serie sent earlier. Regards, Changes from original submission: * split fixes and features in separate patch series. Nicolas Schichan (3): ARM: net: add support for BPF_ANC | SKF_AD_PKTTYPE in ARM JIT. ARM: net: add support for BPF_ANC | SKF_AD_PAY_OFFSET in ARM JIT. ARM: net: add support f

[PATCH V2 net-next 2/3] ARM: net: add support for BPF_ANC | SKF_AD_PAY_OFFSET in ARM JIT.

2015-07-21 Thread Nicolas Schichan
Signed-off-by: Nicolas Schichan --- arch/arm/net/bpf_jit_32.c | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c index 67a2d44..fe28beb 100644 --- a/arch/arm/net/bpf_jit_32.c +++ b/arch/arm/net/bpf_jit_32.c @@ -884,6 +884,14

[PATCH V2 net-next 3/3] ARM: net: add support for BPF_ANC | SKF_AD_HATYPE in ARM JIT.

2015-07-21 Thread Nicolas Schichan
Signed-off-by: Nicolas Schichan --- arch/arm/net/bpf_jit_32.c | 22 -- arch/arm/net/bpf_jit_32.h | 3 +++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c index fe28beb..6dcff2b 100644 --- a/arch/arm/net

[PATCH V2 net 3/3] ARM: net: fix vlan access instructions in ARM JIT.

2015-07-21 Thread Nicolas Schichan
This makes BPF_ANC | SKF_AD_VLAN_TAG and BPF_ANC | SKF_AD_VLAN_TAG_PRESENT have the same behaviour as the in kernel VM and makes the test_bpf LD_VLAN_TAG and LD_VLAN_TAG_PRESENT tests pass. Signed-off-by: Nicolas Schichan --- arch/arm/net/bpf_jit_32.c | 8 +--- 1 file changed, 5 insertions

[PATCH V2 net 1/3] ARM: net: fix condition for load_order > 0 when translating load instructions.

2015-07-21 Thread Nicolas Schichan
code for load orders greater than 0. Signed-off-by: Nicolas Schichan --- arch/arm/net/bpf_jit_32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c index 4550d24..21f5ace 100644 --- a/arch/arm/net/bpf_jit_32.c +++ b/arch/

[PATCH V2 net 0/3] BPF JIT fixes for ARM

2015-07-21 Thread Nicolas Schichan
. Nicolas Schichan (3): ARM: net: fix condition for load_order > 0 when translating load instructions. ARM: net: handle negative offsets in BPF JIT. ARM: net: fix vlan access instructions in ARM JIT. arch/arm/net/bpf_jit_32.c | 57 --- 1 f

[PATCH V2 net 2/3] ARM: net: handle negative offsets in BPF JIT.

2015-07-21 Thread Nicolas Schichan
path helpers when the offset is negative. Signed-off-by: Nicolas Schichan --- arch/arm/net/bpf_jit_32.c | 47 ++- 1 file changed, 38 insertions(+), 9 deletions(-) diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c index 21f5ace..d9b2524

[PATCH 1/6] ARM: net: fix condition for load_order > 0 when translating load instructions.

2015-07-16 Thread Nicolas Schichan
code for load orders greater than 0. Signed-off-by: Nicolas Schichan --- arch/arm/net/bpf_jit_32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c index 4550d24..21f5ace 100644 --- a/arch/arm/net/bpf_jit_32.c +++ b/arch/

[PATCH 3/6] ARM: net: fix vlan access instructions in ARM JIT.

2015-07-16 Thread Nicolas Schichan
This makes BPF_ANC | SKF_AD_VLAN_TAG and BPF_ANC | SKF_AD_VLAN_TAG_PRESENT have the same behaviour as the in kernel VM and makes the test_bpf LD_VLAN_TAG and LD_VLAN_TAG_PRESENT tests pass. Signed-off-by: Nicolas Schichan --- arch/arm/net/bpf_jit_32.c | 8 +--- 1 file changed, 5 insertions

[PATCH 5/6] ARM: net: add support for BPF_ANC | SKF_AD_PAY_OFFSET in ARM JIT.

2015-07-16 Thread Nicolas Schichan
Signed-off-by: Nicolas Schichan --- arch/arm/net/bpf_jit_32.c | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c index 6ff248c..3c73caf 100644 --- a/arch/arm/net/bpf_jit_32.c +++ b/arch/arm/net/bpf_jit_32.c @@ -915,6 +915,14

[PATCH 4/6] ARM: net: add support for BPF_ANC | SKF_AD_PKTTYPE in ARM JIT.

2015-07-16 Thread Nicolas Schichan
Signed-off-by: Nicolas Schichan --- arch/arm/net/bpf_jit_32.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c index c011e22..6ff248c 100644 --- a/arch/arm/net/bpf_jit_32.c +++ b/arch/arm/net/bpf_jit_32.c @@ -895,6 +895,17

[PATCH 2/6] ARM: net: handle negative offsets in BPF JIT.

2015-07-16 Thread Nicolas Schichan
path helpers when the offset is negative. Signed-off-by: Nicolas Schichan --- arch/arm/net/bpf_jit_32.c | 47 ++- 1 file changed, 38 insertions(+), 9 deletions(-) diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c index 21f5ace..d9b2524

[PATCH 0/6] BPF JIT fixes and features for ARM

2015-07-16 Thread Nicolas Schichan
. Like previous ARM JIT patches this should go via the net tree. Regards, Nicolas Schichan (6): ARM: net: fix condition for load_order > 0 when translating load instructions. ARM: net: handle negative offsets in BPF JIT. ARM: net: fix vlan access instructions in ARM JIT. ARM: net:

[PATCH 6/6] ARM: net: add support for BPF_ANC | SKF_AD_HATYPE in ARM JIT.

2015-07-16 Thread Nicolas Schichan
Signed-off-by: Nicolas Schichan --- arch/arm/net/bpf_jit_32.c | 22 -- arch/arm/net/bpf_jit_32.h | 3 +++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c index 3c73caf..876060b 100644 --- a/arch/arm/net

[PATCH] ARM: net: delegate filter to kernel interpreter when imm_offset() return value can't fit into 12bits.

2015-05-07 Thread Nicolas Schichan
is a more straight forward, minimal fix and easy to backport. Signed-off-by: Nicolas Schichan --- arch/arm/net/bpf_jit_32.c | 27 ++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c index 6bda637..bb8ffcd 10

[PATCH v2] ARM: net: add JIT support for loads from struct seccomp_data.

2015-05-07 Thread Nicolas Schichan
Signed-off-by: Nicolas Schichan --- This patch was first sent as part of a serie modifying the core seccomp code to allow the use of the classic BPF JIT. As the core changes have been submitted to netdev by Daniel Borkmann, it is now time to re-submit this patch separately. While not physically

[PATCH v2] ARM: net fix emit_udiv() for BPF_ALU | BPF_DIV | BPF_K intruction.

2015-05-06 Thread Nicolas Schichan
In that case, emit_udiv() will be called with rn == ARM_R0 (r_scratch) and loading rm first into ARM_R0 will result in jit_udiv() function being called the same dividend and divisor. Fix that by loading rn first into ARM_R1 and then rm into ARM_R0. Signed-off-by: Nicolas Schichan Cc: # v3.13

Re: [PATCH 4/4] ARM: net fix emit_udiv() for BPF_ALU | BPF_DIV | BPF_K intruction.

2015-05-04 Thread Nicolas Schichan
On 05/01/2015 07:37 PM, Russell King - ARM Linux wrote: > On Wed, Apr 29, 2015 at 03:37:37PM +0200, Nicolas Schichan wrote: [...] >> diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c >> index b5f470d..ffaf311 100644 >> --- a/arch/arm/net/bpf_jit_32.c

Re: [PATCH 2/4] seccomp: rework seccomp_prepare_filter().

2015-04-30 Thread Nicolas Schichan
p->jited) > fp = bpf_migrate_filter(fp); > > return fp; > } > > From seccomp side, you invoke: > > ... bpf_prepare_filter(fp, seccomp_check_filter); Thanks for the precisions, I'll look into that. -- Nicolas Schichan Freebox SAS -- To unsubscribe from

Re: [PATCH 0/4] Seccomp filter JIT support on ARM.

2015-04-30 Thread Nicolas Schichan
On 04/29/2015 06:37 PM, Daniel Borkmann wrote: > On 04/29/2015 03:37 PM, Nicolas Schichan wrote: > ... >> The fourth and final patch fixes a bug in the emit_udiv() function >> when used to convert a BPF_ALU | BPF_DIV | BPF_K instruction in the >> ARM BPF JIT code. &g

Re: [PATCH 2/4] seccomp: rework seccomp_prepare_filter().

2015-04-30 Thread Nicolas Schichan
On 04/29/2015 07:12 PM, Daniel Borkmann wrote: > On 04/29/2015 03:37 PM, Nicolas Schichan wrote: >> - Try to use the classic BPF JIT via bpf_jit_compile(). >> >> - Use bpf_migrate_filter() from NET filter code instead of the double >>bpf_convert_filter() followed

[PATCH 3/4] ARM: net: add JIT support for loads from struct seccomp_data.

2015-04-29 Thread Nicolas Schichan
Signed-off-by: Nicolas Schichan --- arch/arm/net/bpf_jit_32.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c index e1268f9..b5f470d 100644 --- a/arch/arm/net/bpf_jit_32.c +++ b/arch/arm/net/bpf_jit_32.c @@ -852,6 +852,16

[PATCH 4/4] ARM: net fix emit_udiv() for BPF_ALU | BPF_DIV | BPF_K intruction.

2015-04-29 Thread Nicolas Schichan
In that case, emit_udiv() will be called with rn == ARM_R0 (r_scratch) and loading rm first into ARM_R0 will result in jit_udiv() function being called the same dividend and divisor. Fix that by loading rn first into ARM_R1 and then rm into ARM_R0. Signed-off-by: Nicolas Schichan --- arch/arm

[PATCH 0/4] Seccomp filter JIT support on ARM.

2015-04-29 Thread Nicolas Schichan
BPF_ALU | BPF_DIV | BPF_K instruction in the ARM BPF JIT code. Regards, Nicolas Schichan (4): net: filter: make bpf_migrate_filter available outside of net/core/filter.c seccomp: rework seccomp_prepare_filter(). ARM: net: add JIT support for loads from struct seccomp_data. ARM: net

[PATCH 2/4] seccomp: rework seccomp_prepare_filter().

2015-04-29 Thread Nicolas Schichan
- Try to use the classic BPF JIT via bpf_jit_compile(). - Use bpf_migrate_filter() from NET filter code instead of the double bpf_convert_filter() followed by bpf_prog_select_runtime() if classic bpf_jit_compile() did not succeed in producing native code. Signed-off-by: Nicolas Schichan

[PATCH 1/4] net: filter: make bpf_migrate_filter available outside of net/core/filter.c

2015-04-29 Thread Nicolas Schichan
This is in preparation of its use in the seccomp code. Signed-off-by: Nicolas Schichan --- include/linux/filter.h | 1 + net/core/filter.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/filter.h b/include/linux/filter.h index caac208..7e0811b 100644

[PATCH] MIPS: bcm63xx: move bcm63xx_gpio_init() to bcm63xx_register_devices().

2015-03-12 Thread Nicolas Schichan
works. Fixes: 14e85c0e69d5 ("gpio: remove gpio_descs global array") Signed-off-by: Nicolas Schichan --- arch/mips/bcm63xx/prom.c | 4 arch/mips/bcm63xx/setup.c | 4 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/mips/bcm63xx/prom.c b/arch/mips/bcm63xx/pr

Re: [PATCH v1] mv643xx_eth: only account for work done in rxq_process in poll callback.

2015-03-06 Thread Nicolas Schichan
On 03/04/2015 10:32 PM, Francois Romieu wrote: > Nicolas Schichan : >> @@ -1050,7 +1049,7 @@ static int txq_reclaim(struct tx_queue *txq, int >> budget, int force) >> __netif_tx_lock_bh(nq); >> >> reclaimed = 0; >> -while (recla

[PATCH v1] mv643xx_eth: only account for work done in rxq_process in poll callback.

2015-03-04 Thread Nicolas Schichan
Link events, txq_reclaim() and rxq_refill() work are no longer accounted against budget. As a result, also change txq_reclaim() and rxq_refill() not to take a budget parameter anymore. Signed-off-by: Nicolas Schichan --- drivers/net/ethernet/marvell/mv643xx_eth.c | 25

Re: [PATCH] bcm63xx_enet: fix poll callback.

2015-03-03 Thread Nicolas Schichan
On 03/03/2015 03:18 PM, Eric Dumazet wrote: > On Tue, 2015-03-03 at 14:53 +0100, Nicolas Schichan wrote: >> On 03/03/2015 02:42 PM, Eric Dumazet wrote: >>>> To avoid that, I would take priv->tx_lock only once, or add a limit on >>>> the number o

Re: [PATCH] bcm63xx_enet: fix poll callback.

2015-03-03 Thread Nicolas Schichan
an support SMP though. Regards, -- Nicolas Schichan Freebox SAS -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

[PATCH] bcm63xx_enet: fix poll callback.

2015-03-03 Thread Nicolas Schichan
. Fix that by only accounting the rx work done in the poll callback. Signed-off-by: Nicolas Schichan --- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.c b/drivers/net/ethernet

Re: [PATCH] bcm63xx_enet: fix poll callback.

2015-03-03 Thread Nicolas Schichan
s to account the tx buffer reclaim in the work done in its poll callback. I'll send an updated patch. Thanks, -- Nicolas Schichan Freebox SAS -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More ma

[PATCH] bcm63xx_enet: fix poll callback.

2015-03-02 Thread Nicolas Schichan
In case there was some tx buffer reclaimed and not enough rx packets to consume the whole budget, napi_complete would not be called and interrupts would be kept disabled, effectively resulting in the network core never to call the poll callback again and no rx/tx interrupts to be fired either. Fix

Re: [PATCH 03/16] tty: serial: 8250_core: read only RX if there is something in the FIFO

2015-02-10 Thread Nicolas Schichan
* routines or the previous session. */ + show_lsr_iir(port); if (serial_port_in(port, UART_LSR) & UART_LSR_DR) serial_port_in(port, UART_RX); serial_port_in(port, UART_IIR); Regards, -- Nicolas Schichan Freebox SAS -- To unsubscribe from this list

Re: [PATCH 03/16] tty: serial: 8250_core: read only RX if there is something in the FIFO

2015-02-09 Thread Nicolas Schichan
e problem on a 3.18 kernel. Regards, -- Nicolas Schichan Freebox SAS -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

[PATCH] md: check command validity early in md_ioctl().

2014-01-15 Thread Nicolas Schichan
hold_active is 0 md_open() mddev_find() -> returns a newly allocated mddev with mddev->gendisk == NULL -> returns with ERESTARTSYS (kernel restarts the open syscall) Signed-off-by: Nicolas Schichan --- A couple of notes: This patch is based on linux 3.13-rc8. The

Re: livelock during MD device open

2014-01-15 Thread Nicolas Schichan
your two suggestions I much prefer the second. It will be more code, but it is also more obviously correct. The current code is rather messy with respect to invalid ioctl commands. I would be happy to accept a patch which aborted md_ioctl if the cmd wasn't one of those known to md. I

livelock during MD device open

2014-01-14 Thread Nicolas Schichan
eferred way to fix this, I'll be glad to send a patch for whatever is the preferred solution. I have also a simple C program that I can send should you want to reproduce the issue. Regards, -- Nicolas Schichan Freebox SAS -- To unsubscribe from this list: send the line "unsubscribe li

Re: Spurious timeouts in mvmdio

2013-12-17 Thread Nicolas Schichan
My original patch changed "timeout" before the entering the while loop, but I'm fine with your patch too. Feel free to add my: Tested-by: Nicolas Schichan Regards, -- Nicolas Schichan Freebox SAS -- To unsubscribe from this list: send the line "unsubscribe linux-kernel"

Re: Spurious timeouts in mvmdio

2013-12-16 Thread Nicolas Schichan
dev_err(bus->parent, "Timeout: SMI busy for too long\n"); + return -ETIMEDOUT; } Hi Russell, I did not find any commit for this in 3.13-rc4. Would you prefer I submit my attempt at refactoring the orion_mdio_wait_ready() code ? Regards, -- Nicolas Schichan Freebox SA

Re: Spurious timeouts in mvmdio

2013-12-04 Thread Nicolas Schichan
MV88F6282 both in polling and irq mode and it works just fine. I had a similar patch almost ready to submit but you were faster than me. Feel free to add my: Tested-by: Nicolas Schichan Thanks, -- Nicolas Schichan Freebox SAS -- To unsubscribe from this list: send the line "unsubscribe li

Re: Spurious timeouts in mvmdio

2013-12-03 Thread Nicolas Schichan
On 12/03/2013 02:43 PM, Jason Cooper wrote: On Tue, Dec 03, 2013 at 12:40:34PM +, Russell King - ARM Linux wrote: On Tue, Dec 03, 2013 at 07:23:46AM -0500, Jason Cooper wrote: On Mon, Dec 02, 2013 at 04:15:54PM +0100, Nicolas Schichan wrote: During 3.13-rc1 testing, I have found out that

[PATCH] net: mvmdio: fix wait_event_timeout() being called with a 1 jiffy timeout.

2013-12-03 Thread Nicolas Schichan
If a timer interrupt kicks right after the wait_event_timeout() call, we may endup a reporting timeout before the timeout really occured. Signed-off-by: Nicolas Schichan --- drivers/net/ethernet/marvell/mvmdio.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a

Spurious timeouts in mvmdio

2013-12-02 Thread Nicolas Schichan
ch to wait_event_hrtimeout(). I can provide patches for both options. Regards, -- Nicolas Schichan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-i

[PATCH v3.10-rc7] net: fix kernel deadlock with interface rename and netdev name retrieval.

2013-06-26 Thread Nicolas Schichan
cur some unneeded work in the reader process in the contended case, but this is better than deadlocking the system. Signed-off-by: Nicolas Schichan --- include/linux/netdevice.h |1 + net/core/dev.c| 34 ++ net/core/dev_ioctl.c |

Re: [RFC PATCH net-next 0/6] seccomp filter JIT

2013-04-29 Thread Nicolas Schichan
On 04/29/2013 02:18 PM, Nicolas Schichan wrote: My solution also allows the seccomp jit code to be disabled while still allowing jit on socket filters (via a Kconfig option). This might be useful to some people. Please disregard the above, I had missed the fact that the BPF_S_ANC_SECCOMP_LD_W

Re: [PATCH v2 net-next 3/3] ARM: net: bpf_jit_32: support BPF_S_ANC_SECCOMP_LD_W instruction

2013-04-29 Thread Nicolas Schichan
AArch64 and AArch32 tasks. Regards, -- Nicolas Schichan Freebox SAS -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [RFC PATCH net-next 0/6] seccomp filter JIT

2013-04-29 Thread Nicolas Schichan
on also allows the seccomp jit code to be disabled while still allowing jit on socket filters (via a Kconfig option). This might be useful to some people. Regards, -- Nicolas Schichan Freebox SAS -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the bod

[PATCH V3 3/3] ARM: net: bpf_jit: add support for jitted seccomp filters.

2013-04-24 Thread Nicolas Schichan
-by: Nicolas Schichan --- arch/arm/Kconfig |1 + arch/arm/net/bpf_jit_32.c | 37 + 2 files changed, 38 insertions(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 60b9876..d2e5d39 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig

[PATCH V3 1/3] seccomp: add generic code for jitted seccomp filters.

2013-04-24 Thread Nicolas Schichan
ucture can stay opaque when outside kernel/seccomp.c. In a way similar to the net BPF, the jit compilation code is expected to updates struct seccomp_filter.bpf_func pointer (using the correct accessor) to the generated code. Signed-off-by: Nicolas Schichan --- arch/Kconfig

[PATCH V3 2/3] ARM: net: bpf_jit: make code generation less dependent on struct sk_filter.

2013-04-24 Thread Nicolas Schichan
This is in preparation of bpf_jit support for seccomp filters. Signed-off-by: Nicolas Schichan --- arch/arm/net/bpf_jit_32.c | 46 - 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32

[PATCH V3] Support for JIT in Seccomp BPF filters.

2013-04-24 Thread Nicolas Schichan
Hi, This patch serie adds support for jitted seccomp BPF filters, with the required modifications to make it work on the ARM architecture. - The first patch in the serie adds the required boiler plate in the core kernel seccomp code to invoke the JIT compilation/free code. - The second patch r

Re: [PATCH V2 1/3] seccomp: add generic code for jitted seccomp filters.

2013-04-24 Thread Nicolas Schichan
On 04/24/2013 01:43 AM, Andrew Morton wrote: On Mon, 22 Apr 2013 14:31:20 +0200 Nicolas Schichan wrote: Would including instead of in seccomp.h be an acceptable solution ? I have tried that and (with an additional forward declaration of struct sk_buff) an x86_64 "make clean;

Re: [PATCH V2 1/3] seccomp: add generic code for jitted seccomp filters.

2013-04-22 Thread Nicolas Schichan
sk_buff) an x86_64 "make clean; make allmodconfig" run finishes succesfully. If that's ok with you, I can resend the serie with that fix. Regards, -- Nicolas Schichan Freebox SAS -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the b

[PATCH V2 3/3] ARM: net: bpf_jit: add support for jitted seccomp filters.

2013-03-18 Thread Nicolas Schichan
-off-by: Nicolas Schichan --- arch/arm/Kconfig |1 + arch/arm/net/bpf_jit_32.c | 36 2 files changed, 37 insertions(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index dedf02b..b3dce17 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig

[PATCH V2 2/3] ARM: net: bpf_jit: make code generation less dependent on struct sk_filter.

2013-03-18 Thread Nicolas Schichan
This is in preparation of bpf_jit support for seccomp filters. Signed-off-by: Nicolas Schichan --- arch/arm/net/bpf_jit_32.c | 46 - 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32

[PATCH V2 1/3] seccomp: add generic code for jitted seccomp filters.

2013-03-18 Thread Nicolas Schichan
jit compilation code is expected to updates struct seccomp_filter.bpf_func pointer to the generated code. Signed-off-by: Nicolas Schichan --- arch/Kconfig| 14 ++ include/linux/seccomp.h | 41 + kernel/seccomp.c| 34

[PATCH RFC] Support for JIT in Seccomp BPF filters.

2013-03-18 Thread Nicolas Schichan
Hi, This patch serie adds support for jitted seccomp BPF filters, with the required modifications to make it work on the ARM architecture. - The first patch in the serie adds the required boiler plate in the core kernel seccomp code to invoke the JIT compilation/free code. - The second patch r

Re: [PATCH RFC 1/3] seccomp: add generic code for jitted seccomp filters.

2013-03-15 Thread Nicolas Schichan
On 03/15/2013 08:22 PM, Kees Cook wrote: On Fri, Mar 15, 2013 at 12:10 PM, Nicolas Schichan wrote: On 03/15/2013 07:45 PM, Kees Cook wrote: Yes, I did not realise that this header was exported to userspace. Do you know any place not exported to userspace where the structure definition would

Re: [PATCH RFC 1/3] seccomp: add generic code for jitted seccomp filters.

2013-03-15 Thread Nicolas Schichan
On 03/15/2013 07:45 PM, Kees Cook wrote: On Fri, Mar 15, 2013 at 11:28 AM, Nicolas Schichan wrote: +/** + * struct seccomp_filter - container for seccomp BPF programs + * + * @usage: reference count to manage the object lifetime. + * get/put helpers should be used when accessing an

Re: [PATCH RFC 1/3] seccomp: add generic code for jitted seccomp filters.

2013-03-15 Thread Nicolas Schichan
On 03/15/2013 07:28 PM, Nicolas Schichan wrote: [Sorry, I forgot to put the mailing lists as the receivers of the introductory message] Hi, This patch serie adds support for jitted seccomp BPF filters, with the required modifications to make it work on the ARM architecture. - The first patch

[PATCH RFC 2/3] ARM: net: bpf_jit: make code generation less dependent on struct sk_filter.

2013-03-15 Thread Nicolas Schichan
This is in preparation of bpf_jit support for seccomp filters. Signed-off-by: Nicolas Schichan --- arch/arm/net/bpf_jit_32.c | 46 - 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32

[PATCH RFC 3/3] ARM: net: bpf_jit: add support for jitted seccomp filters.

2013-03-15 Thread Nicolas Schichan
is a wrapper around seccomp_bpf_load(). Signed-off-by: Nicolas Schichan --- arch/arm/Kconfig |1 + arch/arm/net/bpf_jit_32.c | 44 2 files changed, 45 insertions(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index dedf02b..b3dce17

[PATCH RFC 1/3] seccomp: add generic code for jitted seccomp filters.

2013-03-15 Thread Nicolas Schichan
jit compilation code is expected to updates struct seccomp_filter.bpf_func pointer to the generated code. Signed-off-by: Nicolas Schichan --- arch/Kconfig| 14 ++ include/linux/seccomp.h | 39 +++ kernel/seccomp.c| 34

[PATCH] seccomp: allow BPF_XOR based ALU instructions.

2013-03-15 Thread Nicolas Schichan
Signed-off-by: Nicolas Schichan --- kernel/seccomp.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/seccomp.c b/kernel/seccomp.c index 5af44b5..b7a1004 100644 --- a/kernel/seccomp.c +++ b/kernel/seccomp.c @@ -160,6 +160,8 @@ static int seccomp_check_filter(struct sock_filter

Re: [PATCH] ARM: net: bpf_jit: fix emit_swap16() for non ARMv6+.

2013-02-14 Thread Nicolas Schichan
On 02/13/2013 10:32 PM, Mircea Gherzan wrote: [...] Acked-by: Mircea Gherzan Hi, Thanks Mircea. Russel, David, do you have any preference as to which path this patch should take (net tree or ARM tree) ? Regards, -- Nicolas Schichan Freebox SAS -- To unsubscribe from this list: send the

[PATCH] ARM: net: bpf_jit: fix emit_swap16() for non ARMv6+.

2013-02-13 Thread Nicolas Schichan
The original code was generating an lsl instructions using the value of ARM_R8 (skb_headlen, possibly uninitialized if no skb_headlen access was required) as a shift amount. Signed-off-by: Nicolas Schichan --- Resent due to missing Signed-off-by arch/arm/net/bpf_jit_32.c | 15

[PATCH] ARM: net: bpf_jit: fix emit_swap16() for non ARMv6+.

2013-02-13 Thread Nicolas Schichan
The original code was generating an lsl instructions using the value of ARM_R8 (skb_headlen, possibly uninitialized if no skb_headlen access was required) as a shift amount. --- arch/arm/net/bpf_jit_32.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/arch/ar

Re: [PATCH 1/2] ARM: net: bpf_jit_32: fix kzalloc gfp/size mismatch.

2012-12-10 Thread Nicolas Schichan
On 12/08/2012 12:04 AM, Mircea Gherzan wrote: Am 06.12.2012 15:38, schrieb Nicolas Schichan: [...] Acked-by: Mircea Gherzan Hi, Thanks for acking those two patches. Shall I send them to the patch system now ? Regards, -- Nicolas Schichan Freebox SAS -- To unsubscribe from this list: send

[PATCH 2/2] ARM: net: bpf_jit_32: fix sp-relative load/stores offsets.

2012-12-06 Thread Nicolas Schichan
tcpdump -ni eth0 "ether[1] + ether[2] - ether[3] * ether[4] - ether[5] \ == -0x3AA" # this will not. This bug was present since the original inclusion of bpf_jit for ARM (ddecdfce: ARM: 7259/3: net: JIT compiler for packet filters). Signed-off-by: Nicolas Schichan --- arch/a

  1   2   >