[PATCHv6 20/30] filemap: prepare find and delete operations for huge pages

2016-04-06 Thread Kirill A. Shutemov
For now, we would have HPAGE_PMD_NR entries in radix tree for every huge page. That's suboptimal and it will be changed to use Matthew's multi-order entries later. 'add' operation is not changed, because we don't need it to implement hugetmpfs: shmem uses its own implementation. Signed-off-by:

[PATCHv6 20/30] filemap: prepare find and delete operations for huge pages

2016-04-06 Thread Kirill A. Shutemov
For now, we would have HPAGE_PMD_NR entries in radix tree for every huge page. That's suboptimal and it will be changed to use Matthew's multi-order entries later. 'add' operation is not changed, because we don't need it to implement hugetmpfs: shmem uses its own implementation. Signed-off-by:

[PATCHv6 16/30] thp, mlock: do not mlock PTE-mapped file huge pages

2016-04-06 Thread Kirill A. Shutemov
As with anon THP, we only mlock file huge pages if we can prove that the page is not mapped with PTE. This way we can avoid mlock leak into non-mlocked vma on split. We rely on PageDoubleMap() under lock_page() to check if the the page may be PTE mapped. PG_double_map is set by

[PATCHv6 16/30] thp, mlock: do not mlock PTE-mapped file huge pages

2016-04-06 Thread Kirill A. Shutemov
As with anon THP, we only mlock file huge pages if we can prove that the page is not mapped with PTE. This way we can avoid mlock leak into non-mlocked vma on split. We rely on PageDoubleMap() under lock_page() to check if the the page may be PTE mapped. PG_double_map is set by

[PATCHv6 24/30] shmem: get_unmapped_area align huge page

2016-04-06 Thread Kirill A. Shutemov
From: Hugh Dickins Provide a shmem_get_unmapped_area method in file_operations, called at mmap time to decide the mapping address. It could be conditional on CONFIG_TRANSPARENT_HUGEPAGE, but save #ifdefs in other places by making it unconditional. shmem_get_unmapped_area()

[PATCHv6 28/30] thp: extract khugepaged from mm/huge_memory.c

2016-04-06 Thread Kirill A. Shutemov
khugepaged implementation grew to the point when it deserve separate file in source. Let's move it to mm/khugepaged.c. Signed-off-by: Kirill A. Shutemov --- include/linux/huge_mm.h| 10 + include/linux/khugepaged.h |6 + mm/Makefile|

[PATCHv6 24/30] shmem: get_unmapped_area align huge page

2016-04-06 Thread Kirill A. Shutemov
From: Hugh Dickins Provide a shmem_get_unmapped_area method in file_operations, called at mmap time to decide the mapping address. It could be conditional on CONFIG_TRANSPARENT_HUGEPAGE, but save #ifdefs in other places by making it unconditional. shmem_get_unmapped_area() first calls the

[PATCHv6 28/30] thp: extract khugepaged from mm/huge_memory.c

2016-04-06 Thread Kirill A. Shutemov
khugepaged implementation grew to the point when it deserve separate file in source. Let's move it to mm/khugepaged.c. Signed-off-by: Kirill A. Shutemov --- include/linux/huge_mm.h| 10 + include/linux/khugepaged.h |6 + mm/Makefile|2 +- mm/huge_memory.c

[PATCHv6 00/30] THP-enabled tmpfs/shmem using compound pages

2016-04-06 Thread Kirill A. Shutemov
Hugh pointed that collapse (or recovery) support is a deal breaker for my hugetmpfs patchset to be consider for inclusion. So I try to catch up on that. :) I've extended khugepaged to deal with shmem. This part is still experimental, but it seems works fine with use-cases I've tested it. Some

Re: [PATCH 1/2] lkdtm: fix memory leak of val

2016-04-06 Thread Kees Cook
On Tue, Apr 5, 2016 at 10:11 AM, Sudip Mukherjee wrote: > This case is supposed to read from a page after after it is freed, but > it missed freeing val if we are not able to get a free page. > > Signed-off-by: Sudip Mukherjee Thanks!

Re: [PATCH 2/2] lkdtm: fix memory leak of base

2016-04-06 Thread Kees Cook
On Tue, Apr 5, 2016 at 10:11 AM, Sudip Mukherjee wrote: > This case is supposed to read from a memory after it has been freed, > but we missed freeing base if the memory 'val' could not be allocated. > > Signed-off-by: Sudip Mukherjee

[PATCHv6 00/30] THP-enabled tmpfs/shmem using compound pages

2016-04-06 Thread Kirill A. Shutemov
Hugh pointed that collapse (or recovery) support is a deal breaker for my hugetmpfs patchset to be consider for inclusion. So I try to catch up on that. :) I've extended khugepaged to deal with shmem. This part is still experimental, but it seems works fine with use-cases I've tested it. Some

Re: [PATCH 1/2] lkdtm: fix memory leak of val

