Re: [PATCH 1/2] mm: Allow disabling deferred struct page initialisation

2016-08-02 Thread Srikar Dronamraju
* Dave Hansen [2016-08-02 11:09:21]: > On 08/02/2016 06:19 AM, Srikar Dronamraju wrote: > > Kernels compiled with CONFIG_DEFERRED_STRUCT_PAGE_INIT will initialise > > only certain size memory per node. The certain size takes into account > > the dentry and inode cache sizes. However such a kernel

Re: [PATCH 2/2] fadump: Disable deferred page struct initialisation

2016-08-02 Thread Vlastimil Babka
On 08/03/2016 07:20 AM, Balbir Singh wrote: On Tue, 2016-08-02 at 18:49 +0530, Srikar Dronamraju wrote: Fadump kernel reserves significant number of memory blocks. On a multi-node machine, with CONFIG_DEFFERRED_STRUCT_PAGE support, fadump kernel fails to boot. Fix this by disabling deferred page

Re: [PATCH 2/2] fadump: Disable deferred page struct initialisation

2016-08-02 Thread Balbir Singh
On Tue, 2016-08-02 at 18:49 +0530, Srikar Dronamraju wrote: > Fadump kernel reserves significant number of memory blocks. On a multi-node > machine, with CONFIG_DEFFERRED_STRUCT_PAGE support, fadump kernel fails to > boot. Fix this by disabling deferred page struct initialisation. >  How much memo

[PATCH] lkdtm: Mark lkdtm_rodata_do_nothing() notrace

2016-08-02 Thread Michael Ellerman
lkdtm_rodata_do_nothing() is an empty function which is generated in order to test the non-executability of rodata. Currently if function tracing is enabled then an mcount callsite will be generated for lkdtm_rodata_do_nothing(), and it will appear in the list of available functions for function t

Re: [kernel-hardening] Re: Linker segfault on powerpc when CONFIG_LKDTM=y (was Re: [kernel-hardening] [PATCH 3/5] lkdtm: add function for testing .rodata section)

2016-08-02 Thread Michael Ellerman
Kees Cook writes: > On Mon, Aug 1, 2016 at 8:12 PM, Michael Ellerman wrote: >> Kees Cook writes: >>> On Mon, Aug 1, 2016 at 5:37 AM, Michael Ellerman >>> wrote: scripts/link-vmlinux.sh: line 52: 36260 Segmentation fault (core dumped) ${LD} ${LDFLAGS} ${LDFLAGS_vmlinux} -

RE: [PATCH v11 4/5] powerpc/fsl: move mpc85xx.h to include/linux/fsl

2016-08-02 Thread Yangbo Lu
Hi Uffe, > -Original Message- > From: Scott Wood [mailto:o...@buserror.net] > Sent: Wednesday, August 03, 2016 5:41 AM > To: Yangbo Lu; Michael Ellerman; Arnd Bergmann; Ulf Hansson > Cc: linux-...@vger.kernel.org; devicet...@vger.kernel.org; linuxppc- > d...@lists.ozlabs.org; linux-ker...

Re: powerpc allyesconfig / allmodconfig linux-next next-20160729 - next-20160729 build failures

2016-08-02 Thread Michael Ellerman
"Luis R. Rodriguez" writes: > Are linux-next builds being tested for powerpc with allyesconfig and > allmodconfig ? Yes, every single version: http://kisskb.ellerman.id.au/kisskb/target/2659/ > I have some changes I'm making and while debugging my > build issues I decided to give a clean bui

Re: powerpc allyesconfig / allmodconfig linux-next next-20160729 - next-20160729 build failures

