lkml.org 
[lkml]   [2021]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [peterz-queue:perf/core 18/22] kernel/events/core.c:6418:22: sparse: sparse: incorrect type in assignment (different address spaces)
On Thu, Apr 15, 2021 at 11:03:09AM +0200, Marco Elver wrote:
> On Thu, Apr 15, 2021 at 10:48AM +0200, Peter Zijlstra wrote:

> > I've ended up with the below delta, does that work for you?
>
> Thanks, that works for me. Do note that I explicitly chose u64 for
> sig_addr/pending_addr because data->addr is u64. There might be a new
> warning about the u64 to unsigned long assignment on 32 bit arches.

My local i386-defconfig build seemed happy now. Mostly I think you're
allowed to silently truncate between base integer types. We'll see..
maybe some other compiler.

> Perhaps it needs something ugly like this:
>
> info.si_addr = (void __user *)(unsigned long)event->pending_addr;
>
> if pending_addr wants to be u64. Or just
>
> event->pending_addr = (unsigned long)data->addr;
>
> if data->addr being u64 on 32 bit arches is simply overkill.

Yeah it is. It's u64 for data layout purposes, the perf buffer works in
u64 chunks.

\
 
 \ /
  Last update: 2021-04-15 11:12    [W:0.155 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site