2016-04-06 Thread Kees Cook
On Tue, Apr 5, 2016 at 10:11 AM, Sudip Mukherjee wrote: > This case is supposed to read from a page after after it is freed, but > it missed freeing val if we are not able to get a free page. > > Signed-off-by: Sudip Mukherjee Thanks! Applied to my tree. -Kees > --- > drivers/misc/lkdtm.c |

Re: [PATCH 2/2] lkdtm: fix memory leak of base

2016-04-06 Thread Kees Cook
On Tue, Apr 5, 2016 at 10:11 AM, Sudip Mukherjee wrote: > This case is supposed to read from a memory after it has been freed, > but we missed freeing base if the memory 'val' could not be allocated. > > Signed-off-by: Sudip Mukherjee Also applied. Thanks! -Kees > --- > drivers/misc/lkdtm.c

[PATCH] sata_dwc_460ex: fix burst transaction length

2016-04-06 Thread Christian Lamparter
According to DesignWare DW_ahb_dmac Databook page 159, both SRC_MSIZE and DEST_MSIZE values "are not related to AHB bus mater HBURST bus". The hardware uses these values as a unit of TR_WIDTHs. As both TR_WIDTHs are hardcoded to 4 Bytes, the MSIZEs should be 16, so the burst transaction length

[PATCH] sata_dwc_460ex: fix burst transaction length

2016-04-06 Thread Christian Lamparter
According to DesignWare DW_ahb_dmac Databook page 159, both SRC_MSIZE and DEST_MSIZE values "are not related to AHB bus mater HBURST bus". The hardware uses these values as a unit of TR_WIDTHs. As both TR_WIDTHs are hardcoded to 4 Bytes, the MSIZEs should be 16, so the burst transaction length

Re: [PATCH] extcon: usb-gpio: switch to use pm wakeirq apis

2016-04-06 Thread Tony Lindgren
* Grygorii Strashko [160406 10:33]: > Switch to use PM wakeirq APIs which automates wakeup IRQs > enabling/disabling and so allows to make code simpler. > > Signed-off-by: Grygorii Strashko Looks good to me: Acked-by: Tony Lindgren

Re: [PATCH] extcon: usb-gpio: switch to use pm wakeirq apis

2016-04-06 Thread Tony Lindgren
* Grygorii Strashko [160406 10:33]: > Switch to use PM wakeirq APIs which automates wakeup IRQs > enabling/disabling and so allows to make code simpler. > > Signed-off-by: Grygorii Strashko Looks good to me: Acked-by: Tony Lindgren

Re: [PATCH] Prefer kASLR over Hibernation

2016-04-06 Thread Paul Bolle
On wo, 2016-04-06 at 15:16 -0700, Kees Cook wrote: > And it seems like Fedora either doesn't either, or has a lot of people > for whom it doesn't work: > https://bugzilla.redhat.com/show_bug.cgi?id=1206936 > https://bugzilla.redhat.com/show_bug.cgi?id=1224151 >

Re: [PATCH] Prefer kASLR over Hibernation

2016-04-06 Thread Paul Bolle
On wo, 2016-04-06 at 15:16 -0700, Kees Cook wrote: > And it seems like Fedora either doesn't either, or has a lot of people > for whom it doesn't work: > https://bugzilla.redhat.com/show_bug.cgi?id=1206936 > https://bugzilla.redhat.com/show_bug.cgi?id=1224151 >

Re: [PATCH] Honor mmap_min_addr with the actual minimum

2016-04-06 Thread Kees Cook
On Wed, Apr 6, 2016 at 12:07 PM, Hector Marco-Gisbert wrote: > The minimum address that a process is allowed to mmap when LSM is > enabled is 0x1 (65536). This value is tunable and exported via > /proc/sys/vm/mmap_min_addr but it is not honored with the actual > minimum

Re: [PATCH] Honor mmap_min_addr with the actual minimum

2016-04-06 Thread Kees Cook
On Wed, Apr 6, 2016 at 12:07 PM, Hector Marco-Gisbert wrote: > The minimum address that a process is allowed to mmap when LSM is > enabled is 0x1 (65536). This value is tunable and exported via > /proc/sys/vm/mmap_min_addr but it is not honored with the actual > minimum value. I think this

Re: [PATCH v6 5/5] vfio/type1: return MSI mapping requirements with VFIO_IOMMU_GET_INFO

2016-04-06 Thread Alex Williamson
On Mon, 4 Apr 2016 08:30:11 + Eric Auger wrote: > This patch allows the user-space to know whether MSI addresses need to > be mapped in the IOMMU. The user-space uses VFIO_IOMMU_GET_INFO ioctl and > IOMMU_INFO_REQUIRE_MSI_MAP gets set if they need to. > > Also the

Re: [PATCH v6 5/5] vfio/type1: return MSI mapping requirements with VFIO_IOMMU_GET_INFO

2016-04-06 Thread Alex Williamson
On Mon, 4 Apr 2016 08:30:11 + Eric Auger wrote: > This patch allows the user-space to know whether MSI addresses need to > be mapped in the IOMMU. The user-space uses VFIO_IOMMU_GET_INFO ioctl and > IOMMU_INFO_REQUIRE_MSI_MAP gets set if they need to. > > Also the number of IOMMU pages

