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] [thread-next>] [day] [month] [year] [list]
Message-ID: <f1a6eea5-48e2-9418-815a-c6eede462afc@loongson.cn>
Date:   Tue, 17 Oct 2023 20:33:24 +0800
From:   Tiezhu Yang <yangtiezhu@...ngson.cn>
To:     Huacai Chen <chenhuacai@...nel.org>
Cc:     Josh Poimboeuf <jpoimboe@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        loongarch@...ts.linux.dev, linux-kernel@...r.kernel.org,
        loongson-kernel@...ts.loongnix.cn
Subject: Re: [PATCH v2 8/8] LoongArch: Add ORC unwinder support



On 10/14/2023 07:40 PM, Huacai Chen wrote:
> On Mon, Oct 9, 2023 at 9:03 PM Tiezhu Yang <yangtiezhu@...ngson.cn> wrote:
>>
>> The kernel CONFIG_UNWINDER_ORC option enables the ORC unwinder, which is
>> similar in concept to a DWARF unwinder. The difference is that the format
>> of the ORC data is much simpler than DWARF, which in turn allows the ORC
>> unwinder to be much simpler and faster.

...

>> diff --git a/arch/loongarch/configs/loongson3_defconfig b/arch/loongarch/configs/loongson3_defconfig
>> index a3b52aa..de911c3 100644
>> --- a/arch/loongarch/configs/loongson3_defconfig
>> +++ b/arch/loongarch/configs/loongson3_defconfig
>> @@ -5,6 +5,7 @@ CONFIG_NO_HZ=y
>>  CONFIG_HIGH_RES_TIMERS=y
>>  CONFIG_BPF_SYSCALL=y
>>  CONFIG_BPF_JIT=y
>> +CONFIG_BPF_JIT_ALWAYS_ON=y
> Does BPF have something to do with ORC?

This is to avoid the following warning:

  CC      kernel/bpf/core.o
{standard input}: Assembler messages:
{standard input}:10805: Warning: setting incorrect section attributes 
for .rodata..c_jump_table
kernel/bpf/core.o: warning: objtool: ___bpf_prog_run+0x44: sibling call 
from callable instruction with modified stack frame

Because -fno-jump-tables is specified in arch/loongarch/Makefile
for now, but __annotate_jump_table is used in ___bpf_prog_run().

#ifndef CONFIG_BPF_JIT_ALWAYS_ON
...
static u64 ___bpf_prog_run(u64 *regs, const struct bpf_insn *insn)
{
...
	static const void * const jumptable[256] __annotate_jump_table = {
...
}
#endif

I think we can remove CONFIG_BPF_JIT_ALWAYS_ON in defconfig now
due to the warning is harmless.

Thanks,
Tiezhu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