[PATCH 25/30] radix-tree test suite: add multi-order tag test

2016-04-06 Thread Matthew Wilcox
From: Ross Zwisler Add a generic test for multi-order tag verification, and call it using several different configurations. This test creates a multi-order radix tree using the given index and order, and then sets, checks and clears tags using the indices covered

[PATCH 07/30] radix-tree: remove unused looping macros

2016-04-06 Thread Matthew Wilcox
From: Ross Zwisler radix_tree_for_each_chunk() and radix_tree_for_each_chunk_slot() have never been used in the kernel since their introduction in 2012, so remove them. Signed-off-by: Ross Zwisler Signed-off-by: Matthew Wilcox

Re: [PATCH] KERNEL: resource: Fix bug on leakage in /proc/iomem file

2016-04-06 Thread Kees Cook
On Wed, Apr 6, 2016 at 2:19 PM, Linus Torvalds wrote: > On Wed, Apr 6, 2016 at 10:54 AM, Linus Torvalds > wrote: >> >> So I'd find a patch like the attached to be perfectly acceptable (in >> fact, we should have done this long ago). >

[PATCH] arm64: CONFIG_DEVPORT should not be used when PCI is being used

2016-04-06 Thread Al Stone
On arm64 systems, using /dev/port does not really make sense; this is historically used for other architectures to access ISA IO ports, which with any luck do not exist on arm64 platforms. With the following snippet of perl code (from Jeff Bastian ), we can reliably panic an

[PATCH 25/30] radix-tree test suite: add multi-order tag test

2016-04-06 Thread Matthew Wilcox
From: Ross Zwisler Add a generic test for multi-order tag verification, and call it using several different configurations. This test creates a multi-order radix tree using the given index and order, and then sets, checks and clears tags using the indices covered by the single multi-order radix

[PATCH 07/30] radix-tree: remove unused looping macros

2016-04-06 Thread Matthew Wilcox
From: Ross Zwisler radix_tree_for_each_chunk() and radix_tree_for_each_chunk_slot() have never been used in the kernel since their introduction in 2012, so remove them. Signed-off-by: Ross Zwisler Signed-off-by: Matthew Wilcox --- include/linux/radix-tree.h | 28

Re: [PATCH] KERNEL: resource: Fix bug on leakage in /proc/iomem file

2016-04-06 Thread Kees Cook
On Wed, Apr 6, 2016 at 2:19 PM, Linus Torvalds wrote: > On Wed, Apr 6, 2016 at 10:54 AM, Linus Torvalds > wrote: >> >> So I'd find a patch like the attached to be perfectly acceptable (in >> fact, we should have done this long ago). > > I just committed it, let's see if some odd program uses the

[PATCH] arm64: CONFIG_DEVPORT should not be used when PCI is being used

2016-04-06 Thread Al Stone
On arm64 systems, using /dev/port does not really make sense; this is historically used for other architectures to access ISA IO ports, which with any luck do not exist on arm64 platforms. With the following snippet of perl code (from Jeff Bastian ), we can reliably panic an arm64 system with PCI

[PATCH 19/30] radix-tree: add support for multi-order iterating

2016-04-06 Thread Matthew Wilcox
This enables the macros radix_tree_for_each_slot() and friends to be used with multi-order entries. The way that this works is that we treat all entries in a given slots[] array as a single chunk. If the index given to radix_tree_next_chunk() happens to point us to a sibling entry, we will back

[PATCH 17/30] radix-tree: Rewrite __radix_tree_lookup

2016-04-06 Thread Matthew Wilcox
Use the new multi-order support functions to rewrite __radix_tree_lookup() Signed-off-by: Matthew Wilcox Reviewed-by: Ross Zwisler --- lib/radix-tree.c | 45 + 1 file changed, 17 insertions(+), 28

Loan Offer at 3%, Feel Free to REPLY back to us for more info

2016-04-06 Thread Fidelity Mortgage Loan

[PATCH 21/30] radix tree test suite: Add multiorder shrinking test

2016-04-06 Thread Matthew Wilcox
Ensure that the tree goes back down to the same height when an item is inserted & removed from the tree at a higher index. Signed-off-by: Matthew Wilcox Reviewed-by: Ross Zwisler --- tools/testing/radix-tree/multiorder.c | 38

[PATCH 20/30] radix tree test suite: multi-order iteration test

2016-04-06 Thread Matthew Wilcox
From: Ross Zwisler Add a unit test to verify that we can iterate over multi-order entries properly via a radix_tree_for_each_slot() loop. This was done with a single, somewhat complicated configuration that was meant to test many of the various corner cases having

[PATCH 22/30] radix-tree: Rewrite radix_tree_tag_set

2016-04-06 Thread Matthew Wilcox
From: Ross Zwisler Use the new multi-order support functions to rewrite radix_tree_tag_set() Signed-off-by: Ross Zwisler Signed-off-by: Matthew Wilcox --- lib/radix-tree.c | 37

