Skip to content

Commit b99a95b

Browse files
zenczykowskiAlexei Starovoitov
authored andcommitted
bpf: fix UML x86_64 compile failure
pcpu_hot (defined in arch/x86) is not available on user mode linux (ARCH=um) Cc: Andrii Nakryiko <andrii@kernel.org> Cc: John Fastabend <john.fastabend@gmail.com> Cc: Alexei Starovoitov <ast@kernel.org> Fixes: 1ae6921 ("bpf: inline bpf_get_smp_processor_id() helper") Signed-off-by: Maciej Żenczykowski <maze@google.com> Link: https://lore.kernel.org/r/20240613173146.2524647-1-maze@google.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
1 parent ceb65eb commit b99a95b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/bpf/verifier.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20320,7 +20320,7 @@ static int do_misc_fixups(struct bpf_verifier_env *env)
2032020320
goto next_insn;
2032120321
}
2032220322

20323-
#ifdef CONFIG_X86_64
20323+
#if defined(CONFIG_X86_64) && !defined(CONFIG_UML)
2032420324
/* Implement bpf_get_smp_processor_id() inline. */
2032520325
if (insn->imm == BPF_FUNC_get_smp_processor_id &&
2032620326
prog->jit_requested && bpf_jit_supports_percpu_insn()) {

0 commit comments

Comments
 (0)