2016-08-02 Thread Stephen Rothwell
Hi Luis, On Wed, 3 Aug 2016 00:02:43 +0200 "Luis R. Rodriguez" wrote: > > Thanks for the confirmation. For how long is it known this is broken? > Does anyone care and fix these ? Or is this best effort? This has been broken for many years :-( I have a couple of times almost fixed it, but it req

Re: powerpc allyesconfig / allmodconfig linux-next next-20160729 - next-20160729 build failures

2016-08-02 Thread Arnd Bergmann
On Wednesday, August 3, 2016 12:02:43 AM CEST Luis R. Rodriguez wrote: > On Tue, Aug 02, 2016 at 02:58:39PM -0700, Guenter Roeck wrote: > > On Tue, Aug 02, 2016 at 01:07:09PM -0700, Luis R. Rodriguez wrote: > > > Are linux-next builds being tested for powerpc with allyesconfig and > > > allmodconfi

Re: powerpc allyesconfig / allmodconfig linux-next next-20160729 - next-20160729 build failures

2016-08-02 Thread Luis R. Rodriguez
On Tue, Aug 02, 2016 at 02:58:39PM -0700, Guenter Roeck wrote: > On Tue, Aug 02, 2016 at 01:07:09PM -0700, Luis R. Rodriguez wrote: > > Are linux-next builds being tested for powerpc with allyesconfig and > > allmodconfig ? I have some changes I'm making and while debugging my > > build issues I de

Re: powerpc allyesconfig / allmodconfig linux-next next-20160729 - next-20160729 build failures

2016-08-02 Thread Guenter Roeck
On Tue, Aug 02, 2016 at 01:07:09PM -0700, Luis R. Rodriguez wrote: > Are linux-next builds being tested for powerpc with allyesconfig and > allmodconfig ? I have some changes I'm making and while debugging my > build issues I decided to give a clean build a shot and see linux-next > next-20160729 u

linker tables on powerpc - build issues

2016-08-02 Thread Luis R. Rodriguez
I've run into a few compilation issues with linker tables support [0] [1] on only a few architectures: blackfin - compiler issue it seems, I have a work around now in place arm - some alignment issue - still need to iron this out powerpc - issue with including on The issue with powerpc can be

Re: [v4] Fix to avoid IS_ERR_VALUE and IS_ERR abuses on 64bit systems.

2016-08-02 Thread arvind Yadav
On Tuesday 02 August 2016 01:15 PM, Arnd Bergmann wrote: On Monday, August 1, 2016 4:55:43 PM CEST Scott Wood wrote: On 08/01/2016 02:02 AM, Arnd Bergmann wrote: diff --git a/include/linux/err.h b/include/linux/err.h index 1e35588..c2a2789 100644 --- a/include/linux/err.h +++ b/include/linux/

[PATCH 1264/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value when calling a macro which is defined with a parameter for access permission. As we know, these numeric value for access permission have had the corresponding macro, and that using macro can improve the robustness and readability of

[PATCH 1263/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value when calling a macro which is defined with a parameter for access permission. As we know, these numeric value for access permission have had the corresponding macro, and that using macro can improve the robustness and readability of

[PATCH 1146/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value when calling a macro which is defined with a parameter for access permission. As we know, these numeric value for access permission have had the corresponding macro, and that using macro can improve the robustness and readability of

[PATCH 1145/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value when calling a macro which is defined with a parameter for access permission. As we know, these numeric value for access permission have had the corresponding macro, and that using macro can improve the robustness and readability of

[PATCH 0965/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value when calling a macro which is defined with a parameter for access permission. As we know, these numeric value for access permission have had the corresponding macro, and that using macro can improve the robustness and readability of

[PATCH 0683/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value when calling a macro which is defined with a parameter for access permission. As we know, these numeric value for access permission have had the corresponding macro, and that using macro can improve the robustness and readability of

[PATCH 0718/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value when calling a macro which is defined with a parameter for access permission. As we know, these numeric value for access permission have had the corresponding macro, and that using macro can improve the robustness and readability of

[PATCH 0867/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value when calling a macro which is defined with a parameter for access permission. As we know, these numeric value for access permission have had the corresponding macro, and that using macro can improve the robustness and readability of

[PATCH 0824/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value when calling a macro which is defined with a parameter for access permission. As we know, these numeric value for access permission have had the corresponding macro, and that using macro can improve the robustness and readability of

[PATCH 0313/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value when calling a macro which is defined with a parameter for access permission. As we know, these numeric value for access permission have had the corresponding macro, and that using macro can improve the robustness and readability of

[PATCH 0312/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value when calling a macro which is defined with a parameter for access permission. As we know, these numeric value for access permission have had the corresponding macro, and that using macro can improve the robustness and readability of

[PATCH 0311/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value when calling a macro which is defined with a parameter for access permission. As we know, these numeric value for access permission have had the corresponding macro, and that using macro can improve the robustness and readability of

[PATCH 0157/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value when calling a macro which is defined with a parameter for access permission. As we know, these numeric value for access permission have had the corresponding macro, and that using macro can improve the robustness and readability of

[PATCH 0018/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value when calling a macro which is defined with a parameter for access permission. As we know, these numeric value for access permission have had the corresponding macro, and that using macro can improve the robustness and readability of

[PATCH 0019/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value when calling a macro which is defined with a parameter for access permission. As we know, these numeric value for access permission have had the corresponding macro, and that using macro can improve the robustness and readability of

[PATCH 0017/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value when calling a macro which is defined with a parameter for access permission. As we know, these numeric value for access permission have had the corresponding macro, and that using macro can improve the robustness and readability of

[PATCH 0016/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value when calling a macro which is defined with a parameter for access permission. As we know, these numeric value for access permission have had the corresponding macro, and that using macro can improve the robustness and readability of

[PATCH 0015/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Baole Ni
I find that the developers often just specified the numeric value when calling a macro which is defined with a parameter for access permission. As we know, these numeric value for access permission have had the corresponding macro, and that using macro can improve the robustness and readability of

Re: [PATCH v11 4/5] powerpc/fsl: move mpc85xx.h to include/linux/fsl

2016-08-02 Thread Scott Wood
On Tue, 2016-08-02 at 05:57 +, Yangbo Lu wrote: > Hi Scott, > > > > > -Original Message- > > From: Scott Wood [mailto:o...@buserror.net] > > Sent: Wednesday, July 27, 2016 8:38 AM > > To: Yangbo Lu; Michael Ellerman; Arnd Bergmann; Ulf Hansson > > Cc: linux-...@vger.kernel.org; device

Re: [v4] Fix to avoid IS_ERR_VALUE and IS_ERR abuses on 64bit systems.

2016-08-02 Thread Scott Wood
On 08/02/2016 10:34 AM, arvind Yadav wrote: > > > On Tuesday 02 August 2016 01:15 PM, Arnd Bergmann wrote: >> On Monday, August 1, 2016 4:55:43 PM CEST Scott Wood wrote: >>> On 08/01/2016 02:02 AM, Arnd Bergmann wrote: > diff --git a/include/linux/err.h b/include/linux/err.h > index 1e355

Re: [PATCH v4 2/2] powerpc/pseries: Implement indexed-count hotplug memory remove

2016-08-02 Thread Nathan Fontenot
On 08/01/2016 12:23 PM, Sahil Mehta wrote: > Indexed-count remove for memory hotplug guarantees that a contiguous block > of lmbs beginning at a specified will be unassigned (NOT > that lmbs will be removed). Because of Qemu's per-DIMM memory > management, the removal of a contiguous block of me

Re: [PATCH v4 1/2] powerpc/pseries: Implement indexed-count hotplug memory add

2016-08-02 Thread Nathan Fontenot
On 08/01/2016 12:21 PM, Sahil Mehta wrote: > Indexed-count add for memory hotplug guarantees that a contiguous block > of lmbs beginning at a specified will be assigned (NOT > that lmbs will be added). Because of Qemu's per-DIMM memory > management, the addition of a contiguous block of memory c

powerpc allyesconfig / allmodconfig linux-next next-20160729 - next-20160729 build failures

2016-08-02 Thread Luis R. Rodriguez
Are linux-next builds being tested for powerpc with allyesconfig and allmodconfig ? I have some changes I'm making and while debugging my build issues I decided to give a clean build a shot and see linux-next next-20160729 up to next-20160729 all have build failures without my changes. I get: /opt

Re: [PATCH] powerpc: Do not make the entire heap executable

2016-08-02 Thread Jason Gunthorpe
On Mon, Aug 01, 2016 at 11:07:21PM +0200, Denys Vlasenko wrote: > On 32-bit powerps the ELF PLT sections of binaries (built with --bss-plt, > or with a toolchain which defaults to it) look like this: Hi Denys, Thanks for resurrecting this, I am still interested here, we have been using this patch

Re: [PATCH 0157/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Segher Boessenkool
On Tue, Aug 02, 2016 at 11:54:47AM -0700, Olof Johansson wrote: > On Tue, Aug 02, 2016 at 06:45:15PM +0800, Baole Ni wrote: > > I find that the developers often just specified the numeric value > > when calling a macro which is defined with a parameter for access > > permission. > > As we know, th

Re: [kernel-hardening] Re: Linker segfault on powerpc when CONFIG_LKDTM=y (was Re: [kernel-hardening] [PATCH 3/5] lkdtm: add function for testing .rodata section)

2016-08-02 Thread Kees Cook
On Mon, Aug 1, 2016 at 8:12 PM, Michael Ellerman wrote: > Kees Cook writes: > >> On Mon, Aug 1, 2016 at 5:37 AM, Michael Ellerman wrote: >>> Kees Cook writes: >>> This adds a function that lives in the .rodata section. The section flags are corrected using objcopy since there is no wa

Re: [PATCH 0157/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Olof Johansson
On Tue, Aug 02, 2016 at 06:45:15PM +0800, Baole Ni wrote: > I find that the developers often just specified the numeric value > when calling a macro which is defined with a parameter for access permission. > As we know, these numeric value for access permission have had the > corresponding macro,

Re: [PATCH v2] powerpc/32: fix csum_partial_copy_generic()

2016-08-02 Thread Segher Boessenkool
On Tue, Aug 02, 2016 at 10:07:05AM +0200, Christophe Leroy wrote: > commit 7aef4136566b0 ("powerpc32: rewrite csum_partial_copy_generic() > based on copy_tofrom_user()") introduced a bug when destination > address is odd and initial csum is not null > > In that (rare) case the initial csum value h

Re: [PATCH 1/2] mm: Allow disabling deferred struct page initialisation

2016-08-02 Thread Dave Hansen
On 08/02/2016 06:19 AM, Srikar Dronamraju wrote: > Kernels compiled with CONFIG_DEFERRED_STRUCT_PAGE_INIT will initialise > only certain size memory per node. The certain size takes into account > the dentry and inode cache sizes. However such a kernel when booting a > secondary kernel will not be

Re: [PATCH 0867/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Geoff Levand
On Tue, 2016-08-02 at 19:53 +0800, Baole Ni wrote: > I find that the developers often just specified the numeric value > when calling a macro which is defined with a parameter for access > permission. > As we know, these numeric value for access permission have had the > corresponding macro, > and

Re: [v4] Fix to avoid IS_ERR_VALUE and IS_ERR abuses on 64bit systems.

2016-08-02 Thread arvind Yadav
On Tuesday 02 August 2016 01:15 PM, Arnd Bergmann wrote: On Monday, August 1, 2016 4:55:43 PM CEST Scott Wood wrote: On 08/01/2016 02:02 AM, Arnd Bergmann wrote: diff --git a/include/linux/err.h b/include/linux/err.h index 1e35588..c2a2789 100644 --- a/include/linux/err.h +++ b/include/linux/

[PATCH v3 1/5] powerpc/dts: add mcke-gpios for PM feature

2016-08-02 Thread Chenhui Zhao
Signed-off-by: Chenhui Zhao --- Documentation/devicetree/bindings/soc/fsl/rcpm.txt | 13 + arch/powerpc/boot/dts/fsl/t1040si-post.dtsi| 3 +++ 2 files changed, 16 insertions(+) diff --git a/Documentation/devicetree/bindings/soc/fsl/rcpm.txt b/Documentation/devicetree/bindin

[PATCH v3 5/5] powerpc/pm: save and restore registers during deep sleep

2016-08-02 Thread Chenhui Zhao
Some CCSR registers will lost during deep sleep. Therefore, should save them before entering deep sleep, and restore them when resuming from deep sleep. Signed-off-by: Tang Yuantian Signed-off-by: Chenhui Zhao --- arch/powerpc/include/asm/fsl_pm.h | 2 + arch/powerpc/platforms/85xx/deep

[PATCH 2/2] fadump: Disable deferred page struct initialisation

2016-08-02 Thread Srikar Dronamraju
Fadump kernel reserves significant number of memory blocks. On a multi-node machine, with CONFIG_DEFFERRED_STRUCT_PAGE support, fadump kernel fails to boot. Fix this by disabling deferred page struct initialisation. Signed-off-by: Srikar Dronamraju --- arch/powerpc/kernel/fadump.c | 1 + 1 file

[PATCH 1/2] mm: Allow disabling deferred struct page initialisation

2016-08-02 Thread Srikar Dronamraju
Kernels compiled with CONFIG_DEFERRED_STRUCT_PAGE_INIT will initialise only certain size memory per node. The certain size takes into account the dentry and inode cache sizes. However such a kernel when booting a secondary kernel will not be able to allocate the required amount of memory to suffice

[PATCH 0/0] Disable deferred struct page initialisation on Fadump

2016-08-02 Thread Srikar Dronamraju
Fadump kernel reserves large chunks of memory even before the pages are initialised. This could mean memory that corresponds to several nodes might fall in memblock reserved regions. Kernels compiled with CONFIG_DEFERRED_STRUCT_PAGE_INIT will initialise only certain size memory per node. The certa

Re: [PATCH v2] powerpc/32: fix csum_partial_copy_generic()

2016-08-02 Thread Segher Boessenkool
On Tue, Aug 02, 2016 at 10:07:05AM +0200, Christophe Leroy wrote: > commit 7aef4136566b0 ("powerpc32: rewrite csum_partial_copy_generic() > based on copy_tofrom_user()") introduced a bug when destination > address is odd and initial csum is not null > > In that (rare) case the initial csum value h

[PATCH v3 3/5] powerpc: pm: add EPU FSM configuration for deep sleep

2016-08-02 Thread Chenhui Zhao
In the last stage of deep sleep, software will trigger a Finite State Machine (FSM) to control the hardware precedure, such as board isolation, killing PLLs, removing power, and so on. When the system is waked up by an interrupt, the FSM controls the hardware to complete the early resume precedure

[PATCH v3 1/5] powerpc/dts: add mcke-gpios for PM feature

2016-08-02 Thread Chenhui Zhao
Signed-off-by: Chenhui Zhao --- Documentation/devicetree/bindings/soc/fsl/rcpm.txt | 13 + arch/powerpc/boot/dts/fsl/t1040si-post.dtsi| 3 +++ 2 files changed, 16 insertions(+) diff --git a/Documentation/devicetree/bindings/soc/fsl/rcpm.txt b/Documentation/devicetree/bindin

[PATCH v3 4/5] powerpc/pm: support deep sleep feature on T104x

2016-08-02 Thread Chenhui Zhao
T104x has deep sleep feature, which can switch off most parts of the SoC when it is in deep sleep mode. This way, it becomes more energy-efficient. The DDR controller will also be powered off in deep sleep. Therefore, the last stage (the latter part of fsl_dp_enter_low) will run without DDR access

[PATCH v3 2/5] powerpc/85xx: support sleep feature on QorIQ SoCs with RCPM

2016-08-02 Thread Chenhui Zhao
In sleep mode, the clocks of e500 cores and unused IP blocks is turned off. The IP blocks which are allowed to wake up the processor are still running. The sleep mode is equal to the Standby state in Linux. Use the command to enter sleep mode: echo standby > /sys/power/state Signed-off-by: Chen

[PATCH v3 0/5] powerpc/pm: QorIQ deep sleep

2016-08-02 Thread Chenhui Zhao
Changes for v3: * add mcke-gpios in dts to specify the GPIO pin which works as MCKE signal Changes for v2: * Ioremap every dts node used in the patches. * Check the board compatible string to see if the board supports deep sleep. * Can not reserve the first page of DDR memory, because PPC64 doesn'

[PATCH v2] powerpc/32: fix csum_partial_copy_generic()

2016-08-02 Thread Christophe Leroy
commit 7aef4136566b0 ("powerpc32: rewrite csum_partial_copy_generic() based on copy_tofrom_user()") introduced a bug when destination address is odd and initial csum is not null In that (rare) case the initial csum value has to be rotated one byte as well as the resulting value is This patch also

[RFC] [PATCH 3/3] powernv/oppanel: Update op_panel module to utilise opal_oppanel interface

2016-08-02 Thread Suraj Jitindar Singh
The powernv_op_panel kernel module is used to expose the operator panel display present on IBM PowerNV machines with FSPs through the char device /dev/op_panel. The new interface opal_oppanel which has been added to allow access to the operator panel display from within the kernel duplicates a lot

[RFC] [PATCH 2/3] powernv/setup: Initialise opal_oppanel and display information on boot

2016-08-02 Thread Suraj Jitindar Singh
Now that we have the ability to access the operator panel display from within the kernel print out some platform information on boot. Update the opal initialisation function to call the init function for the new oppanel interface, this also removes the need to explicitly create the platform device

[RFC] [PATCH 1/3] powernv/opal: Introduce new opal_oppanel interface to expose the op_panel

2016-08-02 Thread Suraj Jitindar Singh
IBM PowerNV machines with FSPs have an operator panel with a LCD display. Currently this oppanel display can be accessed through the powernv_op_panel kernel module. We would like to be able to access this display easily from other places in the Kernel. Add a new interface through which the operato

Re: [v4] Fix to avoid IS_ERR_VALUE and IS_ERR abuses on 64bit systems.

2016-08-02 Thread Arnd Bergmann
On Monday, August 1, 2016 4:55:43 PM CEST Scott Wood wrote: > On 08/01/2016 02:02 AM, Arnd Bergmann wrote: > >> diff --git a/include/linux/err.h b/include/linux/err.h > >> index 1e35588..c2a2789 100644 > >> --- a/include/linux/err.h > >> +++ b/include/linux/err.h > >> @@ -18,7 +18,17 @@ > >> > >