Re: [PATCH] Prefer kASLR over Hibernation

2016-04-06 Thread Rafael J. Wysocki
On Wed, Apr 6, 2016 at 11:52 PM, Ingo Molnar wrote: > > * Ingo Molnar wrote: > >> >> * Kees Cook wrote: >> >> > On Wed, Apr 6, 2016 at 1:56 PM, Linus Torvalds >> > wrote: >> > > On Wed, Apr 6, 2016 at

Re: [PATCH] Prefer kASLR over Hibernation

2016-04-06 Thread Rafael J. Wysocki
On Wed, Apr 6, 2016 at 11:52 PM, Ingo Molnar wrote: > > * Ingo Molnar wrote: > >> >> * Kees Cook wrote: >> >> > 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

Re: [PATCH RFC] clocksource: Detect a watchdog overflow

2016-04-06 Thread John Stultz
On Tue, Mar 15, 2016 at 11:50 AM, Gratian Crisan wrote: > The clocksource watchdog can falsely trigger and disable the main > clocksource when the watchdog wraps around. > > The reason is that an interrupt storm and/or high priority (FIFO/RR) tasks > can preempt the timer

Re: [PATCH RFC] clocksource: Detect a watchdog overflow

2016-04-06 Thread John Stultz
On Tue, Mar 15, 2016 at 11:50 AM, Gratian Crisan wrote: > The clocksource watchdog can falsely trigger and disable the main > clocksource when the watchdog wraps around. > > The reason is that an interrupt storm and/or high priority (FIFO/RR) tasks > can preempt the timer softirq long enough for

Re: [PATCH] Prefer kASLR over Hibernation

2016-04-06 Thread Kees Cook
On Wed, Apr 6, 2016 at 3:04 PM, Rafael J. Wysocki wrote: > On Wed, Apr 6, 2016 at 11:56 PM, Ingo Molnar wrote: >> >> * Rafael J. Wysocki wrote: >> >>> On Wed, Apr 6, 2016 at 9:44 PM, Kees Cook wrote: >>> > When

Re: [PATCH] Prefer kASLR over Hibernation

2016-04-06 Thread Kees Cook
On Wed, Apr 6, 2016 at 3:04 PM, Rafael J. Wysocki wrote: > On Wed, Apr 6, 2016 at 11:56 PM, Ingo Molnar wrote: >> >> * Rafael J. Wysocki wrote: >> >>> On Wed, Apr 6, 2016 at 9:44 PM, Kees Cook wrote: >>> > When building with both CONFIG_HIBERNATION and CONFIG_RANDOMIZE_BASE, >>> > one or the

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

2016-04-06 Thread Koul, Vinod
On Wed, 2016-04-06 at 23:16 +0200, Lars-Peter Clausen wrote: > On 04/06/2016 06:25 PM, Appana Durga Kedareswara Rao wrote: > > a/Documentation/devicetree/bindings/dma/xilinx/xilinx_vdma.txt > > > > +++ > > > > b/Documentation/devicetree/bindings/dma/xilinx/xilinx_vdma.txt > > > > @@ -24,8 +24,8 @@

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

2016-04-06 Thread Koul, Vinod
On Wed, 2016-04-06 at 23:16 +0200, Lars-Peter Clausen wrote: > On 04/06/2016 06:25 PM, Appana Durga Kedareswara Rao wrote: > > a/Documentation/devicetree/bindings/dma/xilinx/xilinx_vdma.txt > > > > +++ > > > > b/Documentation/devicetree/bindings/dma/xilinx/xilinx_vdma.txt > > > > @@ -24,8 +24,8 @@

Re: [PATCH 0/2] memory_hotplug: introduce config and command line options to set the default onlining policy

2016-04-06 Thread David Rientjes
On Wed, 6 Apr 2016, Andrew Morton wrote: > > This patchset continues the work I started with: > > > > commit 31bc3858ea3ebcc3157b3f5f0e624c5962f5a7a6 > > Author: Vitaly Kuznetsov > > Date: Tue Mar 15 14:56:48 2016 -0700 > > > > memory-hotplug: add automatic onlining

Re: [PATCH 0/2] memory_hotplug: introduce config and command line options to set the default onlining policy

2016-04-06 Thread David Rientjes
On Wed, 6 Apr 2016, Andrew Morton wrote: > > This patchset continues the work I started with: > > > > commit 31bc3858ea3ebcc3157b3f5f0e624c5962f5a7a6 > > Author: Vitaly Kuznetsov > > Date: Tue Mar 15 14:56:48 2016 -0700 > > > > memory-hotplug: add automatic onlining policy for the newly

[patch v2] mm, hugetlb_cgroup: round limit_in_bytes down to hugepage size

2016-04-06 Thread David Rientjes
The page_counter rounds limits down to page size values. This makes sense, except in the case of hugetlb_cgroup where it's not possible to charge partial hugepages. Round the hugetlb_cgroup limit down to hugepage size. Signed-off-by: David Rientjes --- mm/hugetlb_cgroup.c

[patch v2] mm, hugetlb_cgroup: round limit_in_bytes down to hugepage size

