lkml.org 
[lkml]   [2022]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf: Allow restricted kernel breakpoints on user addresses
On Fri, Sep 02, 2022 at 12:00:57PM +0200, Marco Elver wrote:
> Allow the creation of restricted breakpoint perf events that also fire
> in the kernel (!exclude_kernel), if:
>
> 1. No sample information is requested; samples may contain IPs,
> registers, or other information that may disclose kernel addresses.
>
> 2. The breakpoint (viz. data watchpoint) is on a user address.
>
> The rules constrain the allowable perf events such that no sensitive
> kernel information can be disclosed.
>
> Despite no explicit kernel information disclosure, the following
> questions may need answers:
>
> 1. Is obtaining information that the kernel accessed a particular
> user's known memory location revealing new information?
> Given the kernel's user space ABI, there should be no "surprise
> accesses" to user space memory in the first place.
>
> 2. Does causing breakpoints on user memory accesses by the kernel
> potentially impact timing in a sensitive way?
> Since hardware breakpoints trigger regardless of the state of
> perf_event_attr::exclude_kernel, but are filtered in the perf
> subsystem, this possibility already exists independent of the
> proposed change.
>

Changelog forgot to tell us why you want this :-)

I don't see any immediate concerns, but it's late so who knows..

\
 
 \ /
  Last update: 2022-09-06 22:38    [W:0.138 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site