Re: [PATCH v6] numa: make node_to_cpumask_map() NUMA_NO_NODE aware

2019-10-10 Thread Michal Hocko
On Thu 10-10-19 14:07:21, Yunsheng Lin wrote: > On 2019/10/9 20:25, Robin Murphy wrote: > > On 2019-10-08 9:38 am, Yunsheng Lin wrote: > >> On 2019/9/25 18:41, Peter Zijlstra wrote: > >>> On Wed, Sep 25, 2019 at 05:14:20PM +0800, Yunsheng Lin wrote: > From the discussion above, It seems makin

Re: [PATCH v6] numa: make node_to_cpumask_map() NUMA_NO_NODE aware

2019-10-10 Thread Peter Zijlstra
On Wed, Oct 09, 2019 at 01:25:14PM +0100, Robin Murphy wrote: > On 2019-10-08 9:38 am, Yunsheng Lin wrote: > > On 2019/9/25 18:41, Peter Zijlstra wrote: > > > On Wed, Sep 25, 2019 at 05:14:20PM +0800, Yunsheng Lin wrote: > > > > From the discussion above, It seems making the node_to_cpumask_map()

Re: [PATCH v4 0/5] Powerpc/Watchpoint: Few important fixes

2019-10-10 Thread Christophe Leroy
Le 10/10/2019 à 06:44, Ravi Bangoria a écrit : @Christophe, Is patch5 works for you on 8xx? Getting the following : root@vgoip:~# ./ptrace-hwbreak test: ptrace-hwbreak tags: git_version:v5.4-rc2-710-gf0082e173fe4-dirty PTRACE_SET_DEBUGREG, WO, len: 1: Ok PTRACE_SET_DEBUGREG, WO, len: 2:

Re: [PATCH 07/29] x86: Restore "text" Program Header with dummy section

2019-10-10 Thread Borislav Petkov
On Thu, Sep 26, 2019 at 10:55:40AM -0700, Kees Cook wrote: > Instead of depending on markings in the section following NOTES to > restore the associated Program Header, use a dummy section, as done > in other architectures. This is very laconic and after some staring at ld.info, I think you mean t

Re: [PATCH 08/29] vmlinux.lds.h: Provide EMIT_PT_NOTE to indicate export of .notes

2019-10-10 Thread Borislav Petkov
On Thu, Sep 26, 2019 at 10:55:41AM -0700, Kees Cook wrote: > In preparation for moving NOTES into RO_DATA, this provides a mechanism s/this provides/provide/ - imperative tone. Check all your commit messages pls. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette

[PATCH v1 0/3] Integrate support for Self save, determine support and preference for self save or restore

2019-10-10 Thread Pratik Rajesh Sampat
Currently the stop-api supports a mechanism called as self-restore which allows us to restore the values of certain SPRs on wakeup from a deep-stop state to a desired value. To use this, the Kernel makes an OPAL call passing the PIR of the CPU, the SPR number and the value to which the SPR should b

[PATCH v1 1/3] powerpc/powernv: Interface to define support and preference for a SPR

2019-10-10 Thread Pratik Rajesh Sampat
Define a bitmask interface to determine support for the Self Restore, Self Save or both. Also define an interface to determine the preference of that SPR to be strictly saved or restored or encapsulated with an order of preference. The preference bitmask is shown as below: ---

[PATCH v1 2/3] powerpc/powernv: Introduce Self save support

2019-10-10 Thread Pratik Rajesh Sampat
This commit introduces and leverages the Self save API which OPAL now supports. Add the new Self Save OPAL API call in the list of OPAL calls. Implement the self saving of the SPRs based on the support populated while respecting it's preferences. This implementation allows mixing of support for t

[PATCH v1 3/3] powerpc/powernv: Parse device tree, population of SPR support

