From: Palmer Dabbelt <palmer@dabbelt.com>
To: peterz@infradead.org
Cc: dave@sr71.net, linux-xtensa@linux-xtensa.org, fweisbec@gmail.com,
dhowells@redhat.com, jcmvbkbc@gmail.com, hpa@zytor.com,
mingo@kernel.org, ast@plumgrid.com, aarcange@redhat.com,
bhe@redhat.com, x86@kernel.org, tomi.valkeinen@ti.com,
3chas3@gmail.com, paulmck@linux.vnet.ibm.com, dyoung@redhat.com,
vgoyal@redhat.com, aishchuk@linux.vnet.ibm.com,
linux-arch@vger.kernel.org, jikos@kernel.org, arnd@arndb.de,
plagnioj@jcrosoft.com, josh@joshtriplett.org, acme@kernel.org,
mathieu.desnoyers@efficios.com, viro@zeniv.linux.org.uk,
luto@kernel.org, tglx@linutronix.de, drysdale@google.com,
chris@zankel.net, iulia.manda21@gmail.com, geoff@infradead.org,
gregkh@linuxfoundation.org, kexec@lists.infradead.org,
linux-kernel@vger.kernel.org, ebiederm@xmission.com,
linux-api@vger.kernel.org, linux-fsdevel@vger.kernel.org,
akpm@linux-foundation.org, davem@davemloft.net
Subject: Re: [PATCH 09/13] Move bp_type_idx to kernel/event/hw_breakpoint.c
Date: Wed, 16 Sep 2015 20:56:00 -0700 (PDT) [thread overview]
Message-ID: <55fa39d0.2c1b450a.6854.4115@mx.google.com> (raw)
In-Reply-To: <20150915193910.GH16853@twins.programming.kicks-ass.net>
On Tue, 15 Sep 2015 12:39:10 PDT (-0700), peterz@infradead.org wrote:
> On Tue, Sep 15, 2015 at 11:40:11AM -0700, Palmer Dabbelt wrote:
>> On Tue, 15 Sep 2015 01:06:07 PDT (-0700), peterz@infradead.org wrote:
>> > On Mon, Sep 14, 2015 at 03:50:43PM -0700, Palmer Dabbelt wrote:
>> >> This has a "#ifdef CONFIG_*" that used to be exposed to userspace.
>> >>
>> >> The names in here are so generic that I don't think it's a good idea
>> >> to expose them to userspace (or even the rest of the kernel). Since
>> >> there's only one kernel user, it's been moved to that file.
>> >>
>> >> Signed-off-by: Palmer Dabbelt <palmer@dabbelt.com>
>> >> Reviewed-by: Andrew Waterman <waterman@eecs.berkeley.edu>
>> >> Reviewed-by: Albert Ou <aou@eecs.berkeley.edu>
>> >> ---
>> >> include/uapi/linux/hw_breakpoint.h | 10 ----------
>> >> kernel/events/hw_breakpoint.c | 10 ++++++++++
>> >> 2 files changed, 10 insertions(+), 10 deletions(-)
>> >>
>> >> 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?
>>
>> perf_event_open(2) says
>>
>> bp_type (since Linux 2.6.33)
>> This chooses the breakpoint type. It is one of:
>>
>> HW_BREAKPOINT_EMPTY
>> No breakpoint.
>>
>> HW_BREAKPOINT_R
>> Count when we read the memory location.
>>
>> HW_BREAKPOINT_W
>> Count when we write the memory location.
>>
>> HW_BREAKPOINT_RW
>> Count when we read or write the memory location.
>>
>> HW_BREAKPOINT_X
>> Count when we execute code at the memory location.
>>
>> The values can be combined via a bitwise or, but the combination
>> of HW_BREAKPOINT_R or HW_BREAKPOINT_W with HW_BREAKPOINT_X is
>> not allowed.
>>
>> so I think removing this enum from userspace is OK. Did I miss
>> something?
>
> Nah, could've just been me not being awake. Unless Frederic says
> otherwise I'll chalk it up to not having drank enough morning juice.
Well, I'm going to leave this alone, then -- as Arnd pointed out in a
later email that got mis-threaded, this would be super tricky to fix
if userspace actually relied on it (which is why I was scared I was
wrong).
v4 (which is hopefully the final version of the patch set) will leave
this as it is.
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2015-09-17 3:56 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1441832902-28993-1-git-send-email-palmer@dabbelt.com>
2015-09-14 22:50 ` [PATCH v3] Remove #ifdef CONFIG_* from all userspace headers Palmer Dabbelt
2015-09-14 22:50 ` [PATCH 01/13] Remove #ifdef CONFIG_64BIT from all asm-generic/fcntl.h Palmer Dabbelt
2015-09-14 22:50 ` [PATCH 02/13] Use sys_ni.c instead of #ifdef to disable fork on CONFIG_NOMMU Palmer Dabbelt
2015-09-14 22:50 ` [PATCH 03/13] Move COMPAT_ATM_ADDPARTY to net/atm/svc.c Palmer Dabbelt
2015-09-17 9:57 ` David Howells
2015-09-17 20:53 ` Palmer Dabbelt
2015-09-14 22:50 ` [PATCH 04/13] Always expose MAP_UNINITIALIZED to userspace Palmer Dabbelt
2015-09-15 0:23 ` Kirill A. Shutemov
2015-09-15 0:52 ` Palmer Dabbelt
2015-09-15 5:19 ` Josh Triplett
2015-09-15 9:42 ` Kirill A. Shutemov
2015-09-15 14:07 ` Josh Triplett
2015-09-17 10:13 ` David Howells
2015-09-14 22:50 ` [PATCH 05/13] Split FDPIC "struct elf_prstatus" to "struct elf_fdpic_prstatus" Palmer Dabbelt
2015-09-17 10:17 ` David Howells
2015-09-14 22:50 ` [PATCH 06/13] Move ep_take_care_of_epollwakeup() to fs/eventpoll.c Palmer Dabbelt
2015-09-14 22:50 ` [PATCH 07/13] Make FB_BACKLIGHT_{LEVELS,MAX} always visible Palmer Dabbelt
2015-09-14 22:50 ` [PATCH 08/13] Move MAX_SHARED_LIBS to fs/binfmt_flat.c Palmer Dabbelt
2015-09-14 22:50 ` [PATCH 09/13] Move bp_type_idx to kernel/event/hw_breakpoint.c Palmer Dabbelt
2015-09-15 8:06 ` Peter Zijlstra
2015-09-15 18:40 ` Palmer Dabbelt
2015-09-15 19:39 ` Peter Zijlstra
2015-09-17 3:56 ` Palmer Dabbelt [this message]
[not found] ` <2023922.x7a6gQp0x7@wuerfel>
2015-09-17 10:28 ` David Howells
2015-09-24 12:15 ` Frederic Weisbecker
2015-09-14 22:50 ` [PATCH 10/13] Move USE_WCACHING to drivers/block/pktcdvd.c Palmer Dabbelt
2015-09-14 22:50 ` [PATCH 11/13] Always define MAX_RAW_MINORS as 65535 in userspace Palmer Dabbelt
2015-09-15 20:42 ` H. Peter Anvin
2015-09-17 3:08 ` Palmer Dabbelt
2015-09-14 22:50 ` [PATCH 12/13] Remove AT_VECTOR_SIZE_ARCH on x86 Palmer Dabbelt
2015-09-14 22:50 ` [PATCH 13/13] Re-enable and clean up "check_config()" in headers_check.pl Palmer Dabbelt
2015-11-03 19:46 ` [PATCH v4] Remove #ifdef CONFIG_* from all userspace headers Palmer Dabbelt
2015-11-03 19:46 ` [PATCH 01/13] Remove #ifdef CONFIG_64BIT from all asm-generic/fcntl.h Palmer Dabbelt
2015-11-03 19:46 ` [PATCH 02/13] Use sys_ni.c instead of #ifdef to disable fork on CONFIG_NOMMU Palmer Dabbelt
2015-11-03 19:46 ` [PATCH 03/13] Move COMPAT_ATM_ADDPARTY to net/atm/svc.c Palmer Dabbelt
2015-11-03 19:46 ` [PATCH 04/13] Always expose MAP_UNINITIALIZED to userspace Palmer Dabbelt
2015-11-03 19:46 ` [PATCH 05/13] Split FDPIC "struct elf_prstatus" to "struct elf_fdpic_prstatus" Palmer Dabbelt
2015-11-03 19:46 ` [PATCH 06/13] Move ep_take_care_of_epollwakeup() to fs/eventpoll.c Palmer Dabbelt
2015-11-03 19:46 ` [PATCH 07/13] Make FB_BACKLIGHT_{LEVELS,MAX} always visible Palmer Dabbelt
2015-11-03 19:46 ` [PATCH 08/13] Move MAX_SHARED_LIBS to fs/binfmt_flat.c Palmer Dabbelt
2015-11-03 19:46 ` [PATCH 09/13] Move bp_type_idx to kernel/event/hw_breakpoint.c Palmer Dabbelt
2015-11-03 21:28 ` kbuild test robot
2015-11-03 21:29 ` kbuild test robot
2015-11-04 11:41 ` Peter Zijlstra
2015-11-04 12:21 ` Peter Zijlstra
2015-11-07 6:44 ` Palmer Dabbelt
2015-11-03 19:46 ` [PATCH 10/13] Move USE_WCACHING to drivers/block/pktcdvd.c Palmer Dabbelt
2015-11-03 19:46 ` [PATCH 11/13] Always define MAX_RAW_MINORS as 2**20 in userspace Palmer Dabbelt
2015-11-03 20:11 ` kbuild test robot
2015-11-03 19:46 ` [PATCH 12/13] Remove AT_VECTOR_SIZE_ARCH on x86 Palmer Dabbelt
2015-11-03 19:46 ` [PATCH 13/13] Re-enable and clean up "check_config()" in headers_check.pl Palmer Dabbelt
2015-11-03 20:25 ` kbuild test robot
2015-11-03 20:26 ` kbuild test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55fa39d0.2c1b450a.6854.4115@mx.google.com \
--to=palmer@dabbelt.com \
--cc=3chas3@gmail.com \
--cc=aarcange@redhat.com \
--cc=acme@kernel.org \
--cc=aishchuk@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=ast@plumgrid.com \
--cc=bhe@redhat.com \
--cc=chris@zankel.net \
--cc=dave@sr71.net \
--cc=davem@davemloft.net \
--cc=dhowells@redhat.com \
--cc=drysdale@google.com \
--cc=dyoung@redhat.com \
--cc=ebiederm@xmission.com \
--cc=fweisbec@gmail.com \
--cc=geoff@infradead.org \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=iulia.manda21@gmail.com \
--cc=jcmvbkbc@gmail.com \
--cc=jikos@kernel.org \
--cc=josh@joshtriplett.org \
--cc=kexec@lists.infradead.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xtensa@linux-xtensa.org \
--cc=luto@kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=plagnioj@jcrosoft.com \
--cc=tglx@linutronix.de \
--cc=tomi.valkeinen@ti.com \
--cc=vgoyal@redhat.com \
--cc=viro@zeniv.linux.org.uk \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox