[PATCH 4/4] kvm: Add VFIO device for handling IOMMU cache coherency

2013-10-01 Thread Alex Williamson
So far we've succeeded at making KVM and VFIO mostly unaware of each other, but there's an important point where that breaks down. Intel VT-d hardware may or may not support snoop control. When snoop control is available, intel-iommu promotes No-Snoop transactions on PCIe to be cache coherent.

[PATCH 2/4] kvm/x86: Convert iommu_flags to iommu_noncoherent

2013-10-01 Thread Alex Williamson
Default to operating in coherent mode. This simplifies the logic when we switch to a model of registering and unregistering noncoherent I/O with KVM. Signed-off-by: Alex Williamson alex.william...@redhat.com --- arch/ia64/include/asm/kvm_host.h |2 +- arch/x86/include/asm/kvm_host.h |2

[PATCH 0/4] KVM noncoherent DMA registration and VFIO pseudo device

2013-10-01 Thread Alex Williamson
This is a follow-up to my previous RFC series on this topic. The goal is to unify how KVM manages guests in the presence of non-coherent DMA trafic and provide a way for QEMU to register VFIO groups to enable that support. Since this changes the way KVM handles things like WBINVD, we use the

[PATCH 1/4] kvm: Destroy free KVM devices on release

2013-10-01 Thread Alex Williamson
The KVM device interface allocates a struct kvm_device and calls kvm_device_ops.create on it from KVM VM ioctl KVM_CREATE_DEVICE. This returns a file descriptor to the user for them to set/get/check further attributes. On closing the file descriptor, one would assume that kvm_device_ops.destroy

[PATCH 3/4] kvm: Create non-coherent DMA registeration

2013-10-01 Thread Alex Williamson
We currently use some ad-hoc arch variables tied to legacy KVM device assignment to manage emulation of instructions that depend on whether non-coherent DMA is present. Create an interface for this so that we can register coherency for other devices, like vfio assigned devices. Signed-off-by:

[PATCHv2 1/2] mm: rearrange madvise code to allow for reuse

2013-10-01 Thread Colin Cross
This patch refactors the madvise syscall to allow for parts of it to be reused by a prctl syscall that affects vmas. Move the code that walks vmas in a virtual address range into a function that takes a function pointer as a parameter. The only caller for now is sys_madvise, which uses it to

Re: Fwd: [v3.12-rc1] [regression] PM / hibernate: Create memory bitmaps after freezing user space

2013-10-01 Thread Rafael J. Wysocki
On Tuesday, October 01, 2013 06:38:03 PM Ronald wrote: This could be a coincidence, but I had a disk data corruption in /var (LVM). Most other partitions are read-only during normal operation. So I can safely keep testing this kernel. Just mentioning this, in case you see this happening with

[PATCH v2 0/9] procfs: protect /proc/pid/* files with file-f_cred

2013-10-01 Thread Djalal Harouni
/proc/pid/* entries varies at runtime, appropriate permission checks need to happen during each system call. Currently some of these sensitive entries are protected by performing the ptrace_may_access() check. However even with that the /proc file descriptors can be passed to a more privileged

[PATCH v2 1/9] procfs: add proc_same_open_cred() to check if the cred have changed

2013-10-01 Thread Djalal Harouni
Since /proc entries varies at runtime, permission checks need to happen during each system call. However even with that /proc file descriptors can be passed to a more privileged process (e.g. a suid-exec) which will pass the classic ptrace_may_access() permission check. The open() call will be

Re: Unusually high system CPU usage with recent kernels

2013-10-01 Thread Paul E. McKenney
On Sat, Sep 14, 2013 at 03:59:51PM +0200, Tibor Billes wrote: From: Paul E. McKenney Sent: 09/13/13 02:19 AM On Wed, Sep 11, 2013 at 08:46:04AM +0200, Tibor Billes wrote: From: Paul E. McKenney Sent: 09/09/13 10:44 PM [ . . . ] Sure. The attached tar file contains traces of good

[PATCH v2 2/9] procfs: add proc_allow_access() to check if file's opener may access task

2013-10-01 Thread Djalal Harouni
Since /proc entries varies at runtime, permission checks need to happen during each system call. However even with that /proc file descriptors can be passed to a more privileged process (e.g. a suid-exec) which will pass the classic ptrace_may_access() permission check. The open() call will be

[PATCH v2 3/9] procfs: Document the proposed solution to protect procfs entries

2013-10-01 Thread Djalal Harouni
Note the proposed solution to protect sensitive procfs entries as code comment. Cc: Kees Cook keesc...@chromium.org Suggested-by: Eric W. Biederman ebied...@xmission.com Signed-off-by: Djalal Harouni tix...@opendz.org --- fs/proc/base.c | 11 +++ 1 file changed, 11 insertions(+) diff

Re: [PATCH V4 2/3] pincntrl: add support for AMS AS3722 pin control driver

2013-10-01 Thread Stephen Warren
On 09/24/2013 11:47 AM, Laxman Dewangan wrote: The AS3722 is a compact system PMU suitable for mobile phones, tablets etc. Add a driver to support accessing the GPIO, pinmux and pin configuration of 8 GPIO pins found on the AMS AS3722 through pin control driver and gpiolib. The driver

[PATCH v2 4/9] procfs: make /proc/*/{stack,syscall} 0400