2016-04-06 Thread David Rientjes
The page_counter rounds limits down to page size values. This makes sense, except in the case of hugetlb_cgroup where it's not possible to charge partial hugepages. Round the hugetlb_cgroup limit down to hugepage size. Signed-off-by: David Rientjes --- mm/hugetlb_cgroup.c | 35

Re: [PATCH 2/3] percpu_stats: Simple per-cpu statistics count helper functions

2016-04-06 Thread Waiman Long
On 04/04/2016 03:09 PM, Christoph Lameter wrote: On Mon, 4 Apr 2016, Waiman Long wrote: + if ((unsigned int)stat>= pcs->nstats) + return; + preempt_disable(); + pstat = this_cpu_ptr(>stats[stat]); + *pstat += cnt; + preempt_enable(); +} pstat =

Re: [PATCH 2/3] percpu_stats: Simple per-cpu statistics count helper functions

2016-04-06 Thread Waiman Long
On 04/04/2016 03:09 PM, Christoph Lameter wrote: On Mon, 4 Apr 2016, Waiman Long wrote: + if ((unsigned int)stat>= pcs->nstats) + return; + preempt_disable(); + pstat = this_cpu_ptr(>stats[stat]); + *pstat += cnt; + preempt_enable(); +} pstat =

Re: [PATCH v6 2/5] vfio: allow the user to register reserved iova range for MSI mapping

2016-04-06 Thread Alex Williamson
On Mon, 4 Apr 2016 08:30:08 + Eric Auger wrote: > The user is allowed to [un]register a reserved IOVA range by using the > DMA MAP API and setting the new flag: VFIO_DMA_MAP_FLAG_MSI_RESERVED_IOVA. > It provides the base address and the size. This region is stored in

Re: [PATCH v6 2/5] vfio: allow the user to register reserved iova range for MSI mapping

2016-04-06 Thread Alex Williamson
On Mon, 4 Apr 2016 08:30:08 + Eric Auger wrote: > The user is allowed to [un]register a reserved IOVA range by using the > DMA MAP API and setting the new flag: VFIO_DMA_MAP_FLAG_MSI_RESERVED_IOVA. > It provides the base address and the size. This region is stored in the > vfio_dma rb tree.

Re: [PATCH] Prefer kASLR over Hibernation

2016-04-06 Thread Rafael J. Wysocki
On Wed, Apr 6, 2016 at 11:56 PM, Ingo Molnar wrote: > > * Rafael J. Wysocki wrote: > >> On Wed, Apr 6, 2016 at 9:44 PM, Kees Cook wrote: >> > When building with both CONFIG_HIBERNATION and CONFIG_RANDOMIZE_BASE, >> > one or the other

Re: [PATCH] Prefer kASLR over Hibernation

2016-04-06 Thread Rafael J. Wysocki
On Wed, Apr 6, 2016 at 11:56 PM, Ingo Molnar wrote: > > * Rafael J. Wysocki wrote: > >> On Wed, Apr 6, 2016 at 9:44 PM, Kees Cook wrote: >> > When building with both CONFIG_HIBERNATION and CONFIG_RANDOMIZE_BASE, >> > one or the other must be chosen at boot-time. Until now, hibernation >> > was

[4.6-rcX regression] closing and opening LID on thinkpad x200s freezes X

