* Add a new cpuset_scnprintf and a sysctl flag to control how cpumask sets
are printed. The default is to use the current cpumask_scnprintf. If
kernel.compat_cpuset_printf is '0' (default 1), then cpulist_scnprintf
is used. In addition, a nodeset_scnprintf is provided for compatibilty.
This is introduced with a CONFIG_KERN_COMPAT_CPUSET_PRINTF flag which
currently is only defined for X86_64_SMP architecture. For all other
architectures the current cpumask_scnprintf() is used.
* Modify usages of cpumask_scnprintf to use the new cpuset_scnprintf where
appropriate. The list of files affected are:
arch/x86/kernel/cpu/intel_cacheinfo.c
drivers/base/node.c
drivers/base/topology.c
drivers/pci/pci-sysfs.c
drivers/pci/probe.c
kernel/irq/proc.c
kernel/profile.c
kernel/sched_stats.h
kernel/sysctl.c
kernel/sysctl_check.c
kernel/trace/trace.c
Note that kernel/sched.c is not in this patchset as it has many other changes,
so the change to use cpuset_scnprintf is in another patchset.
For inclusion in x86/latest.
Based on:
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
+ x86/latest .../x86/linux-2.6-x86.git
+ sched-devel/latest .../mingo/linux-2.6-sched-devel.git
Cc: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Mike Travis <travis@sgi.com>
---
The discussion that led up to this...
On Fri, Mar 28, 2008 at 3:40 PM, Mike Travis <travis@sgi.com> wrote:
...
But you can declare it as a programming error on user space side. If
you change the format, the brown-paper-bag is yours.
On Mon, Mar 31, 2008 at 6:35 PM, Mike Travis <travis@sgi.com> wrote:
I ask myself, why is there a temporary buffer allocation in the first
place? In the end it is copied unbounded into the provided buf
argument. Sure your list is mostly shorter than a hex mask, but you
can also not be sure that it fit into the provided buffer. So you can
also use cpumask_scnprintf directly with the buf argument, and provide
a good known upper bound for the size (ie.
cpumask_scnprintf_len(nr_cpu_ids)).
--
--
| Greg Kroah-Hartman | [PATCH 005/196] Chinese: add translation of SubmittingDrivers |
| Nick Piggin | [patch] my mmu notifier sample driver |
| Sean | Re: [AppArmor 39/45] AppArmor: Profile loading and manipulation, pathname matching |
| Arjan van de Ven | [Patch v2] Make PCI extended config space (MMCONFIG) a driver opt-in |
git: | |
| Antonio Almeida | HTB accuracy for high speed |
| Gerrit Renker | [PATCH 0/37] dccp: Feature negotiation - last call for comments |
| Jens Axboe | Re: [BUG] New Kernel Bugs |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
