Re: [git pull V2] headers_check fixes

Arnd Bergmann
2009-01-30T20:40:59Z

On Friday 30 January 2009, Ingo Molnar wrote:
> Sam, would you mind to remove the CONFIG_* warnings from headers_check,
> and get that commit to Linus ASAP? (or we can put it into this branch too,
> if you prefer it that way)
>
> Those warnings wont be worked around in the headers and that check litters
> the CONFIG_HEADER_CHECK=y build with warnings right now and make it
> impossible to reach a warning-free build.

I double-checked the remaining CONFIG_* warnings in this version to make sure
that we are not dropping any warnings about actual bugs. There are a few places
where the kernel exports more than it should, but there is a lot more of that
without warnings, so that's fine.

The only places that believe to be bugs that needs fixing are in
<linux/kvm.h> and <asm-x86/ptrace-abi.h>. Avi has a patch for kvm.h
that in the kvm tree.

Below, you can find a patch for the remaining problem.

Arnd <><
---

Subject: x86: export PTRACE_BTS interfaces to user space

The definitions for PTRACE_BTS_* are inside of #ifdef CONFIG_X86_PTRACE_BTS,
which means that they are invisible to user space. Remove the #ifdef so
that the interface becomes visible.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

--- a/arch/x86/include/asm/ptrace-abi.h
+++ b/arch/x86/include/asm/ptrace-abi.h
@@ -80,8 +80,6 @@

#define PTRACE_SINGLEBLOCK 33 /* resume execution until next branch */

-#ifdef CONFIG_X86_PTRACE_BTS
-
#ifndef __ASSEMBLY__
#include <linux/types.h>

@@ -140,6 +138,5 @@ struct ptrace_bts_config {
BTS records are read from oldest to newest.
Returns number of BTS records drained.
*/
-#endif /* CONFIG_X86_PTRACE_BTS */

#endif /* _ASM_X86_PTRACE_ABI_H */