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] [thread-next>] [day] [month] [year] [list]
Message-ID: <4C5C06A6.7070206@kernel.org>
Date:	Fri, 06 Aug 2010 14:57:10 +0200
From:	Tejun Heo <tj@...nel.org>
To:	Namhyung Kim <namhyung@...il.com>
CC:	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] percpu: remove address_space attribute if !SMP

Hello,

On 08/06/2010 02:53 PM, Namhyung Kim wrote:
>> But they should still be accessed through the accessors and if they
>> are accessed through accessors, there shouldn't be sparse warnings
>> regarding them.  Maybe UP accessors are missing proper markups?  Do
>> those warnings only happen on UP config?
>>
> 
> They do nothing on UP.
> quoting from include/asm-generic.h:
> 
> #else /* ! SMP */
> 
> #define per_cpu(var, cpu)			(*((void)(cpu), &(var)))
> #define __get_cpu_var(var)			(var)
> #define __raw_get_cpu_var(var)			(var)
> #define this_cpu_ptr(ptr) per_cpu_ptr(ptr, 0)
> #define __this_cpu_ptr(ptr) this_cpu_ptr(ptr)
> 
> #endif	/* SMP */

Ah, I see.  Then, the right thing to do is to add proper checking and
markups to UP accessors matching the SMP ones.
ie. __verify_pcpu_ptr() verification followed by __kernel __force
casting.  Are you interested in doing it?

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