2013-10-01 Thread Djalal Harouni
The /proc/*/{stack,syscall} contain sensitive information and currently its mode is 0444. Change this to 0400 so the VFS will be able to block unprivileged processes from getting file descriptors on arbitrary privileged /proc/*/{stack,syscall} files. This will also avoid doing extra unnecessary

Re: fuse-3.12-fixes?

2013-10-01 Thread Sedat Dilek
On Mon, Sep 30, 2013 at 5:21 PM, Miklos Szeredi mik...@szeredi.hu wrote: On Mon, Sep 30, 2013 at 5:13 PM, Linus Torvalds torva...@linux-foundation.org wrote: On Mon, Sep 30, 2013 at 12:20 AM, Sedat Dilek sedat.di...@gmail.com wrote: any reasons why these fuse-3.12-fixes did not went into

[PATCH v2 5/9] procfs: make /proc entries that use seq files able to access file-f_cred

2013-10-01 Thread Djalal Harouni
In order to check if the cred of current have changed between -open() and -read(), we must able to access the file's opener cred 'file-f_cred' at any point. To make this possible for /proc/*/{stack,personality,stat} pass the 'file struct' as a 3rd argument to single_open() so it will be stored in

[PATCH v2 6/9] procfs: add permission checks on the file's opener of /proc/*/stat

2013-10-01 Thread Djalal Harouni
Some fields of the /proc/*/stat are sensitive fields that need appropriate protection. However, /proc file descriptors can be passed to a more privileged process (e.g. a suid-exec) which will pass the classic ptrace_may_access() permission check during read(). To prevent it, use

[PATCH v2 7/9] procfs: add permission checks on the file's opener of /proc/*/personality

2013-10-01 Thread Djalal Harouni
If current's cred have changed between -open() and -read(), then call proc_allow_access() to check if the original file's opener had enough permissions to access the /proc/*/personality entry during -read(). Cc: Kees Cook keesc...@chromium.org Cc: Eric W. Biederman ebied...@xmission.com

[PATCH v2 8/9] procfs: improve permission checks on /proc/*/stack

2013-10-01 Thread Djalal Harouni
Permission checks need to happen during each system call. Therefore we need to convert the /proc/*/stack entry from a ONE node to a REG node. Doing this will make /proc/*/stack have its own file operations to implement appropriate checks and avoid breaking shared ONE file operations. The patch

[PATCH] [workqueue] check values of pwq and wq in print_worker_info() before use

2013-10-01 Thread Helge Deller
print_worker_info() includes no validity check on the pwq and wq pointers before handing them over to the probe_kernel_read() functions. It seems that most architectures don't care about that, but at least on the parisc architecture this leads to a kernel crash since accesses to page zero are