2019-10-10 Thread Pratik Rajesh Sampat
Parse the device tree for nodes self-save, self-restore and populate support for the preferred SPRs based what was advertised by the device tree. Signed-off-by: Pratik Rajesh Sampat --- arch/powerpc/platforms/powernv/idle.c | 104 ++ 1 file changed, 104 insertions(+) dif

Re: [PATCH v3 4/4] powerpc: Enable STRICT_MODULE_RWX

2019-10-10 Thread Daniel Axtens
Hi Russell, Tested-by: Daniel Axtens # e6500 Because ptdump isn't quite working on book3e 64bit atm, I hacked it up to print the raw PTE and the extracted flags. After loading a module, I see the supervisor write bit set without module RWX, and it cleared with module RWX. Modules still seem to w

Re: [PATCH 14/29] vmlinux.lds.h: Allow EXCEPTION_TABLE to live in RO_DATA

2019-10-10 Thread Borislav Petkov
On Thu, Sep 26, 2019 at 10:55:47AM -0700, Kees Cook wrote: > Many architectures have an EXCEPTION_TABLE that needs only to be > read-only. As such, it should live in RO_DATA. This creates a macro to > identify this case for the architectures that can move EXCEPTION_TABLE > into RO_DATA. > > Signed

Re: [PATCH 07/29] x86: Restore "text" Program Header with dummy section

2019-10-10 Thread Kees Cook
On Thu, Oct 10, 2019 at 12:33:05PM +0200, Borislav Petkov wrote: > On Thu, Sep 26, 2019 at 10:55:40AM -0700, Kees Cook wrote: > > Instead of depending on markings in the section following NOTES to > > restore the associated Program Header, use a dummy section, as done > > in other architectures. >

Re: [PATCH 14/29] vmlinux.lds.h: Allow EXCEPTION_TABLE to live in RO_DATA

2019-10-10 Thread Kees Cook
On Thu, Oct 10, 2019 at 05:25:16PM +0200, Borislav Petkov wrote: > On Thu, Sep 26, 2019 at 10:55:47AM -0700, Kees Cook wrote: > > Many architectures have an EXCEPTION_TABLE that needs only to be > > read-only. As such, it should live in RO_DATA. This creates a macro to > > identify this case for th

Re: [PATCH v14 2/6] namei: LOOKUP_IN_ROOT: chroot-like path resolution

