lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 15 Apr 2021 11:11:44 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Marco Elver <elver@...gle.com>
Cc:     kbuild-all@...ts.01.org, kernel test robot <lkp@...el.com>,
        linux-kernel@...r.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)

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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