Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1169737

Re: [PATCH] lib: test_bpf: purge CPP register redefinitions

From Richard Weinberger <richard@nod.at>
Newsgroups linux.kernel
Subject Re: [PATCH] lib: test_bpf: purge CPP register redefinitions
Date 2015-06-22 09:00 +0200
Message-ID <pE3S2-4xB-11@gated-at.bofh.it> (permalink)
References <pDTpE-6oD-1@gated-at.bofh.it> <pE35D-3Do-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Am 22.06.2015 um 08:05 schrieb Alexei Starovoitov:
> to get rid of warning you proposing to do 1k line renames?!
> Just add:
> +#undef R8
> +#undef R9
> +#undef R10
>  #define R0             BPF_REG_0

This would be also just another hack.

> Though I think the better fix woud be to clean up:
> arch/x86/include/uapi/asm/ptrace-abi.h
> What's the point of:
> #define R8 72
> from 'uapi' point of view?

To query cpu registers using ptrace(2).

> Look like kernel details that shouldn't be exposed in uapi.

These are not kernel details.

Actually the problem is the other way around.
UML is Linux ported to it's own userspace ABI.
Hence, the arch/um and arch/x86/um use uapi header files.

Maybe we can rework UML's header files such that
no uapi header pollutes the kernel namespace.

That said, lib/test_bpf.c should still not use
defines like R8 as such symbols are very generic.

Thanks,
//richard
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH] lib: test_bpf: purge CPP register redefinitions Alexei Starovoitov <alexei.starovoitov@gmail.com> - 2015-06-22 08:10 +0200
  Re: [PATCH] lib: test_bpf: purge CPP register redefinitions Richard Weinberger <richard@nod.at> - 2015-06-22 09:00 +0200

csiph-web