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: <20210329092449.GA8484@alpha.franken.de>
Date:   Mon, 29 Mar 2021 11:24:49 +0200
From:   Thomas Bogendoerfer <tsbogend@...ha.franken.de>
To:     Tiezhu Yang <yangtiezhu@...ngson.cn>
Cc:     linux-mips@...r.kernel.org, bpf@...r.kernel.org,
        linux-kernel@...r.kernel.org, Xuefeng Li <lixuefeng@...ngson.cn>
Subject: Re: [PATCH v3] MIPS/bpf: Enable bpf_probe_read{, str}() on MIPS again

On Thu, Mar 25, 2021 at 08:50:01PM +0800, Tiezhu Yang wrote:
> After commit 0ebeea8ca8a4 ("bpf: Restrict bpf_probe_read{, str}() only to
> archs where they work"), bpf_probe_read{, str}() functions were no longer
> available on MIPS, so there exist some errors when running bpf program:
> 
> root@...ux:/home/loongson/bcc# python examples/tracing/task_switch.py
> bpf: Failed to load program: Invalid argument
> [...]
> 11: (85) call bpf_probe_read#4
> unknown func bpf_probe_read#4
> [...]
> Exception: Failed to load BPF program count_sched: Invalid argument
> 
> ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE should be restricted to archs
> with non-overlapping address ranges, but they can overlap in EVA mode
> on MIPS, so select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE if !EVA in
> arch/mips/Kconfig, otherwise the bpf old helper bpf_probe_read() will
> not be available.
> 
> This is similar with the commit d195b1d1d119 ("powerpc/bpf: Enable
> bpf_probe_read{, str}() on powerpc again").
> 
> Fixes: 0ebeea8ca8a4 ("bpf: Restrict bpf_probe_read{, str}() only to archs where they work")
> Signed-off-by: Tiezhu Yang <yangtiezhu@...ngson.cn>
> ---
> 
> v3: Select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE if !EVA
>     on MIPS.
> 
> v2: update the commit message to fix typos found by
>     Sergei Shtylyov, thank you!
> 
>     not longer --> no longer
>     there exists --> there exist
> 
>  arch/mips/Kconfig | 1 +
>  1 file changed, 1 insertion(+)

applied to mips-next.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