lkml.org 
[lkml]   [2023]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/4] Move bp_type_idx to include/linux/hw_breakpoint.h
On Fri, Feb 17, 2023, at 21:23, Thomas Huth wrote:
> From: Palmer Dabbelt <palmer@dabbelt.com>
>
> 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). There are
> multiple in-kernel users, so it's been moved to a kernel header 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>
> Message-Id: <1447119071-19392-10-git-send-email-palmer@dabbelt.com>
> [thuth: Remove it also from tools/include/uapi/linux/hw_breakpoint.h]
> Signed-off-by: Thomas Huth <thuth@redhat.com>

It took me a while to understand this code enough to be confident this
is the right solution. Note that CONFIG_HAVE_MIXED_BREAKPOINTS_REGS is
purely dependent on the architecture and could be replaced with something
that checks for x86||sh but it should be safe to assume that the
enum should never have been part of the uapi header.

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

Arnd

\
 
 \ /
  Last update: 2023-03-27 00:27    [W:0.094 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site