[PATCH 19/30] radix-tree: add support for multi-order iterating

2016-04-06 Thread Matthew Wilcox
This enables the macros radix_tree_for_each_slot() and friends to be used with multi-order entries. The way that this works is that we treat all entries in a given slots[] array as a single chunk. If the index given to radix_tree_next_chunk() happens to point us to a sibling entry, we will back

[PATCH 17/30] radix-tree: Rewrite __radix_tree_lookup

2016-04-06 Thread Matthew Wilcox
Use the new multi-order support functions to rewrite __radix_tree_lookup() Signed-off-by: Matthew Wilcox Reviewed-by: Ross Zwisler --- lib/radix-tree.c | 45 + 1 file changed, 17 insertions(+), 28 deletions(-) diff --git a/lib/radix-tree.c

Loan Offer at 3%, Feel Free to REPLY back to us for more info

2016-04-06 Thread Fidelity Mortgage Loan

[PATCH 21/30] radix tree test suite: Add multiorder shrinking test

2016-04-06 Thread Matthew Wilcox
Ensure that the tree goes back down to the same height when an item is inserted & removed from the tree at a higher index. Signed-off-by: Matthew Wilcox Reviewed-by: Ross Zwisler --- tools/testing/radix-tree/multiorder.c | 38 +++ 1 file changed, 38

[PATCH 20/30] radix tree test suite: multi-order iteration test

2016-04-06 Thread Matthew Wilcox
From: Ross Zwisler Add a unit test to verify that we can iterate over multi-order entries properly via a radix_tree_for_each_slot() loop. This was done with a single, somewhat complicated configuration that was meant to test many of the various corner cases having to do with multi-order

[PATCH 22/30] radix-tree: Rewrite radix_tree_tag_set

2016-04-06 Thread Matthew Wilcox
From: Ross Zwisler Use the new multi-order support functions to rewrite radix_tree_tag_set() Signed-off-by: Ross Zwisler Signed-off-by: Matthew Wilcox --- lib/radix-tree.c | 37 + 1 file changed, 17 insertions(+), 20 deletions(-) diff --git

Re: [PATCH] Prefer kASLR over Hibernation

