lkml.org 
[lkml]   [2023]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 8/8] LoongArch: Add ORC unwinder support
From
Date


On 10/14/2023 07:40 PM, Huacai Chen wrote:
> On Mon, Oct 9, 2023 at 9:03 PM Tiezhu Yang <yangtiezhu@loongson.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

\
 
 \ /
  Last update: 2023-10-17 14:34    [W:0.209 / U:0.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site