[PATCH v2 9/9] procfs: improve permission checks on /proc/*/syscall

2013-10-01 Thread Djalal Harouni
Permission checks need to happen during each system call. Therefore we need to convert the /proc/*/syscall entry from an INF node to a REG node. Doing this will make /proc/*/syscall have its own file operations to implement appropriate checks and avoid breaking shared INF file operations. Add the

[PATCH 4/4] ALSA: hda - hdmi: Disable ramp-up/down for non-PCM on AMD codecs

2013-10-01 Thread Anssi Hannula
Recent AMD HDMI codecs (revision ID 3 and later, 0x100300 as reported by procfs codec#0) have a configurable ramp-up/down functionality. The documentation ( http://www.x.org/docs/AMD/AMD_HDA_verbs_v2.pdf ) specifies that 180 (meaning 180/256 =~ 0.7) is recommended for PCM and 0 for non-PCM.

Re: [PATCH 01/10] pwm-backlight: Refactor backlight power on/off

2013-10-01 Thread Thierry Reding
On Tue, Oct 01, 2013 at 12:26:07PM -0600, Stephen Warren wrote: On 09/23/2013 03:40 PM, Thierry Reding wrote: In preparation for adding an optional regulator and enable GPIO to the driver, split the power on and power off sequences into separate functions to reduce code duplication at the

[RFC/RFT v2 0/4] ALSA: hda - hdmi: ATI/AMD multi-channel and HBR support

2013-10-01 Thread Anssi Hannula
Hi all! Here is a second revision of the ATI/AMD multichannel patch, now a patchset. Since the last revision from a bit over the week ago, AMD has released more documentation ( http://www.x.org/docs/AMD/AMD_HDA_verbs_v2.pdf ), so the patchset contains new additions: - HBR bitstreaming support

Re: x86: sort reboot DMI quirks by vendor.

2013-10-01 Thread Dave Jones
Grouping them by vendor should make it easier to spot duplicates. Signed-off-by: Dave Jones da...@fedoraproject.org diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index d9333a4..7692520 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c @@ -136,236 +136,248 @@

[PATCH 1/4] ALSA: hda - hdmi: Add ATI/AMD multi-channel audio support

2013-10-01 Thread Anssi Hannula
ATI/AMD codecs do not support all the standard HDA HDMI/DP functions, instead various vendor-specific verbs are provided. This commit addresses these missing functions: - standard channel mapping support - standard infoframe configuration support ATI/AMD provides their own verbs that allow the

Re: [PATCH V3 1/3] mfd: add support for AMS AS3722 PMIC

2013-10-01 Thread Stephen Warren
On 09/24/2013 05:58 AM, Laxman Dewangan wrote: The AMS AS3722 is a compact system PMU suitable for mobile phones, tablets etc. It has 4 DC/DC step-down regulators, 3 DC/DC step-down controller, 11 LDOs, RTC, automatic battery, temperature and over-current monitoring, 8 GPIOs, ADC and watchdog.

[PATCH 2/4] ALSA: hda - hdmi: Add ELD emulation for ATI/AMD codecs

2013-10-01 Thread Anssi Hannula
ATI/AMD HDMI/DP codecs do not include standard HDA ELD (EDID-like data) support. In place of providing access to an ELD buffer, various vendor-specific verbs are provided to provide the relevant information. Revision ID 3 and later (0x100300 as reported by procfs codec#X) have support for

Re: [PATCH] hotplug: Optimize {get,put}_online_cpus()

2013-10-01 Thread Paul E. McKenney
On Thu, Sep 26, 2013 at 01:10:42PM +0200, Peter Zijlstra wrote: On Wed, Sep 25, 2013 at 02:22:00PM -0700, Paul E. McKenney wrote: A couple of nits and some commentary, but if there are races, they are quite subtle. ;-) *whee*.. I made one little change in the logic; I moved the

[PATCH 3/4] ALSA: hda - hdmi: Add HBR bitstreaming support for ATI/AMD HDMI codecs

2013-10-01 Thread Anssi Hannula
ATI/AMD HDMI codecs do not include standard HDA HDMI HBR support (which is required for bitstreaming DTS-HD and Dolby TrueHD), instead they have custom verbs for checking and enabling it. Add support for the ATI/AMD HDMI HBR verbs. The specification is available at:

Re: [PATCH] [workqueue] check values of pwq and wq in print_worker_info() before use

2013-10-01 Thread Tejun Heo
Hello, On Tue, Oct 01, 2013 at 10:35:20PM +0200, Helge Deller wrote: print_worker_info() includes no validity check on the pwq and wq pointers before handing them over to the probe_kernel_read() functions. It seems that most architectures don't care about that, but at least on the parisc

Re: [PATCH 05/10] ARM: SAMSUNG: Initialize PWM backlight enable_gpio field

2013-10-01 Thread Thierry Reding
On Tue, Oct 01, 2013 at 12:31:04PM -0600, Stephen Warren wrote: On 09/23/2013 03:41 PM, Thierry Reding wrote: The GPIO API defines 0 as being a valid GPIO number, so this field needs to be initialized explicitly. static void __init smdkv210_map_io(void) @@ -70,6 +70,7 @@ static

Re: [PATCH 1/4] i2c: busses: i2c-st: Add ST I2C controller

2013-10-01 Thread Stephen Warren
On 10/01/2013 04:39 AM, Maxime COQUELIN wrote: This patch adds support to SSC (Synchronous Serial Controller) I2C driver. This IP also supports SPI protocol, but this is not the aim of this driver. This IP is embedded in all ST SoCs for Set-top box platorms, and supports I2C Standard and

[PATCH] arm64: Remove duplicate DEBUG_STACK_USAGE config

2013-10-01 Thread Stephen Boyd
This config item already exists generically in lib/Kconfig.debug. Remove the duplicate config in arm64. Signed-off-by: Stephen Boyd sb...@codeaurora.org --- arch/arm64/Kconfig.debug | 7 --- 1 file changed, 7 deletions(-) diff --git a/arch/arm64/Kconfig.debug b/arch/arm64/Kconfig.debug

Re: 3.12.0-rc3: Symbol license change in commit caf5c03f (ACPI: Move acpi_bus_get_device() from bus.c to scan.c)

2013-10-01 Thread Rafael J. Wysocki
On Tuesday, October 01, 2013 12:59:53 PM Peter Hurley wrote: I have no love lost for proprietary modules but changing acpi_bus_get_device() symbol's license seems gratuitous considering the symbol pre-dates the mainline git tree and the code is just being moved from one source file to another.

Re: [PATCH 1/7] x86, kaslr: move CPU flags out of cpucheck

2013-10-01 Thread H. Peter Anvin
On 10/01/2013 12:37 PM, Kees Cook wrote: Refactor the CPU flags handling out of the cpucheck routines so that they can be reused by the future ASLR routines (in order to detect CPU features like RDRAND and RDTSC). This reworks has_eflag() and has_fpu() to be used on both 32-bit and 64-bit,

Re: [PATCH 08/10] pwm-backlight: Use new enable_gpio field

2013-10-01 Thread Thierry Reding
On Tue, Oct 01, 2013 at 12:39:36PM -0600, Stephen Warren wrote: On 09/23/2013 03:41 PM, Thierry Reding wrote: Make use of the new enable_gpio field and allow it to be set from DT as well. Now that all legacy users of platform data have been converted to initialize this field to an invalid

Re: [PATCH 4/7] x86, kaslr: select random base offset

2013-10-01 Thread H. Peter Anvin
On 10/01/2013 12:37 PM, Kees Cook wrote: + +#include asm/archrandom.h +static inline int rdrand(unsigned long *v) +{ + int ok; + asm volatile(1: RDRAND_LONG \n\t + jc 2f\n\t + decl %0\n\t + jnz 1b\n\t + 2: +

Re: [PATCH] [workqueue] check values of pwq and wq in print_worker_info() before use

2013-10-01 Thread Helge Deller
On 10/01/2013 10:43 PM, Tejun Heo wrote: Hello, On Tue, Oct 01, 2013 at 10:35:20PM +0200, Helge Deller wrote: print_worker_info() includes no validity check on the pwq and wq pointers before handing them over to the probe_kernel_read() functions. It seems that most architectures don't care

Re: [PATCH 09/10] pwm-backlight: Use an optional power supply

2013-10-01 Thread Thierry Reding
On Tue, Oct 01, 2013 at 12:43:57PM -0600, Stephen Warren wrote: On 09/23/2013 03:41 PM, Thierry Reding wrote: Many backlights require a power supply to work properly. This commit uses a power-supply regulator, if available, to power up and power down the panel. I think that all

Re: [PATCH 05/10] ARM: SAMSUNG: Initialize PWM backlight enable_gpio field

2013-10-01 Thread Stephen Warren
On 10/01/2013 02:43 PM, Thierry Reding wrote: On Tue, Oct 01, 2013 at 12:31:04PM -0600, Stephen Warren wrote: On 09/23/2013 03:41 PM, Thierry Reding wrote: The GPIO API defines 0 as being a valid GPIO number, so this field needs to be initialized explicitly. static void __init

Re: [PATCH 09/10] pwm-backlight: Use an optional power supply

2013-10-01 Thread Stephen Warren
On 10/01/2013 02:53 PM, Thierry Reding wrote: On Tue, Oct 01, 2013 at 12:43:57PM -0600, Stephen Warren wrote: On 09/23/2013 03:41 PM, Thierry Reding wrote: Many backlights require a power supply to work properly. This commit uses a power-supply regulator, if available, to power up and power

Re: [PATCH] [workqueue] check values of pwq and wq in print_worker_info() before use

2013-10-01 Thread Tejun Heo
On Tue, Oct 01, 2013 at 10:53:31PM +0200, Helge Deller wrote: So, in summary my patch here is not really necessary, but for the sake of clean code I think it doesn't hurt either and as such it would be nice if you could apply it. What? function *must* take any value and try to access it and

Re: [PATCH v2 0/5] mm: migrate zbud pages

2013-10-01 Thread Seth Jennings
On Mon, Sep 30, 2013 at 10:28:46AM +0200, Krzysztof Kozlowski wrote: On pią, 2013-09-27 at 17:00 -0500, Seth Jennings wrote: I have to say that when I first came up with the idea, I was thinking the address space would be at the zswap layer and the radix slots would hold zbud handles, not

Re: [PATCH] [workqueue] check values of pwq and wq in print_worker_info() before use

2013-10-01 Thread Tejun Heo
On Tue, Oct 01, 2013 at 05:03:48PM -0400, Tejun Heo wrote: On Tue, Oct 01, 2013 at 10:53:31PM +0200, Helge Deller wrote: So, in summary my patch here is not really necessary, but for the sake of clean code I think it doesn't hurt either and as such it would be nice if you could apply it.

Re: [PATCH 1/7] x86, kaslr: move CPU flags out of cpucheck

2013-10-01 Thread Kees Cook
On Tue, Oct 1, 2013 at 1:48 PM, H. Peter Anvin h...@zytor.com wrote: On 10/01/2013 12:37 PM, Kees Cook wrote: Refactor the CPU flags handling out of the cpucheck routines so that they can be reused by the future ASLR routines (in order to detect CPU features like RDRAND and RDTSC). This

Re: [PATCH v6 5/6] MCS Lock: Restructure the MCS lock defines and locking code into its own file

2013-10-01 Thread Tim Chen
On Tue, 2013-10-01 at 16:01 -0400, Waiman Long wrote: On 10/01/2013 12:48 PM, Tim Chen wrote: On Mon, 2013-09-30 at 12:36 -0400, Waiman Long wrote: On 09/30/2013 12:10 PM, Jason Low wrote: On Mon, 2013-09-30 at 11:51 -0400, Waiman Long wrote: On 09/28/2013 12:34 AM, Jason Low wrote:

Re: [PATCH 10/10] pwm-backlight: Allow backlight to remain disabled on boot

2013-10-01 Thread Thierry Reding
On Tue, Oct 01, 2013 at 12:50:51PM -0600, Stephen Warren wrote: On 09/23/2013 03:41 PM, Thierry Reding wrote: The default for backlight devices is to be enabled immediately when registering with the backlight core. This can be useful for setups that use a simple framebuffer device and where

Re: [PATCH 4/7] x86, kaslr: select random base offset

2013-10-01 Thread Kees Cook
On Tue, Oct 1, 2013 at 1:46 PM, H. Peter Anvin h...@zytor.com wrote: On 10/01/2013 12:37 PM, Kees Cook wrote: + +#include asm/archrandom.h +static inline int rdrand(unsigned long *v) +{ + int ok; + asm volatile(1: RDRAND_LONG \n\t + jc 2f\n\t +

Re: 3.12.0-rc3: Symbol license change in commit caf5c03f (ACPI: Move acpi_bus_get_device() from bus.c to scan.c)

2013-10-01 Thread Peter Hurley
On 10/01/2013 05:00 PM, Rafael J. Wysocki wrote: On Tuesday, October 01, 2013 12:59:53 PM Peter Hurley wrote: I have no love lost for proprietary modules but changing acpi_bus_get_device() symbol's license seems gratuitous considering the symbol pre-dates the mainline git tree and the code is

Re: [PATCH 05/10] ARM: SAMSUNG: Initialize PWM backlight enable_gpio field

2013-10-01 Thread Thierry Reding
On Tue, Oct 01, 2013 at 02:58:22PM -0600, Stephen Warren wrote: On 10/01/2013 02:43 PM, Thierry Reding wrote: On Tue, Oct 01, 2013 at 12:31:04PM -0600, Stephen Warren wrote: On 09/23/2013 03:41 PM, Thierry Reding wrote: The GPIO API defines 0 as being a valid GPIO number, so this field

[PATCH 2/2] usb: chipidea: add Intel Clovertrail pci id

2013-10-01 Thread David Cohen
From: David Cohen david.a.co...@intel.com Signed-off-by: David Cohen david.a.co...@intel.com --- drivers/usb/chipidea/ci_hdrc_pci.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/usb/chipidea/ci_hdrc_pci.c b/drivers/usb/chipidea/ci_hdrc_pci.c index 08a724b..d514332 100644 ---

[PATCH 1/2] usb: chipidea: cosmetic clean up on pci id list

2013-10-01 Thread David Cohen
From: David Cohen david.a.co...@intel.com In order to fill a struct with zeroes just the first element needs to be set to 0, the rest can me omitted. This looks cleaner when reading the code. This patch does such clean up change on last item of pci id list. Signed-off-by: David Cohen

Re: [PATCH 1/2] usb: chipidea: cosmetic clean up on pci id list

2013-10-01 Thread David Cohen
On 10/01/2013 02:29 PM, David Cohen wrote: From: David Cohen david.a.co...@intel.com I gotta fix my e-mail to use @linux.intel.com. Please, see my v2 patches. BR, David -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to

[PATCH v2 2/2] usb: chipidea: add Intel Clovertrail pci id

2013-10-01 Thread David Cohen
Signed-off-by: David Cohen david.a.co...@linux.intel.com --- drivers/usb/chipidea/ci_hdrc_pci.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/usb/chipidea/ci_hdrc_pci.c b/drivers/usb/chipidea/ci_hdrc_pci.c index 08a724b..d514332 100644 --- a/drivers/usb/chipidea/ci_hdrc_pci.c

[PATCH v2 1/2] usb: chipidea: cosmetic clean up on pci id list

2013-10-01 Thread David Cohen
In order to fill a struct with zeroes just the first element needs to be set to 0, the rest can me omitted. This looks cleaner when reading the code. This patch does such clean up change on last item of pci id list. Signed-off-by: David Cohen david.a.co...@linux.intel.com ---

Re: [PATCH] tick: make sleep length calculation more accurate

2013-10-01 Thread Stephen Boyd
On 09/27/13 03:52, Daniel Lezcano wrote: The sleep_length is computed in the tick_nohz_stop_sched_tick function but it is used later in the code with in between the local irq enabled. cpu_idle_loop tick_nohz_idle_enter [ exits with local irq enabled ] __tick_nohz_idle_enter

Re: [PATCH 09/10] pwm-backlight: Use an optional power supply

2013-10-01 Thread Thierry Reding
On Tue, Oct 01, 2013 at 02:59:43PM -0600, Stephen Warren wrote: On 10/01/2013 02:53 PM, Thierry Reding wrote: On Tue, Oct 01, 2013 at 12:43:57PM -0600, Stephen Warren wrote: On 09/23/2013 03:41 PM, Thierry Reding wrote: Many backlights require a power supply to work properly. This commit

Re: [PATCH] [workqueue] check values of pwq and wq in print_worker_info() before use

2013-10-01 Thread James Bottomley
On Tue, 2013-10-01 at 16:43 -0400, Tejun Heo wrote: Hello, On Tue, Oct 01, 2013 at 10:35:20PM +0200, Helge Deller wrote: print_worker_info() includes no validity check on the pwq and wq pointers before handing them over to the probe_kernel_read() functions. It seems that most

Re: spinlock contention of files-file_lock

2013-10-01 Thread Eric Dumazet
From: Eric Dumazet eduma...@google.com On Mon, 2013-09-30 at 18:44 -0700, Linus Torvalds wrote: Now, that only gets rid of fd_install(), but I suspect you could do something similar for put_unused_fd() (that one does need cmpxchg for the next_fd thing, though). We'd have to replace the

[PATCH 06/15] sysfs: add sysfs_open_file-sd and -file

2013-10-01 Thread Tejun Heo
sysfs will be converted to use seq_file for read path, which will make it difficult to pass around multiple pointers directly. This patch adds sysfs_open_file-sd and -file so that we can reach all the necessary data structures from sysfs_open_file. flush_write_buffer() is updated to drop @dentry

[PATCH 14/15] sysfs: prepare open path for unified regular / bin file handling

2013-10-01 Thread Tejun Heo
sysfs bin file handling will be merged into the regular file support. This patch prepares the open path. This patch updates sysfs_open_file() such that it can handle both regular and bin files. This is a preparation and the new bin file path isn't used yet. Signed-off-by: Tejun Heo

[PATCH 12/15] sysfs: add sysfs_bin_read()

2013-10-01 Thread Tejun Heo
sysfs bin file handling will be merged into the regular file support. This patch prepares the read path. Copy fs/sysfs/bin.c::read() to fs/sysfs/file.c and make it use sysfs_open_file instead of bin_buffer. The function is identical copy except for the use of sysfs_open_file. The new function

[PATCH 15/15] sysfs: merge regular and bin file handling

2013-10-01 Thread Tejun Heo
With the previous changes, sysfs regular file code is ready to handle bin files too. This patch makes bin files share the regular file path. * sysfs_create/remove_bin_file() are moved to fs/sysfs/file.c. * sysfs_init_inode() is updated to use the new sysfs_bin_operations instead of bin_fops

[PATCH 13/15] sysfs: copy bin mmap support from fs/sysfs/bin.c to fs/sysfs/file.c

2013-10-01 Thread Tejun Heo
sysfs bin file handling will be merged into the regular file support. This patch copies mmap support from bin so that fs/sysfs/file.c can handle mmapping bin files. The code is copied mostly verbatim with the following updates. * -mmapped and -vm_ops are added to sysfs_open_file and bin_buffer

[PATCH 10/15] sysfs: collapse fs/sysfs/bin.c::fill_read() into read()

2013-10-01 Thread Tejun Heo
read() is simple enough and fill_read() being in a separate function doesn't add anything. Let's collapse it into read(). This will make merging bin file handling with regular file. Signed-off-by: Tejun Heo t...@kernel.org --- fs/sysfs/bin.c | 36 +++- 1 file

[PATCH 11/15] sysfs: prepare path write for unified regular / bin file handling

2013-10-01 Thread Tejun Heo
sysfs bin file handling will be merged into the regular file support. This patch prepares the write path. bin file write is almost identical to regular file write except that the write length is capped by the inode size and @off is passed to the write method. This patch adds bin file handling to

[PATCH 09/15] sysfs: skip bin_buffer-buffer while reading

2013-10-01 Thread Tejun Heo
After b31ca3f5dfc (sysfs: fix deadlock), bin read() first writes data to bb-buffer and bounces it to a transient kernel buffer which is then copied out to userland. The double bouncing doesn't add anything. Let's just use the transient buffer directly. While at it, rename @temp to @buf for

Re: [PATCH 2/6] clk: exynos5410: register clocks using common clock framework

2013-10-01 Thread Stephen Warren
On 10/01/2013 10:17 AM, Vyacheslav Tyrtov wrote: From: Tarek Dakhran t.dakh...@samsung.com The EXYNOS5410 clocks are statically listed and registered using the Samsung specific common clock helper functions. diff --git a/Documentation/devicetree/bindings/clock/exynos5410-clock.txt

[PATCH 05/15] sysfs: rename sysfs_buffer to sysfs_open_file

2013-10-01 Thread Tejun Heo
sysfs read path will be converted to use seq_file which will handle buffering making sysfs_buffer a misnomer. Rename sysfs_buffer to sysfs_open_file, and sysfs_open_dirent-buffers to -files. This path is pure rename. Signed-off-by: Tejun Heo t...@kernel.org --- fs/sysfs/file.c | 127

[PATCH 07/15] sysfs: use transient write buffer

2013-10-01 Thread Tejun Heo
There isn't much to be gained by keeping around kernel buffer while a file is open especially as the read path planned to be converted to use seq_file and won't use the buffer. This patch makes sysfs_write_file() use per-write transient buffer instead of sysfs_open_file-page. This simplifies the

Re: [PATCH 3/3] KVM: PPC: Book3S: Add support for hwrng found on some powernv systems

2013-10-01 Thread Benjamin Herrenschmidt
On Tue, 2013-10-01 at 13:19 +0200, Paolo Bonzini wrote: Il 01/10/2013 11:38, Benjamin Herrenschmidt ha scritto: So for the sake of that dogma you are going to make us do something that is about 100 times slower ? (and possibly involves more lines of code) If it's 100 times slower there is

[PATCHSET v2] sysfs: use seq_file and unify regular and bin file handling

2013-10-01 Thread Tejun Heo
Hello, Changes from the last take[L] are, * bin file reads no longer go through seq_file. It goes through a separate read path implemented in sysfs_bin_read(). bin files shouldn't see any behavior difference now. * bin files now use a separate file_operations struct -

[PATCH 08/15] sysfs: use seq_file when reading regular files

2013-10-01 Thread Tejun Heo
sysfs read path implements its own buffering scheme between userland and kernel callbacks, which essentially is a degenerate duplicate of seq_file. This patch replaces the custom read buffering implementation in sysfs with seq_file. While the amount of code reduction is small, this reduces low

[PATCH 01/15] sysfs: remove unused sysfs_buffer-pos

2013-10-01 Thread Tejun Heo
Signed-off-by: Tejun Heo t...@kernel.org --- fs/sysfs/file.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c index 1656a79..81e3f72 100644 --- a/fs/sysfs/file.c +++ b/fs/sysfs/file.c @@ -44,7 +44,6 @@ struct sysfs_open_dirent { struct sysfs_buffer {

[PATCH 04/15] sysfs: add sysfs_open_file_mutex

2013-10-01 Thread Tejun Heo
Add a separate mutex to protect sysfs_open_dirent-buffers list. This will allow performing sleepable operations while traversing sysfs_buffers, which will be renamed to sysfs_open_file. Note that currently sysfs_open_dirent-buffers list isn't being used for anything and this patch doesn't make

[PATCH 03/15] sysfs: remove sysfs_buffer-ops

2013-10-01 Thread Tejun Heo
Currently, sysfs_ops is fetched during sysfs_open_file() and cached in sysfs_buffer-ops to be used while the file is open. This patch removes the caching and makes each operation directly fetch sysfs_ops. This patch doesn't introduce any behavior difference and is to prepare for merging regular

[PATCH 02/15] sysfs: remove sysfs_buffer-needs_read_fill

2013-10-01 Thread Tejun Heo
-needs_read_fill is used to implement the following behaviors. 1. Ensure buffer filling on the first read. 2. Force buffer filling after a write. 3. Force buffer filling after a successful poll. However, #2 and #3 don't really work as sysfs doesn't reset file position. While the read buffer

Re: [PATCH 01/13] tpm: ibmvtpm: Use %zd formatting for size_t format arguments

2013-10-01 Thread Peter Hüwe
Am Montag, 23. September 2013, 20:14:31 schrieb Jason Gunthorpe: This suppresses compile warnings on 32 bit builds. Signed-off-by: Jason Gunthorpe jguntho...@obsidianresearch.com Reviewed-by: Peter Huewe peterhu...@gmx.de Signed-off-by: Peter Huewe peterhu...@gmx.de Staged here

Re: RFC: (re-)binding the VFIO platform driver to a platform device

2013-10-01 Thread Kim Phillips
On Tue, 1 Oct 2013 14:15:38 -0500 Scott Wood scottw...@freescale.com wrote: On Tue, 2013-10-01 at 13:38 -0500, Kim Phillips wrote: Hi, Santosh and I are having a problem figuring out how to enable binding (and re-binding) platform devices to a platform VFIO driver (see Antonis' WIP:

Re: RFC: (re-)binding the VFIO platform driver to a platform device

2013-10-01 Thread Kim Phillips
On Tue, 1 Oct 2013 14:17:16 -0500 Scott Wood scottw...@freescale.com wrote: On Tue, 2013-10-01 at 14:15 -0500, Scott Wood wrote: On Tue, 2013-10-01 at 13:38 -0500, Kim Phillips wrote: Hi, Santosh and I are having a problem figuring out how to enable binding (and re-binding)

Re: RFC: (re-)binding the VFIO platform driver to a platform device

2013-10-01 Thread Kim Phillips
On Tue, 1 Oct 2013 13:00:54 -0700 Greg Kroah-Hartman gre...@linuxfoundation.org wrote: On Tue, Oct 01, 2013 at 01:38:31PM -0500, Kim Phillips wrote: Hi, Santosh and I are having a problem figuring out how to enable binding (and re-binding) platform devices to a platform VFIO driver (see

Re: spinlock contention of files-file_lock

2013-10-01 Thread Al Viro
On Tue, Oct 01, 2013 at 02:41:58PM -0700, Eric Dumazet wrote: Maybe I am missing something obvious ? Yes. do_execve_common() starts with unshare_files(); there can be no other thread capable of modifying that descriptor table. -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH] [workqueue] check values of pwq and wq in print_worker_info() before use

2013-10-01 Thread Helge Deller
On 10/01/2013 11:40 PM, James Bottomley wrote: On Tue, 2013-10-01 at 16:43 -0400, Tejun Heo wrote: Hello, On Tue, Oct 01, 2013 at 10:35:20PM +0200, Helge Deller wrote: print_worker_info() includes no validity check on the pwq and wq pointers before handing them over to the

Re: spinlock contention of files-file_lock

2013-10-01 Thread Eric Dumazet
On Tue, 2013-10-01 at 23:04 +0100, Al Viro wrote: On Tue, Oct 01, 2013 at 02:41:58PM -0700, Eric Dumazet wrote: Maybe I am missing something obvious ? Yes. do_execve_common() starts with unshare_files(); there can be no other thread capable of modifying that descriptor table. Hmm, then

Re: [PATCH 07/13] tpm: Remove tpm_show_caps_1_2

2013-10-01 Thread Jason Gunthorpe
On Wed, Oct 02, 2013 at 12:09:22AM +0200, Peter H?we wrote: Since the tpm_spi_stm_st33, tpm_i2c_nuvoton and tpm_i2c_atmel drivers are not yet merged and were heavily improved by you anyway, please include this improvement directly in the new drivers. Okay, it is easy enough to invert

Re: [PATCH 2/7] arm: dts: add dra7 IVA thermal data

2013-10-01 Thread Nishanth Menon
On 14:32-20131001, Eduardo Valentin wrote: minor comments follow This patch changes a dtsi file to contain the thermal data s/changes/introduces? for IVA domain on DRA7 and later SoCs. This data will enable a thermal shutdown at 125C. This thermal data can be reused across TI SoC devices

Re: [PATCH] [workqueue] check values of pwq and wq in print_worker_info() before use

2013-10-01 Thread Helge Deller
On 10/01/2013 11:07 PM, Tejun Heo wrote: On Tue, Oct 01, 2013 at 05:03:48PM -0400, Tejun Heo wrote: On Tue, Oct 01, 2013 at 10:53:31PM +0200, Helge Deller wrote: So, in summary my patch here is not really necessary, but for the sake of clean code I think it doesn't hurt either and as such it

Re: [tpmdd-devel] [PATCH 07/13] tpm: Remove tpm_show_caps_1_2

2013-10-01 Thread Peter Hüwe
Hi Jason, Am Mittwoch, 2. Oktober 2013, 00:21:13 schrieb Jason Gunthorpe: On Wed, Oct 02, 2013 at 12:09:22AM +0200, Peter H?we wrote: Since the tpm_spi_stm_st33, tpm_i2c_nuvoton and tpm_i2c_atmel drivers are not yet merged and were heavily improved by you anyway, please include

Re: [PATCH 1/7] arm: dts: add dra7 DSPEVE thermal data

2013-10-01 Thread Nishanth Menon
On 14:32-20131001, Eduardo Valentin wrote: This patch changes a dtsi file to contain the thermal data ^^ introduces? for DSPEVE domain on DRA7 and later SoCs. This data will enable a thermal shutdown at 125C. This thermal data can be reused across TI SoC devices. Signed-off

Re: [PATCH] [workqueue] check values of pwq and wq in print_worker_info() before use

2013-10-01 Thread Tejun Heo
Hello, On Wed, Oct 02, 2013 at 12:34:53AM +0200, Helge Deller wrote: Sure, probe_kernel_read() takes care that no segfaults will happen. Nevertheless, if we know that pwq might become NULL, why access pwq-wq at all? struct pool_workqueue *pwq = NULL; probe_kernel_read(wq, pwqwq,

Re: RFC: (re-)binding the VFIO platform driver to a platform device

2013-10-01 Thread Scott Wood
On Tue, 2013-10-01 at 16:59 -0500, Kim Phillips wrote: On Tue, 1 Oct 2013 14:15:38 -0500 Scott Wood scottw...@freescale.com wrote: I think the ideal interface would be if you could write the sysfs device name into the vfio bind file (or some new file in the same directory), and have it

Re: [PATCH] OOM killer: wait for tasks with pending SIGKILL to exit

2013-10-01 Thread David Rientjes
On Tue, 1 Oct 2013, Sergey Dyasly wrote: If you are ok with the first change in my patch regarding fatal_signal_pending, I can send new patch with just that change. The entire patch is pointless, there's no need to give access to memory reserves simply because it is PF_EXITING. If it

Re: [BUG] Regression in 2fdac010 drivers/net/ethernet/via/via-velocity.c: update napi implementation

2013-10-01 Thread Francois Romieu
Julia Lawall julia.law...@lip6.fr : [...] There has already been a discussion about this, and a patch has already been proposed. It has to do with lock managament. I will look for the email. The underlying problem has to do with disabled irq. netif_receive_skb assumes irq to be enabled.

Re: [PATCH] [workqueue] check values of pwq and wq in print_worker_info() before use

2013-10-01 Thread Tejun Heo
On Tue, Oct 01, 2013 at 06:40:23PM -0400, Tejun Heo wrote: Because it is using probe_kernel_read() and such test wouldn't mean anything? It may be NULL, it may be 1 or full Fs. NULL is just one of many illegal pointers which may happen. Why add code which doesn't achieve anything when

Re: [PATCH 3/7] arm: dts: dra7: add bandgap entry

2013-10-01 Thread Nishanth Menon
On 14:32-20131001, Eduardo Valentin wrote: This patch adds bandgap IP entry on DRA7 dtsi device tree file. Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com --- arch/arm/boot/dts/dra7.dtsi | 12 1 file changed, 12 insertions(+) diff --git a/arch/arm/boot/dts/dra7.dtsi

Re: [PATCH 08/13] tpm: Pull everything related to /dev/tpmX into tpm-dev.c

2013-10-01 Thread Peter Hüwe
Am Montag, 23. September 2013, 20:14:38 schrieb Jason Gunthorpe: CLASS-dev.c is a common idiom for Linux subsystems This pulls all the code related to the miscdev into tpm-dev.c and makes it static. The identical file_operation structs in the drivers are purged and the tpm common code

Re: [PATCH] [workqueue] check values of pwq and wq in print_worker_info() before use

2013-10-01 Thread James Bottomley
On Wed, 2013-10-02 at 00:07 +0200, Helge Deller wrote: On 10/01/2013 11:40 PM, James Bottomley wrote: On Tue, 2013-10-01 at 16:43 -0400, Tejun Heo wrote: Hello, On Tue, Oct 01, 2013 at 10:35:20PM +0200, Helge Deller wrote: print_worker_info() includes no validity check on the pwq and wq

Re: [PATCH 6/7] arm: dts: add tmp102 i2c sensor node on dra7-evm

2013-10-01 Thread Nishanth Menon
On 14:32-20131001, Eduardo Valentin wrote: On dra7-evm there is an tmp102 temperature sensor on i2c bus 1. This patch adds its device tree node. Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com --- arch/arm/boot/dts/dra7-evm.dts | 8 1 file changed, 8 insertions(+) diff

Re: [PATCH 08/13] tpm: Pull everything related to /dev/tpmX into tpm-dev.c

2013-10-01 Thread Jason Gunthorpe
On Wed, Oct 02, 2013 at 12:52:40AM +0200, Peter H?we wrote: Am Montag, 23. September 2013, 20:14:38 schrieb Jason Gunthorpe: CLASS-dev.c is a common idiom for Linux subsystems This pulls all the code related to the miscdev into tpm-dev.c and makes it static. The identical file_operation

<    1   2   3   4   5   6   7   8   9   10   >