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: <CA+8MBbJiQeP3SHoqM+D0v6q5oOvaDgwr7RnFNJZ=TS8oPpoa5A@mail.gmail.com>
Date:	Tue, 26 May 2015 13:45:04 -0700
From:	Tony Luck <tony.luck@...il.com>
To:	Rusty Russell <rusty@...tcorp.com.au>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Fenghua Yu <fenghua.yu@...el.com>,
	"linux-ia64@...r.kernel.org" <linux-ia64@...r.kernel.org>
Subject: Re: [PATCH 06/16] ia64: fix up obsolete cpu function usage.

On Mon, Mar 2, 2015 at 3:35 AM, Rusty Russell <rusty@...tcorp.com.au> wrote:
> Thanks to spatch, then a sweep for for_each_cpu_mask => for_each_cpu.
>
> Signed-off-by: Rusty Russell <rusty@...tcorp.com.au>

I'm seeing a bunch of warnings building the ia64 tree:

arch/ia64/kernel/smpboot.c:437: warning: passing argument 2 of
'cpumask_set_cpu' discards qualifiers from pointer target type
arch/ia64/kernel/smpboot.c:478: warning: passing argument 2 of
'cpumask_test_cpu' discards qualifiers from pointer target type
arch/ia64/kernel/smpboot.c:484: warning: passing argument 2 of
'cpumask_test_cpu' discards qualifiers from pointer target type
arch/ia64/kernel/smpboot.c:544: warning: passing argument 2 of
'cpumask_set_cpu' discards qualifiers from pointer target type
arch/ia64/kernel/smpboot.c:568: warning: passing argument 2 of
'cpumask_set_cpu' discards qualifiers from pointer target type
arch/ia64/kernel/smpboot.c:676: warning: passing argument 2 of
'cpumask_clear_cpu' discards qualifiers from pointer target type
arch/ia64/kernel/smpboot.c:747: warning: passing argument 2 of
'cpumask_test_cpu' discards qualifiers from pointer target type

which track back to these lines from this commit:

$ git show 5d2068da8d339e4dff8f9b9a1246e6a79e2949d8 | grep cpu_callin_map
- cpu_set(cpuid, cpu_callin_map);
+ cpumask_set_cpu(cpuid, &cpu_callin_map);
- if (cpu_isset(cpu, cpu_callin_map))
+ if (cpumask_test_cpu(cpu, &cpu_callin_map))
- if (!cpu_isset(cpu, cpu_callin_map)) {
+ if (!cpumask_test_cpu(cpu, &cpu_callin_map)) {
- cpu_set(0, cpu_callin_map);
+ cpumask_set_cpu(0, &cpu_callin_map);
- cpu_set(smp_processor_id(), cpu_callin_map);
+ cpumask_set_cpu(smp_processor_id(), &cpu_callin_map);
- cpu_clear(cpu, cpu_callin_map);
+ cpumask_clear_cpu(cpu, &cpu_callin_map);
- if (cpu_isset(cpu, cpu_callin_map))
+ if (cpumask_test_cpu(cpu, &cpu_callin_map))

The problem being that cpu_callin_map is declared volatile,
which matched the arg type in the declarations for
cpu_set() and cpu_clear() ... but doesn't match the new
fangled cpumask_set_cpu() etc.

Now the new functions do go on to call set_bit()
etc. ... which *do* expect a volatile second argument.

Should cpumask_set_cpu() and friends specify a volatile argument???

-Tony
--
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