2016-04-06 Thread Jiri Kosina
Hi, after updating to 4.6-rcX (where X is 1 or 2, doesn't really matter) on thinkpad x200s notebook with 00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07) closing and opening the lid freezes the computer completely

[4.6-rcX regression] closing and opening LID on thinkpad x200s freezes X

2016-04-06 Thread Jiri Kosina
Hi, after updating to 4.6-rcX (where X is 1 or 2, doesn't really matter) on thinkpad x200s notebook with 00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07) closing and opening the lid freezes the computer completely

Re: [PATCH 10/10] arch: fix has_transparent_hugepage()

2016-04-06 Thread Ingo Molnar
* Chris Metcalf wrote: > On 4/6/2016 2:58 AM, Ingo Molnar wrote: > >* Hugh Dickins wrote: > > > >>--- a/arch/x86/include/asm/pgtable.h > >>+++ b/arch/x86/include/asm/pgtable.h > >>@@ -181,6 +181,7 @@ static inline int pmd_trans_huge(pmd_t p > >>

Re: [PATCH 10/10] arch: fix has_transparent_hugepage()

2016-04-06 Thread Ingo Molnar
* Chris Metcalf wrote: > On 4/6/2016 2:58 AM, Ingo Molnar wrote: > >* Hugh Dickins wrote: > > > >>--- a/arch/x86/include/asm/pgtable.h > >>+++ b/arch/x86/include/asm/pgtable.h > >>@@ -181,6 +181,7 @@ static inline int pmd_trans_huge(pmd_t p > >>return (pmd_val(pmd) &

Re: [PATCH] Prefer kASLR over Hibernation

2016-04-06 Thread Ingo Molnar
* Rafael J. Wysocki wrote: > On Wed, Apr 6, 2016 at 9:44 PM, Kees Cook wrote: > > When building with both CONFIG_HIBERNATION and CONFIG_RANDOMIZE_BASE, > > one or the other must be chosen at boot-time. Until now, hibernation > > was selected when no

Re: [PATCH] Prefer kASLR over Hibernation

2016-04-06 Thread Ingo Molnar
* Rafael J. Wysocki wrote: > On Wed, Apr 6, 2016 at 9:44 PM, Kees Cook wrote: > > When building with both CONFIG_HIBERNATION and CONFIG_RANDOMIZE_BASE, > > one or the other must be chosen at boot-time. Until now, hibernation > > was selected when no choice was made on the command line. > > > >

Re: [PATCHSET RFC cgroup/for-4.6] cgroup, sched: implement resource group and PRIO_RGRP

2016-04-06 Thread Tejun Heo
Hello, Michal. Sorry about the delay. On Tue, Mar 15, 2016 at 06:21:36PM +0100, Michal Hocko wrote: > While I agree that per-thread granularity is no fun for controllers > which operate on different than task_struct entities (like memory cgroup > controller) but I am afraid that all the

Re: [PATCHSET RFC cgroup/for-4.6] cgroup, sched: implement resource group and PRIO_RGRP

2016-04-06 Thread Tejun Heo
Hello, Michal. Sorry about the delay. On Tue, Mar 15, 2016 at 06:21:36PM +0100, Michal Hocko wrote: > While I agree that per-thread granularity is no fun for controllers > which operate on different than task_struct entities (like memory cgroup > controller) but I am afraid that all the

Re: [PATCH] Prefer kASLR over Hibernation

2016-04-06 Thread Ingo Molnar
* Ingo Molnar wrote: > > * Kees Cook wrote: > > > 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

Re: [PATCH 2/3] percpu_stats: Simple per-cpu statistics count helper functions

2016-04-06 Thread Waiman Long
On 04/04/2016 12:02 PM, Tejun Heo wrote: Hello, On Fri, Apr 01, 2016 at 11:09:37PM -0400, Waiman Long wrote: ... +struct percpu_stats { + unsigned long __percpu *stats; I'm not sure ulong is the best choice here. Atomic reads on 32bit are nice but people often need 64bit counters for

Re: [PATCH] Prefer kASLR over Hibernation

2016-04-06 Thread Ingo Molnar
* Ingo Molnar wrote: > > * Kees Cook wrote: > > > 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

Re: [PATCH 2/3] percpu_stats: Simple per-cpu statistics count helper functions

2016-04-06 Thread Waiman Long
On 04/04/2016 12:02 PM, Tejun Heo wrote: Hello, On Fri, Apr 01, 2016 at 11:09:37PM -0400, Waiman Long wrote: ... +struct percpu_stats { + unsigned long __percpu *stats; I'm not sure ulong is the best choice here. Atomic reads on 32bit are nice but people often need 64bit counters for

Re: [PATCH 1/7] cpufreq: remove redundant CPUFREQ_INCOMPATIBLE notifier event

2016-04-06 Thread Saravana Kannan
On 04/06/2016 02:45 PM, Rafael J. Wysocki wrote: On Wed, Apr 6, 2016 at 11:29 PM, Saravana Kannan wrote: On 04/06/2016 02:21 PM, Rafael J. Wysocki wrote: On Wed, Apr 6, 2016 at 10:30 PM, Saravana Kannan wrote: On 09/09/2015 05:53 PM, Rafael

Re: [PATCH 1/7] cpufreq: remove redundant CPUFREQ_INCOMPATIBLE notifier event

2016-04-06 Thread Saravana Kannan
On 04/06/2016 02:45 PM, Rafael J. Wysocki wrote: On Wed, Apr 6, 2016 at 11:29 PM, Saravana Kannan wrote: On 04/06/2016 02:21 PM, Rafael J. Wysocki wrote: On Wed, Apr 6, 2016 at 10:30 PM, Saravana Kannan wrote: On 09/09/2015 05:53 PM, Rafael J. Wysocki wrote: [cut] Well, nobody was

Re: [PATCH] Prefer kASLR over Hibernation

2016-04-06 Thread Rafael J. Wysocki
On Wed, Apr 6, 2016 at 9:44 PM, Kees Cook wrote: > When building with both CONFIG_HIBERNATION and CONFIG_RANDOMIZE_BASE, > one or the other must be chosen at boot-time. Until now, hibernation > was selected when no choice was made on the command line. > > To make the

Re: [PATCH] Prefer kASLR over Hibernation

2016-04-06 Thread Rafael J. Wysocki
On Wed, Apr 6, 2016 at 9:44 PM, Kees Cook wrote: > When building with both CONFIG_HIBERNATION and CONFIG_RANDOMIZE_BASE, > one or the other must be chosen at boot-time. Until now, hibernation > was selected when no choice was made on the command line. > > To make the security benefits of kASLR

Re: [PATCH] Prefer kASLR over Hibernation

2016-04-06 Thread Ingo Molnar
* Kees Cook wrote: > 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

Re: [PATCH] Prefer kASLR over Hibernation

2016-04-06 Thread Ingo Molnar
* Kees Cook wrote: > 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

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

2016-04-06 Thread Ingo Molnar
* Linus Torvalds wrote: > So yeah, maybe swap partitions are still more common than I thought. And I > didn't even consider the possibility that people would hibernate a desktop > like > you do. Also many distros will hibernate automatically on critically low

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

2016-04-06 Thread Ingo Molnar
* Linus Torvalds wrote: > So yeah, maybe swap partitions are still more common than I thought. And I > didn't even consider the possibility that people would hibernate a desktop > like > you do. Also many distros will hibernate automatically on critically low battery (when suspend won't

Re: [RFC v1] mm: SLAB freelist randomization

2016-04-06 Thread Kees Cook
On Wed, Apr 6, 2016 at 12:35 PM, Thomas Garnier wrote: > Provide an optional config (CONFIG_FREELIST_RANDOM) to randomize the > SLAB freelist. It may be useful to describe _how_ it randomizes it (i.e. a high-level description of what needed changing). > This security

Re: [PATCH 1/7] cpufreq: remove redundant CPUFREQ_INCOMPATIBLE notifier event

2016-04-06 Thread Rafael J. Wysocki
On Wed, Apr 6, 2016 at 11:29 PM, Saravana Kannan wrote: > On 04/06/2016 02:21 PM, Rafael J. Wysocki wrote: >> >> On Wed, Apr 6, 2016 at 10:30 PM, Saravana Kannan >> wrote: >>> >>> On 09/09/2015 05:53 PM, Rafael J. Wysocki wrote: [cut] >> >>

Re: [RFC v1] mm: SLAB freelist randomization

2016-04-06 Thread Kees Cook
On Wed, Apr 6, 2016 at 12:35 PM, Thomas Garnier wrote: > Provide an optional config (CONFIG_FREELIST_RANDOM) to randomize the > SLAB freelist. It may be useful to describe _how_ it randomizes it (i.e. a high-level description of what needed changing). > This security feature reduces the

Re: [PATCH 1/7] cpufreq: remove redundant CPUFREQ_INCOMPATIBLE notifier event

2016-04-06 Thread Rafael J. Wysocki
On Wed, Apr 6, 2016 at 11:29 PM, Saravana Kannan wrote: > On 04/06/2016 02:21 PM, Rafael J. Wysocki wrote: >> >> On Wed, Apr 6, 2016 at 10:30 PM, Saravana Kannan >> wrote: >>> >>> On 09/09/2015 05:53 PM, Rafael J. Wysocki wrote: [cut] >> >> Well, nobody was using that event. >> > > True,

[PATCH] staging: rts5208: alignment to match open paranthesis

2016-04-06 Thread Manav Batra
Fixes CHECK: Alignment should match open parenthesis Is the subject and patch fine? Sorry, just getting used to the process, and thanks. Signed-off-by: Manav Batra --- drivers/staging/rts5208/ms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] staging: rts5208: alignment to match open paranthesis

2016-04-06 Thread Manav Batra
Fixes CHECK: Alignment should match open parenthesis Is the subject and patch fine? Sorry, just getting used to the process, and thanks. Signed-off-by: Manav Batra --- drivers/staging/rts5208/ms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rts5208/ms.c

Applied "spi: cadence: Fix some checkpatch warnings" to the spi tree

2016-04-06 Thread Mark Brown
The patch spi: cadence: Fix some checkpatch warnings has been applied to the spi tree at git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus

Applied "spi: cadence: Fix some checkpatch warnings" to the spi tree

2016-04-06 Thread Mark Brown
The patch spi: cadence: Fix some checkpatch warnings has been applied to the spi tree at git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus

Re: [PATCH V2 5/9] arm64: exception: handle instruction abort at current EL

2016-04-06 Thread Baicar, Tyler
Hello Marc, On 4/6/2016 9:36 AM, Marc Zyngier wrote: On 06/04/16 16:12, Tyler Baicar wrote: Add a handler for instruction aborts at the current EL (ESR_ELx_EC_IABT_CUR) so they are no longer handled in el1_inv. This allows firmware first handling for possible SEA (Synchronous External Abort)

Re: [PATCH V2 5/9] arm64: exception: handle instruction abort at current EL

2016-04-06 Thread Baicar, Tyler
Hello Marc, On 4/6/2016 9:36 AM, Marc Zyngier wrote: On 06/04/16 16:12, Tyler Baicar wrote: Add a handler for instruction aborts at the current EL (ESR_ELx_EC_IABT_CUR) so they are no longer handled in el1_inv. This allows firmware first handling for possible SEA (Synchronous External Abort)

[PATCH 02/30] radix tree test suite: Fix build

2016-04-06 Thread Matthew Wilcox
Add an empty linux/init.h, and definitions for a few parts of the kernel API either in use now, or to be used in the near future. Start using the common definitions in tools/include/linux, although more work needs to be done here. Signed-off-by: Matthew Wilcox

Re: [PATCH] HID: simplify implement() a bit

2016-04-06 Thread Doug Anderson
Dmitry, On Wed, Apr 6, 2016 at 10:19 AM, Dmitry Torokhov wrote: > The 'size' variable is not really needed, and we can also shift constant > in the loop body when masking off existing bits. > > Also we do not have to us 64 bit calculations if we take an extra > branch.

[PATCH 05/30] radix tree test suite: keep regression test runs short

2016-04-06 Thread Matthew Wilcox
From: Ross Zwisler Currently the full suite of regression tests take upwards of 30 minutes to run on my development machine. The vast majority of this time is taken by the big_gang_check() and copy_tag_check() tests, which each run their tests through thousands of

[PATCH 02/30] radix tree test suite: Fix build

2016-04-06 Thread Matthew Wilcox
Add an empty linux/init.h, and definitions for a few parts of the kernel API either in use now, or to be used in the near future. Start using the common definitions in tools/include/linux, although more work needs to be done here. Signed-off-by: Matthew Wilcox Reviewed-by: Ross Zwisler ---

Re: [PATCH] HID: simplify implement() a bit

2016-04-06 Thread Doug Anderson
Dmitry, On Wed, Apr 6, 2016 at 10:19 AM, Dmitry Torokhov wrote: > The 'size' variable is not really needed, and we can also shift constant > in the loop body when masking off existing bits. > > Also we do not have to us 64 bit calculations if we take an extra > branch. > > Suggested-by: Doug

[PATCH 05/30] radix tree test suite: keep regression test runs short

2016-04-06 Thread Matthew Wilcox
From: Ross Zwisler Currently the full suite of regression tests take upwards of 30 minutes to run on my development machine. The vast majority of this time is taken by the big_gang_check() and copy_tag_check() tests, which each run their tests through thousands of iterations...does this have

[PATCH 10/30] radix-tree: Fix sibling entry insertion

2016-04-06 Thread Matthew Wilcox
The subtraction was the wrong way round, leading to undefined behaviour (shift by an amount larger than the size of the type). Signed-off-by: Matthew Wilcox Reviewed-by: Ross Zwisler --- lib/radix-tree.c | 4 ++-- 1 file changed, 2

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

2016-04-06 Thread Linus Torvalds
On Wed, Apr 6, 2016 at 2:27 PM, Kees Cook wrote: > > Hrm, okay. I still think just changing the perms would be less > troublesome. No, that would be much *more* trouble-some, because we have things like bug-reporting documentation that tells people to send /proc/iomem etc

[PATCH 10/30] radix-tree: Fix sibling entry insertion

2016-04-06 Thread Matthew Wilcox
The subtraction was the wrong way round, leading to undefined behaviour (shift by an amount larger than the size of the type). Signed-off-by: Matthew Wilcox Reviewed-by: Ross Zwisler --- lib/radix-tree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/radix-tree.c

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

2016-04-06 Thread Linus Torvalds
On Wed, Apr 6, 2016 at 2:27 PM, Kees Cook wrote: > > Hrm, okay. I still think just changing the perms would be less > troublesome. No, that would be much *more* trouble-some, because we have things like bug-reporting documentation that tells people to send /proc/iomem etc information on crashes.

[PATCH 11/30] radix-tree: Fix deleting a multi-order entry through an alias

2016-04-06 Thread Matthew Wilcox
If we deleted an entry through an index which looked up a sibling pointer, we'd end up zeroing out the wrong slots in the node. Use get_sibling_offset() to find the right slot. Signed-off-by: Matthew Wilcox Reviewed-by: Ross Zwisler ---

[PATCH 00/30] Radix tree multiorder fixes

2016-04-06 Thread Matthew Wilcox
I must apologise for commit f96d18ff84 which left the impression that the support for multiorder radix tree entries was functional. As soon as Ross tried to use it, it became apparent that my testing was completely inadequate, and it didn't even work a little bit for orders that were not a

[PATCH 01/30] radix-tree: Introduce radix_tree_empty

2016-04-06 Thread Matthew Wilcox
The irqdomain code was checking for 0 or 1 entries, not 0 entries like the comment said they were. Introduce a new helper that will actually check for an empty tree. Signed-off-by: Matthew Wilcox Reviewed-by: Ross Zwisler ---

[PATCH 09/30] radix-tree: Add missing sibling entry functionality

2016-04-06 Thread Matthew Wilcox
The code I previously added to enable multiorder radix tree entries was untested and hence buggy. This commit adds the support functions that Ross and I decided were necessary over a four-week period of iterating various designs. Signed-off-by: Matthew Wilcox Reviewed-by:

[PATCH 11/30] radix-tree: Fix deleting a multi-order entry through an alias

2016-04-06 Thread Matthew Wilcox
If we deleted an entry through an index which looked up a sibling pointer, we'd end up zeroing out the wrong slots in the node. Use get_sibling_offset() to find the right slot. Signed-off-by: Matthew Wilcox Reviewed-by: Ross Zwisler --- lib/radix-tree.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH 00/30] Radix tree multiorder fixes

2016-04-06 Thread Matthew Wilcox
I must apologise for commit f96d18ff84 which left the impression that the support for multiorder radix tree entries was functional. As soon as Ross tried to use it, it became apparent that my testing was completely inadequate, and it didn't even work a little bit for orders that were not a

[PATCH 01/30] radix-tree: Introduce radix_tree_empty

2016-04-06 Thread Matthew Wilcox
The irqdomain code was checking for 0 or 1 entries, not 0 entries like the comment said they were. Introduce a new helper that will actually check for an empty tree. Signed-off-by: Matthew Wilcox Reviewed-by: Ross Zwisler --- include/linux/radix-tree.h | 5 + kernel/irq/irqdomain.c |

[PATCH 09/30] radix-tree: Add missing sibling entry functionality

2016-04-06 Thread Matthew Wilcox
The code I previously added to enable multiorder radix tree entries was untested and hence buggy. This commit adds the support functions that Ross and I decided were necessary over a four-week period of iterating various designs. Signed-off-by: Matthew Wilcox Reviewed-by: Ross Zwisler ---

[PATCH 14/30] radix-tree: Fix extending the tree for multi-order entries at offset 0

2016-04-06 Thread Matthew Wilcox
The current code will insert entries at each level, as if we're going to add a new entry at the bottom level, so we then get an -EEXIST when we try to insert the entry into the tree. The best way to fix this is to not check 'order' when inserting into an empty tree. We still need to 'extend' the

Re: [PATCH 1/7] cpufreq: remove redundant CPUFREQ_INCOMPATIBLE notifier event

2016-04-06 Thread Saravana Kannan
On 04/06/2016 02:21 PM, Rafael J. Wysocki wrote: On Wed, Apr 6, 2016 at 10:30 PM, Saravana Kannan wrote: On 09/09/2015 05:53 PM, Rafael J. Wysocki wrote: Hi, On Thu, Sep 10, 2015 at 2:39 AM, Viresh Kumar wrote: On 10-09-15, 01:26, Rafael

[PATCH 15/30] radix-tree: Fix several shrinking bugs with multiorder entries

2016-04-06 Thread Matthew Wilcox
Setting the indirect bit on the user data entry used to be unambiguous because the tree walking code knew not to expect internal nodes in the last level of the tree. Multiorder entries can appear at any level of the tree, and a leaf with the indirect bit set is indistinguishable from a pointer to

[PATCH 04/30] radix tree test suite: Allow testing other fan-out values

2016-04-06 Thread Matthew Wilcox
From: Ross Zwisler The defines in regression2.c are already in radix-tree.h and duplicating them in the test case makes experimenting with other values for the fan-out harder than necessary. Allow the user of the radix tree to decide what the fan-out should be

[PATCH 06/30] radix tree test suite: rebuild when headers change

2016-04-06 Thread Matthew Wilcox
From: Ross Zwisler When we make changes to radix-tree.h in the regular kernel source (include/linux/radix-tree.h), we really want our test code to be rebuilt. We also include a few other headers from tools/include and probably want to rebuild if these have been

[PATCH 14/30] radix-tree: Fix extending the tree for multi-order entries at offset 0

2016-04-06 Thread Matthew Wilcox
The current code will insert entries at each level, as if we're going to add a new entry at the bottom level, so we then get an -EEXIST when we try to insert the entry into the tree. The best way to fix this is to not check 'order' when inserting into an empty tree. We still need to 'extend' the

Re: [PATCH 1/7] cpufreq: remove redundant CPUFREQ_INCOMPATIBLE notifier event

2016-04-06 Thread Saravana Kannan
On 04/06/2016 02:21 PM, Rafael J. Wysocki wrote: On Wed, Apr 6, 2016 at 10:30 PM, Saravana Kannan wrote: On 09/09/2015 05:53 PM, Rafael J. Wysocki wrote: Hi, On Thu, Sep 10, 2015 at 2:39 AM, Viresh Kumar wrote: On 10-09-15, 01:26, Rafael J. Wysocki wrote: On Monday, August 03, 2015

[PATCH 15/30] radix-tree: Fix several shrinking bugs with multiorder entries

2016-04-06 Thread Matthew Wilcox
Setting the indirect bit on the user data entry used to be unambiguous because the tree walking code knew not to expect internal nodes in the last level of the tree. Multiorder entries can appear at any level of the tree, and a leaf with the indirect bit set is indistinguishable from a pointer to

[PATCH 04/30] radix tree test suite: Allow testing other fan-out values

2016-04-06 Thread Matthew Wilcox
From: Ross Zwisler The defines in regression2.c are already in radix-tree.h and duplicating them in the test case makes experimenting with other values for the fan-out harder than necessary. Allow the user of the radix tree to decide what the fan-out should be rather than fixing it to 8 for

[PATCH 06/30] radix tree test suite: rebuild when headers change

2016-04-06 Thread Matthew Wilcox
From: Ross Zwisler When we make changes to radix-tree.h in the regular kernel source (include/linux/radix-tree.h), we really want our test code to be rebuilt. We also include a few other headers from tools/include and probably want to rebuild if these have been changed. Update the makefile so

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