2016-04-06 Thread Kees Cook
On Wed, Apr 6, 2016 at 1:56 PM, Linus Torvalds wrote: > On Wed, Apr 6, 2016 at 1:17 PM, Pavel Machek wrote: >> >> Why is kASLR incompatible with hibernation? We can hibernate have >> 4.3 kernel resume hibernation image of 4.2 kernel (on x86-64, and I

[PATCH 08/30] Introduce CONFIG_RADIX_TREE_MULTIORDER

2016-04-06 Thread Matthew Wilcox
I've been receiving increasingly concerned notes from 0day about how much my recent changes have been bloating the radix tree. Make it happier by only including multiorder support if CONFIG_TRANSPARENT_HUGEPAGES is set. This is an independent Kconfig option, so other radix tree users can also set

[PATCH 23/30] radix-tree: Rewrite radix_tree_tag_clear

2016-04-06 Thread Matthew Wilcox
From: Ross Zwisler Use the new multi-order support functions to rewrite radix_tree_tag_clear() Signed-off-by: Ross Zwisler Signed-off-by: Matthew Wilcox --- lib/radix-tree.c | 44

[PATCH 16/30] radix tree test suite: Start adding multiorder tests

2016-04-06 Thread Matthew Wilcox
Test suite infrastructure for working with multiorder entries. The test itself is pretty basic: Add an entry, check that all expected indices return that entry and that indices around that entry don't return an entry. Then delete the entry and check no index returns that entry. Tests a few edge

Re: [PATCH] Prefer kASLR over Hibernation

2016-04-06 Thread Kees Cook
On Wed, Apr 6, 2016 at 1:56 PM, Linus Torvalds wrote: > On Wed, Apr 6, 2016 at 1:17 PM, Pavel Machek wrote: >> >> Why is kASLR incompatible with hibernation? We can hibernate have >> 4.3 kernel resume hibernation image of 4.2 kernel (on x86-64, and I >> have patches for x86). Resuming kernel

[PATCH 08/30] Introduce CONFIG_RADIX_TREE_MULTIORDER

2016-04-06 Thread Matthew Wilcox
I've been receiving increasingly concerned notes from 0day about how much my recent changes have been bloating the radix tree. Make it happier by only including multiorder support if CONFIG_TRANSPARENT_HUGEPAGES is set. This is an independent Kconfig option, so other radix tree users can also set

[PATCH 23/30] radix-tree: Rewrite radix_tree_tag_clear

2016-04-06 Thread Matthew Wilcox
From: Ross Zwisler Use the new multi-order support functions to rewrite radix_tree_tag_clear() Signed-off-by: Ross Zwisler Signed-off-by: Matthew Wilcox --- lib/radix-tree.c | 44 1 file changed, 20 insertions(+), 24 deletions(-) diff --git

[PATCH 16/30] radix tree test suite: Start adding multiorder tests

2016-04-06 Thread Matthew Wilcox
Test suite infrastructure for working with multiorder entries. The test itself is pretty basic: Add an entry, check that all expected indices return that entry and that indices around that entry don't return an entry. Then delete the entry and check no index returns that entry. Tests a few edge

[PATCH 28/30] radix-tree: Fix two bugs in radix_tree_range_tag_if_tagged()

2016-04-06 Thread Matthew Wilcox
I had previously decided that tagging a single multiorder entry would count as tagging 2^order entries for the purposes of 'nr_to_tag'. I now believe that decision to be a mistake, and it should count as a single entry. That's more likely to be what callers expect. When walking back up the tree

[PATCH 26/30] radix-tree: Fix radix_tree_create for sibling entries

2016-04-06 Thread Matthew Wilcox
If the radix tree user attempted to insert a colliding entry with an existing multiorder entry, then radix_tree_create() could encounter a sibling entry when walking down the tree to look for a slot. Use radix_tree_descend() to fix the problem, and add a test-case to make sure the problem doesn't

[PATCH 29/30] radix-tree: Fix radix_tree_dump() for multi-order entries

2016-04-06 Thread Matthew Wilcox
From: Ross Zwisler - Print which indices are covered by every leaf entry - Print sibling entries - Print the node pointer instead of the slot entry - Build by default in userspace, and make it accessible to the test-suite Signed-off-by: Ross Zwisler

[PATCH 27/30] radix-tree: Rewrite radix_tree_locate_item

2016-04-06 Thread Matthew Wilcox
Use the new multi-order support functions to rewrite radix_tree_locate_item(). Modify the locate tests to test multiorder entries too. Signed-off-by: Matthew Wilcox Reviewed-by: Ross Zwisler --- lib/radix-tree.c| 90

[PATCH 18/30] radix-tree: Fix multiorder BUG_ON in radix_tree_insert

2016-04-06 Thread Matthew Wilcox
These BUG_ON tests are to ensure that all the tags are clear when inserting a new entry. If we insert a multiorder entry, we'll end up looking at the tags for a different node, and so the BUG_ON can end up triggering spuriously. Also, we now have three tags, not two, so check all three are

[PATCH 28/30] radix-tree: Fix two bugs in radix_tree_range_tag_if_tagged()

2016-04-06 Thread Matthew Wilcox
I had previously decided that tagging a single multiorder entry would count as tagging 2^order entries for the purposes of 'nr_to_tag'. I now believe that decision to be a mistake, and it should count as a single entry. That's more likely to be what callers expect. When walking back up the tree

[PATCH 26/30] radix-tree: Fix radix_tree_create for sibling entries

2016-04-06 Thread Matthew Wilcox
If the radix tree user attempted to insert a colliding entry with an existing multiorder entry, then radix_tree_create() could encounter a sibling entry when walking down the tree to look for a slot. Use radix_tree_descend() to fix the problem, and add a test-case to make sure the problem doesn't

[PATCH 29/30] radix-tree: Fix radix_tree_dump() for multi-order entries

2016-04-06 Thread Matthew Wilcox
From: Ross Zwisler - Print which indices are covered by every leaf entry - Print sibling entries - Print the node pointer instead of the slot entry - Build by default in userspace, and make it accessible to the test-suite Signed-off-by: Ross Zwisler Signed-off-by: Matthew Wilcox ---

[PATCH 27/30] radix-tree: Rewrite radix_tree_locate_item

2016-04-06 Thread Matthew Wilcox
Use the new multi-order support functions to rewrite radix_tree_locate_item(). Modify the locate tests to test multiorder entries too. Signed-off-by: Matthew Wilcox Reviewed-by: Ross Zwisler --- lib/radix-tree.c| 90 -

[PATCH 18/30] radix-tree: Fix multiorder BUG_ON in radix_tree_insert

2016-04-06 Thread Matthew Wilcox
These BUG_ON tests are to ensure that all the tags are clear when inserting a new entry. If we insert a multiorder entry, we'll end up looking at the tags for a different node, and so the BUG_ON can end up triggering spuriously. Also, we now have three tags, not two, so check all three are

[PATCH 03/30] radix tree test suite: Add tests for radix_tree_locate_item()

2016-04-06 Thread Matthew Wilcox
Fairly simple tests; add various items to the tree, then make sure we can find them again. Also check that a pointer that we know isn't in the tree is not found. Signed-off-by: Matthew Wilcox Reviewed-by: Ross Zwisler ---

[PATCH 03/30] radix tree test suite: Add tests for radix_tree_locate_item()

2016-04-06 Thread Matthew Wilcox
Fairly simple tests; add various items to the tree, then make sure we can find them again. Also check that a pointer that we know isn't in the tree is not found. Signed-off-by: Matthew Wilcox Reviewed-by: Ross Zwisler --- tools/testing/radix-tree/linux/kernel.h | 3 +++

[PATCH 30/30] radix-tree: Add copyright statements

2016-04-06 Thread Matthew Wilcox
The multiorder support is a sufficiently large feature to be worth adding copyrigt lines for. Signed-off-by: Matthew Wilcox Reviewed-by: Ross Zwisler --- lib/radix-tree.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/radix-tree.c

[PATCH 30/30] radix-tree: Add copyright statements

2016-04-06 Thread Matthew Wilcox
The multiorder support is a sufficiently large feature to be worth adding copyrigt lines for. Signed-off-by: Matthew Wilcox Reviewed-by: Ross Zwisler --- lib/radix-tree.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/radix-tree.c b/lib/radix-tree.c index 0402c4f1a344..edaf4771feb0

[PATCH 12/30] radix-tree: Remove restriction on multi-order entries

2016-04-06 Thread Matthew Wilcox
Now that sibling pointers are handled explicitly, there is no purpose served by restricting the order to be >= RADIX_TREE_MAP_SHIFT. Signed-off-by: Matthew Wilcox Reviewed-by: Ross Zwisler --- lib/radix-tree.c | 2 -- 1 file changed, 2

[PATCH 12/30] radix-tree: Remove restriction on multi-order entries

2016-04-06 Thread Matthew Wilcox
Now that sibling pointers are handled explicitly, there is no purpose served by restricting the order to be >= RADIX_TREE_MAP_SHIFT. Signed-off-by: Matthew Wilcox Reviewed-by: Ross Zwisler --- lib/radix-tree.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/radix-tree.c

[PATCH 13/30] radix-tree: Introduce radix_tree_load_root()

2016-04-06 Thread Matthew Wilcox
All the tree walking functions start with some variant of this code; centralise it in one place so we're not chasing subtly different bugs everywhere. Signed-off-by: Matthew Wilcox Reviewed-by: Ross Zwisler --- lib/radix-tree.c | 23

[PATCH 24/30] radix-tree: Rewrite radix_tree_tag_get

2016-04-06 Thread Matthew Wilcox
From: Ross Zwisler Use the new multi-order support functions to rewrite radix_tree_tag_get() Signed-off-by: Ross Zwisler Signed-off-by: Matthew Wilcox --- lib/radix-tree.c | 44

[PATCH 13/30] radix-tree: Introduce radix_tree_load_root()

2016-04-06 Thread Matthew Wilcox
All the tree walking functions start with some variant of this code; centralise it in one place so we're not chasing subtly different bugs everywhere. Signed-off-by: Matthew Wilcox Reviewed-by: Ross Zwisler --- lib/radix-tree.c | 23 +++ 1 file changed, 23 insertions(+)

[PATCH 24/30] radix-tree: Rewrite radix_tree_tag_get

2016-04-06 Thread Matthew Wilcox
From: Ross Zwisler Use the new multi-order support functions to rewrite radix_tree_tag_get() Signed-off-by: Ross Zwisler Signed-off-by: Matthew Wilcox --- lib/radix-tree.c | 44 ++-- 1 file changed, 18 insertions(+), 26 deletions(-) diff --git

Re: [PATCH] KERNEL: resource: Fix bug on leakage in /proc/iomem file

2016-04-06 Thread Linus Torvalds
On Wed, Apr 6, 2016 at 10:54 AM, Linus Torvalds wrote: > > So I'd find a patch like the attached to be perfectly acceptable (in > fact, we should have done this long ago). I just committed it, let's see if some odd program uses the iomem data. I doubt it, and I

Re: [PATCH] KERNEL: resource: Fix bug on leakage in /proc/iomem file

2016-04-06 Thread Linus Torvalds
On Wed, Apr 6, 2016 at 10:54 AM, Linus Torvalds wrote: > > So I'd find a patch like the attached to be perfectly acceptable (in > fact, we should have done this long ago). I just committed it, let's see if some odd program uses the iomem data. I doubt it, and I always enjoy improvements that

Re: [PATCH v3 1/5] Documentation: DT: vdma: Rename vdma-chan prefix to dma-chan

2016-04-06 Thread Lars-Peter Clausen
On 04/06/2016 06:25 PM, Appana Durga Kedareswara Rao wrote: > Hi Soren, > > >> -Original Message- >> From: Sören Brinkmann [mailto:soren.brinkm...@xilinx.com] >> Sent: Wednesday, April 06, 2016 9:50 PM >> To: Appana Durga Kedareswara Rao >> Cc: robh...@kernel.org;

Re: [PATCH v3 1/5] Documentation: DT: vdma: Rename vdma-chan prefix to dma-chan

2016-04-06 Thread Lars-Peter Clausen
On 04/06/2016 06:25 PM, Appana Durga Kedareswara Rao wrote: > Hi Soren, > > >> -Original Message- >> From: Sören Brinkmann [mailto:soren.brinkm...@xilinx.com] >> Sent: Wednesday, April 06, 2016 9:50 PM >> To: Appana Durga Kedareswara Rao >> Cc: robh...@kernel.org; pawel.m...@arm.com;

[PATCH 10/13] intel_idle: Propagate hot plug errors.

2016-04-06 Thread Len Brown
From: Richard Cochran If a cpuidle registration error occurs during the hot plug notifier callback, we should really inform the hot plug machinery instead of just ignoring the error. This patch changes the callback to properly return on error. Signed-off-by: Richard

[PATCH 10/13] intel_idle: Propagate hot plug errors.

2016-04-06 Thread Len Brown
From: Richard Cochran If a cpuidle registration error occurs during the hot plug notifier callback, we should really inform the hot plug machinery instead of just ignoring the error. This patch changes the callback to properly return on error. Signed-off-by: Richard Cochran Signed-off-by: Len

[PATCH 03/13] intel_idle: Fix a helper function's return value.

2016-04-06 Thread Len Brown
From: Richard Cochran The function, intel_idle_cpuidle_driver_init, delivers no error codes at all. This patch changes the function to return 'void' instead of returning zero. Signed-off-by: Richard Cochran Signed-off-by: Len Brown

[PATCH 03/13] intel_idle: Fix a helper function's return value.

2016-04-06 Thread Len Brown
From: Richard Cochran The function, intel_idle_cpuidle_driver_init, delivers no error codes at all. This patch changes the function to return 'void' instead of returning zero. Signed-off-by: Richard Cochran Signed-off-by: Len Brown --- drivers/idle/intel_idle.c | 4 +--- 1 file changed, 1

Re: [PATCH v3 01/15] dmaengine: dw: fix master selection

2016-04-06 Thread Koul, Vinod
On Wed, 2016-04-06 at 22:56 +0300, Andy Shevchenko wrote: > On Wed, Apr 6, 2016 at 9:56 PM, Vinod Koul > wrote: > > On Mon, Apr 04, 2016 at 08:10:54PM +0300, Andy Shevchenko wrote: > > > On Mon, 2016-04-04 at 10:03 -0700, Vinod Koul wrote: > > > > On Fri, Mar 18, 2016 at

Re: [PATCH v3 01/15] dmaengine: dw: fix master selection

2016-04-06 Thread Koul, Vinod
On Wed, 2016-04-06 at 22:56 +0300, Andy Shevchenko wrote: > On Wed, Apr 6, 2016 at 9:56 PM, Vinod Koul > wrote: > > On Mon, Apr 04, 2016 at 08:10:54PM +0300, Andy Shevchenko wrote: > > > On Mon, 2016-04-04 at 10:03 -0700, Vinod Koul wrote: > > > > On Fri, Mar 18, 2016 at 04:24:40PM +0200, Andy

Re: [PATCH v2 2/3] usb: dwc3: free dwc->regset on dwc3_debugfs_exit

2016-04-06 Thread Greg KH
On Wed, Apr 06, 2016 at 11:44:05PM +0800, changbin...@intel.com wrote: > From: "Du, Changbin" > > Signed-off-by: Du, Changbin > --- You need a changelog entry in order for a patch to be able to be accepted. thanks, greg k-h

Re: [PATCH v2 2/3] usb: dwc3: free dwc->regset on dwc3_debugfs_exit

2016-04-06 Thread Greg KH
On Wed, Apr 06, 2016 at 11:44:05PM +0800, changbin...@intel.com wrote: > From: "Du, Changbin" > > Signed-off-by: Du, Changbin > --- You need a changelog entry in order for a patch to be able to be accepted. thanks, greg k-h

Re: [PATCH v2] staging: iio: ad7606: use iio_device_{claim|release}_direct_mode()

2016-04-06 Thread Lars-Peter Clausen
On 04/06/2016 06:11 AM, Alison Schofield wrote: > Replace the code that guarantees the device stays in direct mode with > iio_device_{claim|release}_direct_mode() which does same. > > Signed-off-by: Alison Schofield Looks good, thanks. Acked-by: Lars-Peter Clausen

Re: [PATCH v2] staging: iio: ad7606: use iio_device_{claim|release}_direct_mode()

2016-04-06 Thread Lars-Peter Clausen
On 04/06/2016 06:11 AM, Alison Schofield wrote: > Replace the code that guarantees the device stays in direct mode with > iio_device_{claim|release}_direct_mode() which does same. > > Signed-off-by: Alison Schofield Looks good, thanks. Acked-by: Lars-Peter Clausen > --- > Changed in v2: > -

Oops in 4.6-rc2: NULL pointer dereference in cdc-acm

2016-04-06 Thread Gabriele Mazzotta
Hi, I'm getting a kernel oops when I plug some smartphone via USB to my laptop, which is currently running the v4.6-rc2. The problem seems to be caused by a81cf9799ad7 ("cdc-acm: implement put_char() and flush_chars()"). A simple NULL pointer check prevents the crash, but since I have no use of

Oops in 4.6-rc2: NULL pointer dereference in cdc-acm

2016-04-06 Thread Gabriele Mazzotta
Hi, I'm getting a kernel oops when I plug some smartphone via USB to my laptop, which is currently running the v4.6-rc2. The problem seems to be caused by a81cf9799ad7 ("cdc-acm: implement put_char() and flush_chars()"). A simple NULL pointer check prevents the crash, but since I have no use of

Re: [kernel-hardening] [RFC v1] mm: SLAB freelist randomization

2016-04-06 Thread Thomas Garnier
Yes, sorry about that. It will be in the next RFC or PATCH. On Wed, Apr 6, 2016 at 1:54 PM, Greg KH wrote: > On Wed, Apr 06, 2016 at 12:35:48PM -0700, Thomas Garnier wrote: >> Provide an optional config (CONFIG_FREELIST_RANDOM) to randomize the >> SLAB freelist. This

Re: [kernel-hardening] [RFC v1] mm: SLAB freelist randomization

2016-04-06 Thread Thomas Garnier
Yes, sorry about that. It will be in the next RFC or PATCH. On Wed, Apr 6, 2016 at 1:54 PM, Greg KH wrote: > On Wed, Apr 06, 2016 at 12:35:48PM -0700, Thomas Garnier wrote: >> Provide an optional config (CONFIG_FREELIST_RANDOM) to randomize the >> SLAB freelist. This security feature reduces the

[PATCH 08/13] intel_idle: Setup the timer broadcast only on successful driver load.

2016-04-06 Thread Len Brown
From: Richard Cochran This driver sets the broadcast tick quite early on during probe and does not clean up again in cast of failure. This patch moves the setup call after the registration, placing the on_each_cpu() calls within the global CPU lock region.

[PATCH 08/13] intel_idle: Setup the timer broadcast only on successful driver load.

2016-04-06 Thread Len Brown
From: Richard Cochran This driver sets the broadcast tick quite early on during probe and does not clean up again in cast of failure. This patch moves the setup call after the registration, placing the on_each_cpu() calls within the global CPU lock region. Signed-off-by: Richard Cochran

[PATCH 02/13] intel_idle: remove useless return from void function.

2016-04-06 Thread Len Brown
From: Richard Cochran Signed-off-by: Richard Cochran Signed-off-by: Len Brown --- drivers/idle/intel_idle.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c index

[PATCH 02/13] intel_idle: remove useless return from void function.

2016-04-06 Thread Len Brown
From: Richard Cochran Signed-off-by: Richard Cochran Signed-off-by: Len Brown --- drivers/idle/intel_idle.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c index 012980a..6638a80 100644 --- a/drivers/idle/intel_idle.c +++

[PATCH 06/13] intel_idle: Fix dangling registration on error path.

2016-04-06 Thread Len Brown
From: Richard Cochran In the module_init() method, if the per-CPU allocation fails, then the active cpuidle registration is not cleaned up. This patch fixes the issue by attempting the allocation before registration, and then cleaning it up again on registration failure.

[PATCH 09/13] intel_idle: Don't overreact to a cpuidle registration failure.

2016-04-06 Thread Len Brown
From: Richard Cochran The helper function, intel_idle_cpu_init, registers one new device with the cpuidle layer. If the registration should fail, that function immediately calls intel_idle_cpuidle_devices_uninit() to unregister every last CPU's device. However, it makes

[PATCH 06/13] intel_idle: Fix dangling registration on error path.

2016-04-06 Thread Len Brown
From: Richard Cochran In the module_init() method, if the per-CPU allocation fails, then the active cpuidle registration is not cleaned up. This patch fixes the issue by attempting the allocation before registration, and then cleaning it up again on registration failure. Signed-off-by: Richard

[PATCH 09/13] intel_idle: Don't overreact to a cpuidle registration failure.

2016-04-06 Thread Len Brown
From: Richard Cochran The helper function, intel_idle_cpu_init, registers one new device with the cpuidle layer. If the registration should fail, that function immediately calls intel_idle_cpuidle_devices_uninit() to unregister every last CPU's device. However, it makes no sense to do so, when

[PATCH 11/13] intel_idle: Clean up all registered devices on exit.

2016-04-06 Thread Len Brown
From: Richard Cochran This driver registers cpuidle devices when a CPU comes online, but it leaves the registrations in place when a CPU goes offline. The module exit code only unregisters the currently online CPUs, leaving the devices for offline CPUs dangling. This

[PATCH 11/13] intel_idle: Clean up all registered devices on exit.

2016-04-06 Thread Len Brown
From: Richard Cochran This driver registers cpuidle devices when a CPU comes online, but it leaves the registrations in place when a CPU goes offline. The module exit code only unregisters the currently online CPUs, leaving the devices for offline CPUs dangling. This patch changes the driver

[PATCH 05/13] intel_idle: Fix deallocation order on the driver exit path.

2016-04-06 Thread Len Brown
From: Richard Cochran In the module_exit() method, this driver first frees its per-CPU pointer, then unregisters a callback making use of the pointer. Furthermore, the function, intel_idle_cpuidle_devices_uninit, is racy against CPU hot plugging as it calls

[PATCH 07/13] intel_idle: Avoid a double free of the per-CPU data.

2016-04-06 Thread Len Brown
From: Richard Cochran The helper function, intel_idle_cpuidle_devices_uninit, frees the globally allocated per-CPU data. However, this function is invoked from the hot plug notifier callback at a time when freeing that data is not safe. If the call to

[PATCH 13/13] intel_idle: Add KBL support

2016-04-06 Thread Len Brown
From: Len Brown KBL is similar to SKL Signed-off-by: Len Brown --- drivers/idle/intel_idle.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c index d0ec343..c966492 100644 ---

[PATCH 05/13] intel_idle: Fix deallocation order on the driver exit path.

2016-04-06 Thread Len Brown
From: Richard Cochran In the module_exit() method, this driver first frees its per-CPU pointer, then unregisters a callback making use of the pointer. Furthermore, the function, intel_idle_cpuidle_devices_uninit, is racy against CPU hot plugging as it calls for_each_online_cpu(). This patch

[PATCH 07/13] intel_idle: Avoid a double free of the per-CPU data.

2016-04-06 Thread Len Brown
From: Richard Cochran The helper function, intel_idle_cpuidle_devices_uninit, frees the globally allocated per-CPU data. However, this function is invoked from the hot plug notifier callback at a time when freeing that data is not safe. If the call to cpuidle_register_driver() should fail

[PATCH 13/13] intel_idle: Add KBL support

2016-04-06 Thread Len Brown
From: Len Brown KBL is similar to SKL Signed-off-by: Len Brown --- drivers/idle/intel_idle.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c index d0ec343..c966492 100644 --- a/drivers/idle/intel_idle.c +++

[PATCH 04/13] intel_idle: Remove redundant initialization calls.

2016-04-06 Thread Len Brown
From: Richard Cochran The function, intel_idle_cpuidle_driver_init, makes calls on each CPU to auto_demotion_disable() and c1e_promotion_disable(). These calls are redundant, as intel_idle_cpu_init() does the same calls just a bit later on. They are also premature, as

[PATCH 01/13] intel_idle: add BXT support

2016-04-06 Thread Len Brown
From: Len Brown Broxton has all the HSW C-states, except C3. BXT C-state timing is slightly different. Here we trust the IRTL MSRs as authority on maximum C-state latency, and override the driver's tables with the values found in the associated IRTL MSRs. Further we set the

[PATCH 12/13] intel_idle: Add SKX support

2016-04-06 Thread Len Brown
From: Len Brown SKX is similar to BDX Signed-off-by: Len Brown --- drivers/idle/intel_idle.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c index

[PATCH 04/13] intel_idle: Remove redundant initialization calls.

2016-04-06 Thread Len Brown
From: Richard Cochran The function, intel_idle_cpuidle_driver_init, makes calls on each CPU to auto_demotion_disable() and c1e_promotion_disable(). These calls are redundant, as intel_idle_cpu_init() does the same calls just a bit later on. They are also premature, as the driver registration

[PATCH 01/13] intel_idle: add BXT support

2016-04-06 Thread Len Brown
From: Len Brown Broxton has all the HSW C-states, except C3. BXT C-state timing is slightly different. Here we trust the IRTL MSRs as authority on maximum C-state latency, and override the driver's tables with the values found in the associated IRTL MSRs. Further we set the target_residency to

[PATCH 12/13] intel_idle: Add SKX support

2016-04-06 Thread Len Brown
From: Len Brown SKX is similar to BDX Signed-off-by: Len Brown --- drivers/idle/intel_idle.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c index 7575699..d0ec343 100644 ---

[PATCH 0/13] intel_idle patches ready for upstream

2016-04-06 Thread Len Brown
Bug fixes, plus add a few more table entires for new model #'s. Some of the BXT table entries will be replaced by values read from processor configuration registers at boot-time. Let me know if you see troubles with any of these patches. They are all available on this git branch:

[PATCH 0/13] intel_idle patches ready for upstream

2016-04-06 Thread Len Brown
Bug fixes, plus add a few more table entires for new model #'s. Some of the BXT table entries will be replaced by values read from processor configuration registers at boot-time. Let me know if you see troubles with any of these patches. They are all available on this git branch:

Re: [PATCH] Prefer kASLR over Hibernation

2016-04-06 Thread Linus Torvalds
On Wed, Apr 6, 2016 at 1:17 PM, Pavel Machek wrote: > > Why is kASLR incompatible with hibernation? We can hibernate have > 4.3 kernel resume hibernation image of 4.2 kernel (on x86-64, and I > have patches for x86). Resuming kernel with different randomization > does not look that

Re: [PATCH] Prefer kASLR over Hibernation

2016-04-06 Thread Linus Torvalds
On Wed, Apr 6, 2016 at 1:17 PM, Pavel Machek wrote: > > Why is kASLR incompatible with hibernation? We can hibernate have > 4.3 kernel resume hibernation image of 4.2 kernel (on x86-64, and I > have patches for x86). Resuming kernel with different randomization > does not look that much

Re: [PATCH] Fixes some checkpatch.pl warnings

2016-04-06 Thread Greg KH
On Wed, Apr 06, 2016 at 04:38:07AM -0700, Manav Batra wrote: > CHECK: Alignment should match open parenthesis > WARNING: line over 80 characters > > Signed-off-by: Manav Batra > --- > drivers/staging/rts5208/ms.c | 66 > ++-- > 1

Re: [PATCH] Fixes some checkpatch.pl warnings

2016-04-06 Thread Greg KH
On Wed, Apr 06, 2016 at 04:38:07AM -0700, Manav Batra wrote: > CHECK: Alignment should match open parenthesis > WARNING: line over 80 characters > > Signed-off-by: Manav Batra > --- > drivers/staging/rts5208/ms.c | 66 > ++-- > 1 file changed, 39

Re: [kernel-hardening] [RFC v1] mm: SLAB freelist randomization

2016-04-06 Thread Greg KH
On Wed, Apr 06, 2016 at 12:35:48PM -0700, Thomas Garnier wrote: > Provide an optional config (CONFIG_FREELIST_RANDOM) to randomize the > SLAB freelist. This security feature reduces the predictability of > the kernel slab allocator against heap overflows. > > Randomized lists are pre-computed

Re: [kernel-hardening] [RFC v1] mm: SLAB freelist randomization

2016-04-06 Thread Greg KH
On Wed, Apr 06, 2016 at 12:35:48PM -0700, Thomas Garnier wrote: > Provide an optional config (CONFIG_FREELIST_RANDOM) to randomize the > SLAB freelist. This security feature reduces the predictability of > the kernel slab allocator against heap overflows. > > Randomized lists are pre-computed

Re: [PATCH net 2/4] lib/test_bpf: Add tests for unsigned BPF_JGT

2016-04-06 Thread David Miller
From: "Naveen N. Rao" Date: Tue, 5 Apr 2016 15:32:54 +0530 > Unsigned Jump-if-Greater-Than. > > Cc: Alexei Starovoitov > Cc: Daniel Borkmann > Cc: "David S. Miller" > Cc: Ananth N Mavinakayanahalli

Re: [PATCH net 1/4] lib/test_bpf: Fix JMP_JSET tests

2016-04-06 Thread David Miller
From: "Naveen N. Rao" Date: Tue, 5 Apr 2016 15:32:53 +0530 > JMP_JSET tests incorrectly used BPF_JNE. Fix the same. > > Cc: Alexei Starovoitov > Cc: Daniel Borkmann > Cc: "David S. Miller" > Cc: Ananth

Re: [PATCH net 1/4] lib/test_bpf: Fix JMP_JSET tests

2016-04-06 Thread David Miller
From: "Naveen N. Rao" Date: Tue, 5 Apr 2016 15:32:53 +0530 > JMP_JSET tests incorrectly used BPF_JNE. Fix the same. > > Cc: Alexei Starovoitov > Cc: Daniel Borkmann > Cc: "David S. Miller" > Cc: Ananth N Mavinakayanahalli > Cc: Michael Ellerman > Cc: Paul Mackerras > Signed-off-by:

Re: [PATCH net 2/4] lib/test_bpf: Add tests for unsigned BPF_JGT

2016-04-06 Thread David Miller
From: "Naveen N. Rao" Date: Tue, 5 Apr 2016 15:32:54 +0530 > Unsigned Jump-if-Greater-Than. > > Cc: Alexei Starovoitov > Cc: Daniel Borkmann > Cc: "David S. Miller" > Cc: Ananth N Mavinakayanahalli > Cc: Michael Ellerman > Cc: Paul Mackerras > Signed-off-by: Naveen N. Rao Applied.

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