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:	Wed, 4 Feb 2009 13:14:31 +1030
From:	Rusty Russell <rusty@...tcorp.com.au>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	travis@....com, mingo@...hat.com, davej@...hat.com,
	cpufreq@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] work_on_cpu: Use our own workqueue.

On Tuesday 03 February 2009 14:36:49 Andrew Morton wrote:
> But as you say, rdmsr_on_cpu() is easy to do, using
> smp_call_function_single().  Then we can easily convert all other
> work_on_cpu() callers to smp_call_function_single() and zap
> work_on_cpu().  The best outcome, methinks.

grepping for set_cpus_allowed reveals the following users in the
first third (when I got tired of it):

File                         Function            Context      Calls
powerpc/kernel/smp.c         smp_cpus_done       kernel_init smp_ops->setup_cpu()
x86/.../speedstep-ich.c      _speedstep_get      cpufreq     speedstep_get_processor_frequency()
x86/.../powernow-k8.c        check_supported_cpu cpufreq     cpuid_*()
x86/.../powernow-k8.c        powernowk8_target   cpufreq     mutex_lock, etc
x86/.../powernow-k8.c        powernowk8_cpu_init boot/hotplg rdmsr,wrmsr
x86/.../powernow-k8.c        powernowk8_get      cpufreq     rdmsr
x86/.../speedstep-centrino.c get_cur_freq        cpufreq     rdmsr
x86/.../speedstep-centrino.c centrino_target     cpufreq     rdmsr,wrmsr
x86/kernel/reboot.c          nativ..._shutdown   sys_reboot  misc
x86/.../microcode_core.c     do_microcode_update sys_write   microcode_ops->request_microcode_user
x86/.../microcode_core.c     reload_store        sys_write   mutex_lock, etc

Some of these (reboot) we don't care what they do to cpumask.  Some are
poor style, but not critical (boot time).  Some can use smp_call_function.

But there are some which should *not* be frobbing their cpus_allowed, and
really do seem to want a user context.

I think you're right though: smp_call_function_single (or neat wrappers)
where possible, work_on_cpu which can fail for the others, and we'll just
have to plumb in the error returns.

I'll start the patchstream for 2.6.30.

Thanks,
Rusty.
--
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