2019-10-10 Thread Linus Torvalds
On Wed, Oct 9, 2019 at 10:42 PM Aleksa Sarai wrote: > > --- a/fs/namei.c > +++ b/fs/namei.c > @@ -2277,6 +2277,11 @@ static const char *path_init(struct nameidata *nd, > unsigned flags) > > nd->m_seq = read_seqbegin(&mount_lock); > > + /* LOOKUP_IN_ROOT treats absolute paths as bein

Re: [PATCH 28/29] x86/mm: Report actual image regions in /proc/iomem

2019-10-10 Thread Borislav Petkov
On Thu, Sep 26, 2019 at 10:56:01AM -0700, Kees Cook wrote: > The resource reservations in made for the kernel image did not reflect ^ /proc/iomem > the gaps between text, rodata, and data. This adds the rodata resource s/This adds/Add/

Re: [PATCH 00/29] vmlinux.lds.h: Refactor EXCEPTION_TABLE and NOTES

2019-10-10 Thread Borislav Petkov
On Thu, Sep 26, 2019 at 10:55:33AM -0700, Kees Cook wrote: > This series works to move the linker sections for NOTES and > EXCEPTION_TABLE into the RO_DATA area, where they belong on most > (all?) architectures. The problem being addressed was the discovery > by Rick Edgecombe that the exception ta

Re: [RFC PATCH 1/9] powerpc/pseries: add cpu DLPAR support for drc-info property

2019-10-10 Thread Nathan Lynch
Hi Tyrel, Tyrel Datwyler writes: > +static bool valid_cpu_drc_index(struct device_node *parent, u32 drc_index) > +{ > + const __be32 *indexes; > + int i; > + > + if (of_find_property(parent, "ibm,drc-info", NULL)) > + return drc_info_valid_index(parent, drc_index); > + > +

Re: [RFC PATCH 2/9] powerpc/pseries: fix bad drc_index_start value parsing of drc-info entry

2019-10-10 Thread Nathan Lynch
Tyrel Datwyler writes: > The ibm,drc-info property is an array property that contains drc-info > entries such that each entry is made up of 2 string encoded elements > followed by 5 int encoded elements. The of_read_drc_info_cell() > helper contains comments that correctly name the expected elemen

Re: [PATCH 0/2] ocxl: Move SPA and TL definitions

2019-10-10 Thread Andrew Donnellan
On 10/10/19 2:11 am, christophe lombard wrote: This series moves the definition and the management of scheduled process area (SPA) and of the templates (Transaction Layer) for an ocxl card, using the OCAPI interface. The code is now located in the specific arch powerpc platform. These patches wil

powerpc/405GP, cuImage and PCI support

2019-10-10 Thread Carlo Pisani
hi I wrote here (1) a couple of years ago, I am still working with kernel 4.11.0 and there is broken support for initializing the PCI. arch/powerpc/book/cuimage-walnut.c requires "/plb" compatible with "fsl,pq2-localbus", while the device-tree file (walnut.dts) defines "/plb" compatible with "ibm,

Re: [PATCH 00/29] vmlinux.lds.h: Refactor EXCEPTION_TABLE and NOTES

2019-10-10 Thread Kees Cook
On Thu, Oct 10, 2019 at 08:03:31PM +0200, Borislav Petkov wrote: > On Thu, Sep 26, 2019 at 10:55:33AM -0700, Kees Cook wrote: > > This series works to move the linker sections for NOTES and > > EXCEPTION_TABLE into the RO_DATA area, where they belong on most > > (all?) architectures. The problem be

[PATCH v2 02/29] powerpc: Remove PT_NOTE workaround

2019-10-10 Thread Kees Cook
In preparation for moving NOTES into RO_DATA, remove the PT_NOTE workaround since the kernel requires at least gcc 4.6 now. Signed-off-by: Kees Cook --- arch/powerpc/kernel/vmlinux.lds.S | 24 ++-- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/arch/powerpc/ke

[PATCH v2 00/29] vmlinux.lds.h: Refactor EXCEPTION_TABLE and NOTES

2019-10-10 Thread Kees Cook
Arch maintainers: please send Acks (if you haven't already) for your respective linker script changes; the intention is for this series to land via -tip. v1: https://lore.kernel.org/lkml/20190926175602.33098-1-keesc...@chromium.org v2: clean up commit messages, rename RO_EXCEPTION_TABLE (bp) Thi

[PATCH v2 03/29] powerpc: Rename PT_LOAD identifier "kernel" to "text"

2019-10-10 Thread Kees Cook
In preparation for moving NOTES into RO_DATA, rename the linker script internal identifier for the PT_LOAD Program Header from "kernel" to "text" to match other architectures. Signed-off-by: Kees Cook --- arch/powerpc/kernel/vmlinux.lds.S | 12 ++-- 1 file changed, 6 insertions(+), 6 del

[PATCH v2 04/29] alpha: Rename PT_LOAD identifier "kernel" to "text"

2019-10-10 Thread Kees Cook
In preparation for moving NOTES into RO_DATA, rename the linker script internal identifier for the PT_LOAD Program Header from "kernel" to "text" to match other architectures. Signed-off-by: Kees Cook --- arch/alpha/kernel/vmlinux.lds.S | 8 1 file changed, 4 insertions(+), 4 deletions(

[PATCH v2 01/29] powerpc: Rename "notes" PT_NOTE to "note"

2019-10-10 Thread Kees Cook
The Program Header identifiers are internal to the linker scripts. In preparation for moving the NOTES segment declaration into RO_DATA, standardize the identifier for the PT_NOTE entry to "note" as used by all other architectures that emit PT_NOTE. Signed-off-by: Kees Cook --- arch/powerpc/kern

[PATCH v2 05/29] ia64: Rename PT_LOAD identifier "code" to "text"

2019-10-10 Thread Kees Cook
In preparation for moving NOTES into RO_DATA, rename the linker script internal identifier for the PT_LOAD Program Header from "code" to "text" to match other architectures. Signed-off-by: Kees Cook --- arch/ia64/kernel/vmlinux.lds.S | 14 +++--- 1 file changed, 7 insertions(+), 7 deleti

[PATCH v2 06/29] s390: Move RO_DATA into "text" PT_LOAD Program Header

2019-10-10 Thread Kees Cook
In preparation for moving NOTES into RO_DATA, move RO_DATA back into the "text" PT_LOAD Program Header, as done with other architectures. The "data" PT_LOAD now starts with the writable data section. Signed-off-by: Kees Cook --- arch/s390/kernel/vmlinux.lds.S | 4 ++-- 1 file changed, 2 insertio

[PATCH v2 07/29] x86: Restore "text" Program Header with dummy section

2019-10-10 Thread Kees Cook
In a linker script, if once places a section in one or more segments using ":PHDR", then the linker will place all subsequent allocatable sections, which do not specify ":PHDR", into the same segments. In order to have the NOTES section in both PT_LOAD (":text") and PT_NOTE (":note"), both segments

[PATCH v2 08/29] vmlinux.lds.h: Provide EMIT_PT_NOTE to indicate export of .notes

2019-10-10 Thread Kees Cook
In preparation for moving NOTES into RO_DATA, provide a mechanism for architectures that want to emit a PT_NOTE Program Header to do so. Signed-off-by: Kees Cook --- arch/alpha/kernel/vmlinux.lds.S | 3 +++ arch/ia64/kernel/vmlinux.lds.S| 2 ++ arch/mips/kernel/vmlinux.lds.S| 12

[PATCH v2 11/29] vmlinux.lds.h: Replace RODATA with RO_DATA

2019-10-10 Thread Kees Cook
There's no reason to keep the RODATA macro: replace the callers with the expected RO_DATA macro. Signed-off-by: Kees Cook --- arch/alpha/kernel/vmlinux.lds.S | 2 +- arch/ia64/kernel/vmlinux.lds.S | 2 +- arch/microblaze/kernel/vmlinux.lds.S | 2 +- arch/mips/kernel/vmlinux.lds.S

[PATCH v2 09/29] vmlinux.lds.h: Move Program Header restoration into NOTES macro

2019-10-10 Thread Kees Cook
In preparation for moving NOTES into RO_DATA, make the Program Header assignment restoration be part of the NOTES macro itself. Signed-off-by: Kees Cook --- arch/alpha/kernel/vmlinux.lds.S | 5 + arch/ia64/kernel/vmlinux.lds.S| 4 +--- arch/mips/kernel/vmlinux.lds.S| 3 +-- arch

[PATCH v2 12/29] vmlinux.lds.h: Replace RO_DATA_SECTION with RO_DATA

2019-10-10 Thread Kees Cook
Finish renaming RO_DATA_SECTION to RO_DATA. (Calling this a "section" is a lie, since it's multiple sections and section flags cannot be applied to the macro.) Signed-off-by: Kees Cook --- arch/arc/kernel/vmlinux.lds.S | 2 +- arch/c6x/kernel/vmlinux.lds.S | 2 +- arch/csky/kernel/vm

[PATCH v2 10/29] vmlinux.lds.h: Move NOTES into RO_DATA

2019-10-10 Thread Kees Cook
The .notes section should be non-executable read-only data. As such, move it to the RO_DATA macro instead of being per-architecture defined. Signed-off-by: Kees Cook --- arch/alpha/kernel/vmlinux.lds.S | 2 -- arch/arc/kernel/vmlinux.lds.S| 2 -- arch/arm/kernel/vmlinux-xip.lds.S

[PATCH v2 13/29] vmlinux.lds.h: Replace RW_DATA_SECTION with RW_DATA

2019-10-10 Thread Kees Cook
Rename RW_DATA_SECTION to RW_DATA. (Calling this a "section" is a lie, since it's multiple sections and section flags cannot be applied to the macro.) Signed-off-by: Kees Cook --- arch/alpha/kernel/vmlinux.lds.S | 2 +- arch/arc/kernel/vmlinux.lds.S| 2 +- arch/arm/kernel/vmlinux-xi

[PATCH v2 16/29] x86: Move EXCEPTION_TABLE to RO_DATA segment

2019-10-10 Thread Kees Cook
The exception table was needlessly marked executable. In preparation for execute-only memory, move the table into the RO_DATA segment via the new macro that can be used by any architectures that want to make a similar consolidation. Signed-off-by: Kees Cook --- arch/x86/kernel/vmlinux.lds.S | 3

[PATCH v2 15/29] x86: Actually use _etext for end of text segment

2019-10-10 Thread Kees Cook
Various calculations are using the end of the exception table (which does not need to be executable) as the end of the text segment. Instead, in preparation for moving the exception table into RO_DATA, move _etext after the exception table and update the calculations. Signed-off-by: Kees Cook ---

[PATCH v2 20/29] h8300: Move EXCEPTION_TABLE to RO_DATA segment

2019-10-10 Thread Kees Cook
Since the EXCEPTION_TABLE is read-only, collapse it into RO_DATA. Signed-off-by: Kees Cook --- arch/h8300/kernel/vmlinux.lds.S | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/h8300/kernel/vmlinux.lds.S b/arch/h8300/kernel/vmlinux.lds.S index 2ac7bdcd2fe0..6b1afc2f9b68

[PATCH v2 28/29] x86/mm: Report actual image regions in /proc/iomem

2019-10-10 Thread Kees Cook
The resource reservations in /proc/iomem made for the kernel image did not reflect the gaps between text, rodata, and data. Add the "rodata" resource and update the start/end calculations to match the respective calls to free_kernel_image_pages(). Before (booted with "nokaslr" for easier compariso

[PATCH v2 17/29] alpha: Move EXCEPTION_TABLE to RO_DATA segment

2019-10-10 Thread Kees Cook
Since the EXCEPTION_TABLE is read-only, collapse it into RO_DATA. Signed-off-by: Kees Cook --- arch/alpha/kernel/vmlinux.lds.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/alpha/kernel/vmlinux.lds.S b/arch/alpha/kernel/vmlinux.lds.S index edc45f45523b..bc6f727278fd 10

[PATCH v2 25/29] xtensa: Move EXCEPTION_TABLE to RO_DATA segment

2019-10-10 Thread Kees Cook
Since the EXCEPTION_TABLE is read-only, collapse it into RO_DATA. Signed-off-by: Kees Cook --- arch/xtensa/kernel/vmlinux.lds.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/xtensa/kernel/vmlinux.lds.S b/arch/xtensa/kernel/vmlinux.lds.S index bdbd7c4056c1..0043d5858f

[PATCH v2 23/29] parisc: Move EXCEPTION_TABLE to RO_DATA segment

2019-10-10 Thread Kees Cook
Since the EXCEPTION_TABLE is read-only, collapse it into RO_DATA. Signed-off-by: Kees Cook --- arch/parisc/kernel/vmlinux.lds.S | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S index 12b3d7d5e9e4..53e29d88f

[PATCH v2 14/29] vmlinux.lds.h: Allow EXCEPTION_TABLE to live in RO_DATA

2019-10-10 Thread Kees Cook
Many architectures have an EXCEPTION_TABLE that only needs to be readable. As such, it should live in RO_DATA. Create a macro to identify this case for the architectures that can move EXCEPTION_TABLE into RO_DATA. Signed-off-by: Kees Cook Acked-by: Will Deacon --- include/asm-generic/vmlinux.ld

[PATCH v2 22/29] microblaze: Move EXCEPTION_TABLE to RO_DATA segment

2019-10-10 Thread Kees Cook
Since the EXCEPTION_TABLE is read-only, collapse it into RO_DATA. Signed-off-by: Kees Cook --- arch/microblaze/kernel/vmlinux.lds.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/microblaze/kernel/vmlinux.lds.S b/arch/microblaze/kernel/vmlinux.lds.S index b8efb08204a

[PATCH v2 21/29] ia64: Move EXCEPTION_TABLE to RO_DATA segment

2019-10-10 Thread Kees Cook
Since the EXCEPTION_TABLE is read-only, collapse it into RO_DATA. Signed-off-by: Kees Cook --- arch/ia64/kernel/vmlinux.lds.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/ia64/kernel/vmlinux.lds.S b/arch/ia64/kernel/vmlinux.lds.S index 11d5115bc44d..1ec6b703c5b4 10064

[PATCH v2 19/29] c6x: Move EXCEPTION_TABLE to RO_DATA segment

2019-10-10 Thread Kees Cook
Since the EXCEPTION_TABLE is read-only, collapse it into RO_DATA. Signed-off-by: Kees Cook --- arch/c6x/kernel/vmlinux.lds.S | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/c6x/kernel/vmlinux.lds.S b/arch/c6x/kernel/vmlinux.lds.S index a3547f9d415b..ac99ba0864bf 100

[PATCH v2 18/29] arm64: Move EXCEPTION_TABLE to RO_DATA segment

2019-10-10 Thread Kees Cook
Since the EXCEPTION_TABLE is read-only, collapse it into RO_DATA. Also removes the redundant ALIGN, which is already present at the end of the RO_DATA macro. Signed-off-by: Kees Cook Acked-by: Will Deacon --- arch/arm64/kernel/vmlinux.lds.S | 7 --- 1 file changed, 4 insertions(+), 3 deleti

[PATCH v2 29/29] x86: Use INT3 instead of NOP for linker fill bytes

2019-10-10 Thread Kees Cook
Instead of using 0x90 (NOP) to fill bytes between functions, which makes it easier to sloppily target functions in function pointer overwrite attacks, fill with 0xCC (INT3) to force a trap. Also drop the space between "=" and the value to better match the binutils documentation https://sourceware.o

[PATCH v2 27/29] x86/mm: Report which part of kernel image is freed

2019-10-10 Thread Kees Cook
The memory freeing report wasn't very useful for figuring out which parts of the kernel image were being freed. Add the details for clearer reporting in dmesg. Before: [2.150450] Freeing unused kernel image memory: 1348K [2.154574] Write protecting the kernel read-only data: 20480k [2

[PATCH v2 24/29] powerpc: Move EXCEPTION_TABLE to RO_DATA segment

2019-10-10 Thread Kees Cook
Since the EXCEPTION_TABLE is read-only, collapse it into RO_DATA. Signed-off-by: Kees Cook --- arch/powerpc/kernel/vmlinux.lds.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S index 4e7cec088c8b..88342200

[PATCH v2 26/29] x86/mm: Remove redundant &s on addresses

2019-10-10 Thread Kees Cook
The &s on addresses are redundant. Remove them to match all the other similar functions. Signed-off-by: Kees Cook --- arch/x86/mm/init_64.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 26299e9ce6da..e67ddca8b7a8 100

Re: [PATCH 00/29] vmlinux.lds.h: Refactor EXCEPTION_TABLE and NOTES

2019-10-10 Thread hpa
On October 10, 2019 4:57:36 PM PDT, Kees Cook wrote: >On Thu, Oct 10, 2019 at 08:03:31PM +0200, Borislav Petkov wrote: >> On Thu, Sep 26, 2019 at 10:55:33AM -0700, Kees Cook wrote: >> > This series works to move the linker sections for NOTES and >> > EXCEPTION_TABLE into the RO_DATA area, where th

Re: [PATCH v6] numa: make node_to_cpumask_map() NUMA_NO_NODE aware

2019-10-10 Thread Yunsheng Lin
On 2019/10/10 15:32, Michal Hocko wrote: > On Thu 10-10-19 14:07:21, Yunsheng Lin wrote: >> On 2019/10/9 20:25, Robin Murphy wrote: >>> On 2019-10-08 9:38 am, Yunsheng Lin wrote: On 2019/9/25 18:41, Peter Zijlstra wrote: > On Wed, Sep 25, 2019 at 05:14:20PM +0800, Yunsheng Lin wrote: >

Re: [PATCH v8 1/5] kasan: support backing vmalloc space with real shadow memory

2019-10-10 Thread Daniel Axtens
Hi Uladzislau, > Looking at it one more, i think above part of code is a bit wrong > and should be separated from merge_or_add_vmap_area() logic. The > reason is to keep it simple and do only what it is supposed to do: > merging or adding. > > Also the kasan_release_vmalloc() gets called twice th

[PATCH] net/ibmvnic: Fix EOI when running in XIVE mode.

2019-10-10 Thread Cédric Le Goater
pSeries machines on POWER9 processors can run with the XICS (legacy) interrupt mode or with the XIVE exploitation interrupt mode. These interrupt contollers have different interfaces for interrupt management : XICS uses hcalls and XIVE loads and stores on a page. H_EOI being a XICS interface the en

Re: [PATCH v2 01/29] powerpc: Rename "notes" PT_NOTE to "note"

2019-10-10 Thread Michael Ellerman
Kees Cook writes: > The Program Header identifiers are internal to the linker scripts. In > preparation for moving the NOTES segment declaration into RO_DATA, > standardize the identifier for the PT_NOTE entry to "note" as used by > all other architectures that emit PT_NOTE. > > Signed-off-by: Kee

Re: [PATCH v2 02/29] powerpc: Remove PT_NOTE workaround

2019-10-10 Thread Michael Ellerman
Kees Cook writes: > In preparation for moving NOTES into RO_DATA, remove the PT_NOTE > workaround since the kernel requires at least gcc 4.6 now. > > Signed-off-by: Kees Cook > --- > arch/powerpc/kernel/vmlinux.lds.S | 24 ++-- > 1 file changed, 2 insertions(+), 22 deletions(

Re: [PATCH v2 03/29] powerpc: Rename PT_LOAD identifier "kernel" to "text"

2019-10-10 Thread Michael Ellerman
Kees Cook writes: > In preparation for moving NOTES into RO_DATA, rename the linker script > internal identifier for the PT_LOAD Program Header from "kernel" to > "text" to match other architectures. > > Signed-off-by: Kees Cook > --- > arch/powerpc/kernel/vmlinux.lds.S | 12 ++-- > 1 fi

[PATCH V5 0/2] mm/debug: Add tests validating architecture page table helpers

2019-10-10 Thread Anshuman Khandual
This series adds a test validation for architecture exported page table helpers. Patch in the series adds basic transformation tests at various levels of the page table. Before that it exports gigantic page allocation function from HugeTLB. This test was originally suggested by Catalin during arm6

[PATCH V5 1/2] mm/hugetlb: Make alloc_gigantic_page() available for general use

2019-10-10 Thread Anshuman Khandual
alloc_gigantic_page() implements an allocation method where it scans over various zones looking for a large contiguous memory block which could not have been allocated through the buddy allocator. A subsequent patch which tests arch page table helpers needs such a method to allocate PUD_SIZE sized

[PATCH V5 2/2] mm/debug: Add tests validating architecture page table helpers

2019-10-10 Thread Anshuman Khandual
This adds tests which will validate architecture page table helpers and other accessors in their compliance with expected generic MM semantics. This will help various architectures in validating changes to existing page table helpers or addition of new ones. Test page table and memory pages creati