Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1225551
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 09/13] Move bp_type_idx to kernel/event/hw_breakpoint.c |
| Date | 2015-09-15 23:20 +0200 |
| Message-ID | <q95NT-J9-5@gated-at.bofh.it> (permalink) |
| References | <q6UMV-6gS-7@gated-at.bofh.it> <q8KT8-3i1-13@gated-at.bofh.it> <q8Ttn-7nU-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tuesday 15 September 2015 10:06:07 Peter Zijlstra wrote:
> > diff --git a/include/uapi/linux/hw_breakpoint.h b/include/uapi/linux/hw_breakpoint.h
> > index b04000a2296a..7a6a5a7f9511 100644
> > --- a/include/uapi/linux/hw_breakpoint.h
> > +++ b/include/uapi/linux/hw_breakpoint.h
> > @@ -17,14 +17,4 @@ enum {
> > HW_BREAKPOINT_INVALID = HW_BREAKPOINT_RW | HW_BREAKPOINT_X,
> > };
> >
> > -enum bp_type_idx {
> > - TYPE_INST = 0,
> > -#ifdef CONFIG_HAVE_MIXED_BREAKPOINTS_REGS
> > - TYPE_DATA = 0,
> > -#else
> > - TYPE_DATA = 1,
> > -#endif
> > - TYPE_MAX
> > -};
>
> This is rather unfortunate; you are correct that the naming is too
> generic (and I tend to agree), but I think these values are required by
> userspace to fill out:
>
> perf_event_attr::bp_type
>
> So removing them will break things.
>
> Frederic?
If user space actually relies on the definition from this header file,
then it will use the wrong one on x86 and get 'TYPE_DATA = 1', while the
kernel uses 'TYPE_DATA = 0'.
That seems unlikely to work, so I suspect it gets a different definition.
If it uses this definition and it does work, we can probably use
#if defined(__KERNEL__) && defined(CONFIG_HAVE_MIXED_BREAKPOINTS_REGS)
but that requires a comment explaining exactly why that works.
Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH] Remove #ifdef CONFIG_64BIT from all asm-generic/fcntl.h Palmer Dabbelt <palmer@dabbelt.com> - 2015-09-09 23:10 +0200
[PATCH 06/13] Hide ep_take_care_of_epollwakeup() behind #ifdef __KERNEL__ Palmer Dabbelt <palmer@dabbelt.com> - 2015-09-09 23:20 +0200
[PATCH 11/13] Hide MAX_RAW_MINORS behind #ifdef __KERNEL__ Palmer Dabbelt <palmer@dabbelt.com> - 2015-09-09 23:20 +0200
Re: [PATCH 11/13] Hide MAX_RAW_MINORS behind #ifdef __KERNEL__ David Howells <dhowells@redhat.com> - 2015-09-10 13:20 +0200
[PATCH 02/13] Always expose __SYSCALL(... fork ...) Palmer Dabbelt <palmer@dabbelt.com> - 2015-09-09 23:20 +0200
[PATCH 13/13] Re-enable and clean up "check_config()" in headers_check.pl Palmer Dabbelt <palmer@dabbelt.com> - 2015-09-09 23:20 +0200
[PATCH 05/13] Hide some of "struct elf_prstatus" behind #ifdef __KERNEL__ Palmer Dabbelt <palmer@dabbelt.com> - 2015-09-09 23:20 +0200
[PATCH 04/13] Always expose MAP_UNINITIALIZED to userspace Palmer Dabbelt <palmer@dabbelt.com> - 2015-09-09 23:20 +0200
[PATCH 03/13] Hide COMPAT_ATM_ADDPARTY behind #ifdef __KERNEL__ Palmer Dabbelt <palmer@dabbelt.com> - 2015-09-09 23:20 +0200
[PATCH 08/13] Hide MAX_SHARED_LIBS behind #ifdef __KERNEL__ Palmer Dabbelt <palmer@dabbelt.com> - 2015-09-09 23:20 +0200
Re: [PATCH] Remove #ifdef CONFIG_64BIT from all asm-generic/fcntl.h David Howells <dhowells@redhat.com> - 2015-09-10 13:20 +0200
Re: [PATCH] Remove #ifdef CONFIG_64BIT from all asm-generic/fcntl.h David Howells <dhowells@redhat.com> - 2015-09-10 13:20 +0200
Re: [PATCH] Remove #ifdef CONFIG_64BIT from all asm-generic/fcntl.h Palmer Dabbelt <palmer@dabbelt.com> - 2015-09-15 01:00 +0200
[PATCH 06/13] Move ep_take_care_of_epollwakeup() to fs/eventpoll.c Palmer Dabbelt <palmer@dabbelt.com> - 2015-09-15 01:00 +0200
[PATCH 02/13] Use sys_ni.c instead of #ifdef to disable fork on CONFIG_NOMMU Palmer Dabbelt <palmer@dabbelt.com> - 2015-09-15 01:00 +0200
[PATCH 01/13] Remove #ifdef CONFIG_64BIT from all asm-generic/fcntl.h Palmer Dabbelt <palmer@dabbelt.com> - 2015-09-15 01:00 +0200
[PATCH 05/13] Split FDPIC "struct elf_prstatus" to "struct elf_fdpic_prstatus" Palmer Dabbelt <palmer@dabbelt.com> - 2015-09-15 01:00 +0200
Re: [PATCH 05/13] Split FDPIC "struct elf_prstatus" to "struct elf_fdpic_prstatus" David Howells <dhowells@redhat.com> - 2015-09-17 12:20 +0200
[PATCH v3] Remove #ifdef CONFIG_* from all userspace headers Palmer Dabbelt <palmer@dabbelt.com> - 2015-09-15 01:00 +0200
[PATCH 09/13] Move bp_type_idx to kernel/event/hw_breakpoint.c Palmer Dabbelt <palmer@dabbelt.com> - 2015-09-15 01:00 +0200
Re: [PATCH 09/13] Move bp_type_idx to kernel/event/hw_breakpoint.c Peter Zijlstra <peterz@infradead.org> - 2015-09-15 10:10 +0200
Re: [PATCH 09/13] Move bp_type_idx to kernel/event/hw_breakpoint.c Palmer Dabbelt <palmer@dabbelt.com> - 2015-09-15 20:50 +0200
Re: [PATCH 09/13] Move bp_type_idx to kernel/event/hw_breakpoint.c Peter Zijlstra <peterz@infradead.org> - 2015-09-15 21:40 +0200
Re: [PATCH 09/13] Move bp_type_idx to kernel/event/hw_breakpoint.c Palmer Dabbelt <palmer@dabbelt.com> - 2015-09-17 06:00 +0200
Re: [PATCH 09/13] Move bp_type_idx to kernel/event/hw_breakpoint.c Arnd Bergmann <arnd@arndb.de> - 2015-09-15 23:20 +0200
Re: [PATCH 09/13] Move bp_type_idx to kernel/event/hw_breakpoint.c David Howells <dhowells@redhat.com> - 2015-09-17 12:30 +0200
[PATCH 13/13] Re-enable and clean up "check_config()" in headers_check.pl Palmer Dabbelt <palmer@dabbelt.com> - 2015-09-15 01:00 +0200
[PATCH 04/13] Always expose MAP_UNINITIALIZED to userspace Palmer Dabbelt <palmer@dabbelt.com> - 2015-09-15 01:00 +0200
Re: [PATCH 04/13] Always expose MAP_UNINITIALIZED to userspace "Kirill A. Shutemov" <kirill@shutemov.name> - 2015-09-15 02:30 +0200
Re: [PATCH 04/13] Always expose MAP_UNINITIALIZED to userspace Palmer Dabbelt <palmer@dabbelt.com> - 2015-09-15 03:00 +0200
Re: [PATCH 04/13] Always expose MAP_UNINITIALIZED to userspace Josh Triplett <josh@joshtriplett.org> - 2015-09-15 07:20 +0200
Re: [PATCH 04/13] Always expose MAP_UNINITIALIZED to userspace "Kirill A. Shutemov" <kirill@shutemov.name> - 2015-09-15 11:50 +0200
Re: [PATCH 04/13] Always expose MAP_UNINITIALIZED to userspace Josh Triplett <josh@joshtriplett.org> - 2015-09-15 16:20 +0200
Re: [PATCH 04/13] Always expose MAP_UNINITIALIZED to userspace David Howells <dhowells@redhat.com> - 2015-09-17 12:20 +0200
[PATCH 08/13] Move MAX_SHARED_LIBS to fs/binfmt_flat.c Palmer Dabbelt <palmer@dabbelt.com> - 2015-09-15 01:00 +0200
[PATCH 07/13] Make FB_BACKLIGHT_{LEVELS,MAX} always visible Palmer Dabbelt <palmer@dabbelt.com> - 2015-09-15 01:00 +0200
[PATCH 12/13] Remove AT_VECTOR_SIZE_ARCH on x86 Palmer Dabbelt <palmer@dabbelt.com> - 2015-09-15 01:00 +0200
[PATCH 11/13] Always define MAX_RAW_MINORS as 65535 in userspace Palmer Dabbelt <palmer@dabbelt.com> - 2015-09-15 01:00 +0200
Re: [PATCH 11/13] Always define MAX_RAW_MINORS as 65535 in userspace "H. Peter Anvin" <hpa@zytor.com> - 2015-09-15 22:50 +0200
Re: [PATCH 11/13] Always define MAX_RAW_MINORS as 65535 in userspace Palmer Dabbelt <palmer@dabbelt.com> - 2015-09-17 05:10 +0200
[PATCH 10/13] Move USE_WCACHING to drivers/block/pktcdvd.c Palmer Dabbelt <palmer@dabbelt.com> - 2015-09-15 01:00 +0200
[PATCH 03/13] Move COMPAT_ATM_ADDPARTY to net/atm/svc.c Palmer Dabbelt <palmer@dabbelt.com> - 2015-09-15 01:00 +0200
Re: [PATCH 03/13] Move COMPAT_ATM_ADDPARTY to net/atm/svc.c David Howells <dhowells@redhat.com> - 2015-09-17 12:00 +0200
Re: [PATCH 03/13] Move COMPAT_ATM_ADDPARTY to net/atm/svc.c Palmer Dabbelt <palmer@dabbelt.com> - 2015-09-17 23:00 +0200
csiph-web