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]
Date:	Fri, 24 Oct 2008 22:15:17 +1100
From:	Rusty Russell <rusty@...tcorp.com.au>
To:	Hiroshi Shimamoto <h-shimamoto@...jp.nec.com>
Cc:	Ingo Molnar <mingo@...e.hu>, Mike Travis <travis@....com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH -tip/cpus4096-v2] cpumask: fix cpumask of call_function_data

On Friday 24 October 2008 15:47:20 Hiroshi Shimamoto wrote:
> From: Hiroshi Shimamoto <h-shimamoto@...jp.nec.com>

Ingo, because of these concerns I recommend you revert
d4de5ac3b5e70928c86e3e5ac311f16cbf2e9ab3 (cpumask: smp_call_function_many())
for now, and apply this less contentious version.

Subject: cpumask: smp_call_function_many()
From: Rusty Russell <rusty@...tcorp.com.au>

Transition from cpumask_t-taking smp_call_function_mask() to a new
smp_call_function_many() which takes a struct cpumask * instead.

(Naming is inspired by smp_call_function_single).

Unfortunately, converting the function implementation properly is
non-trivial, but what we care about is the API, so this simply wraps
it.

Note that the new one returns void: the old one couldn't fail either
unless there was a logic bug.

The old smp_call_function_mask() isn't marked __deprecated, because
sparc64 builds with -Werr in arch/sparc (thanks Stephen).

Signed-off-by: Rusty Russell <rusty@...tcorp.com.au>

diff -r cdd2da35b209 include/linux/smp.h
--- a/include/linux/smp.h	Fri Oct 24 14:10:08 2008 +1100
+++ b/include/linux/smp.h	Fri Oct 24 22:08:55 2008 +1100
@@ -64,8 +64,17 @@ extern void smp_cpus_done(unsigned int m
  * Call a function on all other processors
  */
 int smp_call_function(void(*func)(void *info), void *info, int wait);
+/* Deprecated: use smp_call_function_many() which uses a cpumask ptr. */
 int smp_call_function_mask(cpumask_t mask, void(*func)(void *info), void *info,
 				int wait);
+
+static inline void smp_call_function_many(const struct cpumask *mask,
+					  void (*func)(void *info), void *info,
+					  int wait)
+{
+	smp_call_function_mask(*mask, func, info, wait);
+}
+
 int smp_call_function_single(int cpuid, void (*func) (void *info), void *info,
 				int wait);
 void __smp_call_function_single(int cpuid, struct call_single_data *data);


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