From: Peter Zijlstra <peterz@infradead.org>
To: Marco Elver <elver@google.com>
Cc: kbuild-all@lists.01.org, kernel test robot <lkp@intel.com>,
linux-kernel@vger.kernel.org
Subject: Re: [peterz-queue:perf/core 18/22] kernel/events/core.c:6418:22: sparse: sparse: incorrect type in assignment (different address spaces)
Date: Thu, 15 Apr 2021 11:11:44 +0200 [thread overview]
Message-ID: <YHgDUEX7ogOkb60O@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <YHgBTRciZNDUkfId@elver.google.com>
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.
prev parent reply other threads:[~2021-04-15 9:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <202104142209.hLOfOONR-lkp@intel.com>
2021-04-14 14:33 ` Marco Elver
2021-04-15 8:48 ` Peter Zijlstra
2021-04-15 9:03 ` Marco Elver
2021-04-15 9:11 ` Peter Zijlstra [this message]
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=YHgDUEX7ogOkb60O@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=elver@google.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
/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
Powered by JetHome