[PATCH v17 13/13] Documentation: path-lookup: include new LOOKUP flags

2019-11-16 Thread Aleksa Sarai
Now that we have new LOOKUP flags, we should document them in the relevant path-walking documentation. And now that we've settled on a common name for nd_jump_link() style symlinks ("magic links"), use that term where magic-link semantics are described. Signed-off-by: Aleksa Sarai --- Documentat

[PATCH v17 12/13] selftests: add openat2(2) selftests

2019-11-16 Thread Aleksa Sarai
Test all of the various openat2(2) flags. A small stress-test of a symlink-rename attack is included to show that the protections against ".."-based attacks are sufficient. The main things these self-tests are enforcing are: * The struct+usize ABI for openat2(2) and copy_struct_from_user() to

[PATCH v17 11/13] open: introduce openat2(2) syscall

2019-11-16 Thread Aleksa Sarai
/* Background. */ For a very long time, extending openat(2) with new features has been incredibly frustrating. This stems from the fact that openat(2) is possibly the most famous counter-example to the mantra "don't silently accept garbage from userspace" -- it doesn't check whether unknown flags a

[PATCH v17 10/13] namei: LOOKUP_{IN_ROOT, BENEATH}: permit limited ".." resolution

2019-11-16 Thread Aleksa Sarai
Allow LOOKUP_BENEATH and LOOKUP_IN_ROOT to safely permit ".." resolution (in the case of LOOKUP_BENEATH the resolution will still fail if ".." resolution would resolve a path outside of the root -- while LOOKUP_IN_ROOT will chroot(2)-style scope it). Magic-link jumps are still disallowed entirely[*

[PATCH v17 09/13] namei: LOOKUP_IN_ROOT: chroot-like scoped resolution

2019-11-16 Thread Aleksa Sarai
/* Background. */ Container runtimes or other administrative management processes will often interact with root filesystems while in the host mount namespace, because the cost of doing a chroot(2) on every operation is too prohibitive (especially in Go, which cannot safely use vfork). However, a ma

[PATCH v17 08/13] namei: LOOKUP_BENEATH: O_BENEATH-like scoped resolution

2019-11-16 Thread Aleksa Sarai
/* Background. */ There are many circumstances when userspace wants to resolve a path and ensure that it doesn't go outside of a particular root directory during resolution. Obvious examples include archive extraction tools, as well as other security-conscious userspace programs. FreeBSD spun out O

[PATCH v17 07/13] namei: LOOKUP_NO_XDEV: block mountpoint crossing

2019-11-16 Thread Aleksa Sarai
/* Background. */ The need to contain path operations within a mountpoint has been a long-standing usecase that userspace has historically implemented manually with liberal usage of stat(). find, rsync, tar and many other programs implement these semantics -- but it'd be much simpler to have a fool

[PATCH v17 06/13] namei: LOOKUP_NO_MAGICLINKS: block magic-link resolution

2019-11-16 Thread Aleksa Sarai
/* Background. */ There has always been a special class of symlink-like objects in procfs (and a few other pseudo-filesystems) which allow for non-lexical resolution of paths using nd_jump_link(). These "magic-links" do not follow traditional mount namespace boundaries, and have been used consisten

[PATCH v17 05/13] namei: LOOKUP_NO_SYMLINKS: block symlink resolution

2019-11-16 Thread Aleksa Sarai
/* Background. */ Userspace cannot easily resolve a path without resolving symlinks, and would have to manually resolve each path component with O_PATH and O_NOFOLLOW. This is clearly inefficient, and can be fairly easy to screw up (resulting in possible security bugs). Linus has mentioned that Git

[PATCH v17 04/13] namei: allow set_root() to produce errors

2019-11-16 Thread Aleksa Sarai
For LOOKUP_BENEATH and LOOKUP_IN_ROOT it is necessary to ensure that set_root() is never called, and thus (for hardening purposes) it should return an error rather than permit a breakout from the root. In addition, move all of the repetitive set_root() calls to nd_jump_root(). Signed-off-by: Aleks

[PATCH v17 03/13] namei: allow nd_jump_link() to produce errors

2019-11-16 Thread Aleksa Sarai
In preparation for LOOKUP_NO_MAGICLINKS, it's necessary to add the ability for nd_jump_link() to return an error which the corresponding get_link() caller must propogate back up to the VFS. Suggested-by: Al Viro Signed-off-by: Aleksa Sarai --- fs/namei.c | 3 ++- fs/proc/ba

[PATCH v17 02/13] nsfs: clean-up ns_get_path() signature to return int

2019-11-16 Thread Aleksa Sarai
ns_get_path() and ns_get_path_cb() only ever return either NULL or an ERR_PTR. It is far more idiomatic to simply return an integer, and it makes all of the callers of ns_get_path() more straightforward to read. Fixes: e149ed2b805f ("take the targets of /proc/*/ns/* symlinks to separate fs") Signe

[PATCH v17 01/13] namei: only return -ECHILD from follow_dotdot_rcu()

2019-11-16 Thread Aleksa Sarai
It's over-zealous to return hard errors under RCU-walk here, given that a REF-walk will be triggered for all other cases handling ".." under RCU. The original purpose of this check was to ensure that if a rename occurs such that a directory is moved outside of the bind-mount which the resolution s

[PATCH v17 00/13] open: introduce openat2(2) syscall

2019-11-16 Thread Aleksa Sarai
This patchset is being developed here: Patch changelog: v17: * Add a path_is_under() check for LOOKUP_IS_SCOPED in complete_walk(), as a last line of defence to ensure that namei bugs will not break the contract of LOOKUP_BENEATH o

Re: [PATCH v4 0/3] Append new variables to vmcoreinfo (TCR_EL1.T1SZ for arm64 and MAX_PHYSMEM_BITS for all archs)

2019-11-16 Thread Bhupesh Sharma
Hi Akashi, On Fri, Nov 15, 2019 at 7:29 AM AKASHI Takahiro wrote: > > Bhupesh, > > On Fri, Nov 15, 2019 at 01:24:17AM +0530, Bhupesh Sharma wrote: > > Hi Akashi, > > > > On Wed, Nov 13, 2019 at 12:11 PM AKASHI Takahiro > > wrote: > > > > > > Hi Bhupesh, > > > > > > Do you have a corresponding pa

Re: [RFC PATCH 1/4] libnvdimm/namespace: Make namespace size validation arch dependent

2019-11-16 Thread Dan Williams
On Sat, Nov 16, 2019 at 4:15 AM Aneesh Kumar K.V wrote: > > > Hi Dan, > > "Aneesh Kumar K.V" writes: > > > Dan Williams writes: > > > >> On Wed, Oct 30, 2019 at 10:35 PM Aneesh Kumar K.V > >> wrote: > >> [..] > >>> > True, for the pfn device and the device-dax mapping size, but I'm > >>> > sugg

Re: [PATCH v16 02/12] namei: allow nd_jump_link() to produce errors

2019-11-16 Thread Aleksa Sarai
On 2019-11-16, Al Viro wrote: > On Sat, Nov 16, 2019 at 11:27:52AM +1100, Aleksa Sarai wrote: > > + error = nd_jump_link(&path); > > + if (error) > > + path_put(&path); > > > + error = nd_jump_link(&ns_path); > > + if (error) > > + path_put(&ns_path); > > > + error

Re: [PATCH v16 06/12] namei: LOOKUP_NO_XDEV: block mountpoint crossing

2019-11-16 Thread Aleksa Sarai
On 2019-11-16, Al Viro wrote: > On Sat, Nov 16, 2019 at 11:27:56AM +1100, Aleksa Sarai wrote: > > > @@ -1383,6 +1398,8 @@ static int follow_dotdot_rcu(struct nameidata *nd) > > return -ECHILD; > > if (&mparent->mnt == nd->path.mnt) > >

Re: Found the commit for: 5.3.7 64-bits kernel doesn't boot on G5 Quad

2019-11-16 Thread John Paul Adrian Glaubitz
Hi Romain! Great detective work! On 11/16/19 5:34 PM, Romain Dolbeau wrote: > So it seems to me that 0034d395f89d9c092bb15adbabdca5283e258b41 > introduced the bug that crashes the PowerMac G5 (as/could anyone > tried/try on some other PPC970-based system, like a JS20 ? to see if > it's PowerMac-s

Re: [PATCH v16 09/12] namei: LOOKUP_{IN_ROOT,BENEATH}: permit limited ".." resolution

2019-11-16 Thread Aleksa Sarai
On 2019-11-16, Al Viro wrote: > On Sat, Nov 16, 2019 at 11:27:59AM +1100, Aleksa Sarai wrote: > > > + if (unlikely(nd->flags & LOOKUP_IS_SCOPED)) { > > + bool m_retry = read_seqretry(&mount_lock, nd->m_seq); > > + bool r_retry = read_seqretry(&rename_

Found the commit for: 5.3.7 64-bits kernel doesn't boot on G5 Quad

2019-11-16 Thread Romain Dolbeau
Le dim. 10 nov. 2019 à 11:45, Romain Dolbeau a écrit : > Any suggestion, advice, or patch to try welcome :-) >From my bisect, I figured that 0034d395f89d9c092bb15adbabdca5283e258b41 was the likely culprit, but that the bug was masked by the printk() issues that were fixed later: commit 2ac5a3bf70

[PATCH AUTOSEL 4.4 25/77] macintosh/windfarm_smu_sat: Fix debug output

2019-11-16 Thread Sasha Levin
From: Benjamin Herrenschmidt [ Upstream commit fc0c8b36d379a046525eacb9c3323ca635283757 ] There's some antiquated debug output that's trying to do a hand-made hexdump and turning into horrible 1-byte-per-line output these days. Use print_hex_dump() instead Signed-off-by: Benjamin Herrenschmidt

[PATCH AUTOSEL 4.4 06/77] powerpc/eeh: Fix use of EEH_PE_KEEP on wrong field

2019-11-16 Thread Sasha Levin
From: Sam Bobroff [ Upstream commit 473af09b56dc4be68e4af33220ceca6be67aa60d ] eeh_add_to_parent_pe() sometimes removes the EEH_PE_KEEP flag, but it incorrectly removes it from pe->type, instead of pe->state. However, rather than clearing it from the correct field, remove it. Inspection of the

[PATCH AUTOSEL 4.4 05/77] powerpc: Fix signedness bug in update_flash_db()

2019-11-16 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit 014704e6f54189a203cc14c7c0bb411b940241bc ] The "count < sizeof(struct os_area_db)" comparison is type promoted to size_t so negative values of "count" are treated as very high values and we accidentally return success instead of a negative error code. This

[PATCH AUTOSEL 4.9 68/99] mm/memory_hotplug: make add_memory() take the device_hotplug_lock

2019-11-16 Thread Sasha Levin
From: David Hildenbrand [ Upstream commit 8df1d0e4a265f25dc1e7e7624ccdbcb4a6630c89 ] add_memory() currently does not take the device_hotplug_lock, however is aleady called under the lock from arch/powerpc/platforms/pseries/hotplug-memory.c drivers/acpi/acpi_memhotplug.c to synchr

[PATCH AUTOSEL 4.9 50/99] powerpc/process: Fix flush_all_to_thread for SPE

2019-11-16 Thread Sasha Levin
From: Felipe Rechia [ Upstream commit e901378578c62202594cba0f6c076f3df365ec91 ] Fix a bug introduced by the creation of flush_all_to_thread() for processors that have SPE (Signal Processing Engine) and use it to compute floating-point operations. >From userspace perspective, the problem was se

[PATCH AUTOSEL 4.9 30/99] macintosh/windfarm_smu_sat: Fix debug output

2019-11-16 Thread Sasha Levin
From: Benjamin Herrenschmidt [ Upstream commit fc0c8b36d379a046525eacb9c3323ca635283757 ] There's some antiquated debug output that's trying to do a hand-made hexdump and turning into horrible 1-byte-per-line output these days. Use print_hex_dump() instead Signed-off-by: Benjamin Herrenschmidt

[PATCH AUTOSEL 4.9 05/99] powerpc: Fix signedness bug in update_flash_db()

2019-11-16 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit 014704e6f54189a203cc14c7c0bb411b940241bc ] The "count < sizeof(struct os_area_db)" comparison is type promoted to size_t so negative values of "count" are treated as very high values and we accidentally return success instead of a negative error code. This

[PATCH AUTOSEL 4.9 06/99] powerpc/eeh: Fix use of EEH_PE_KEEP on wrong field

2019-11-16 Thread Sasha Levin
From: Sam Bobroff [ Upstream commit 473af09b56dc4be68e4af33220ceca6be67aa60d ] eeh_add_to_parent_pe() sometimes removes the EEH_PE_KEEP flag, but it incorrectly removes it from pe->type, instead of pe->state. However, rather than clearing it from the correct field, remove it. Inspection of the

[PATCH AUTOSEL 4.14 104/150] mm/memory_hotplug: make add_memory() take the device_hotplug_lock

2019-11-16 Thread Sasha Levin
From: David Hildenbrand [ Upstream commit 8df1d0e4a265f25dc1e7e7624ccdbcb4a6630c89 ] add_memory() currently does not take the device_hotplug_lock, however is aleady called under the lock from arch/powerpc/platforms/pseries/hotplug-memory.c drivers/acpi/acpi_memhotplug.c to synchr

[PATCH AUTOSEL 4.14 092/150] selftests/powerpc/cache_shape: Fix out-of-tree build

2019-11-16 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit 69f8117f17b332a68cd8f4bf8c2d0d3d5b84efc5 ] Use TEST_GEN_PROGS and don't redefine all, this makes the out-of-tree build work. We need to move the extra dependencies below the include of lib.mk, because it adds the $(OUTPUT) prefix if it's defined. We can

[PATCH AUTOSEL 4.14 091/150] selftests/powerpc/switch_endian: Fix out-of-tree build

2019-11-16 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit 266bac361d5677e61a6815bd29abeb3bdced2b07 ] For the out-of-tree build to work we need to tell switch_endian_test to look for check-reversed.S in $(OUTPUT). Signed-off-by: Michael Ellerman Signed-off-by: Sasha Levin --- tools/testing/selftests/powerpc/s

[PATCH AUTOSEL 4.14 090/150] selftests/powerpc/signal: Fix out-of-tree build

2019-11-16 Thread Sasha Levin
From: Joel Stanley [ Upstream commit 27825349d7b238533a47e3d98b8bb0efd886b752 ] We should use TEST_GEN_PROGS, not TEST_PROGS. That tells the selftests makefile (lib.mk) that those tests are generated (built), and so it adds the $(OUTPUT) prefix for us, making the out-of-tree build work correctly

[PATCH AUTOSEL 4.14 089/150] powerpc/xmon: Relax frame size for clang

2019-11-16 Thread Sasha Levin
From: Joel Stanley [ Upstream commit 9c87156cce5a63735d1218f0096a65c50a7a32aa ] When building with clang (8 trunk, 7.0 release) the frame size limit is hit: arch/powerpc/xmon/xmon.c:452:12: warning: stack frame size of 2576 bytes in function 'xmon_core' [-Wframe-larger-than=] Some investigat

[PATCH AUTOSEL 4.14 076/150] powerpc/process: Fix flush_all_to_thread for SPE

2019-11-16 Thread Sasha Levin
From: Felipe Rechia [ Upstream commit e901378578c62202594cba0f6c076f3df365ec91 ] Fix a bug introduced by the creation of flush_all_to_thread() for processors that have SPE (Signal Processing Engine) and use it to compute floating-point operations. >From userspace perspective, the problem was se

[PATCH AUTOSEL 4.14 059/150] powerpc/pseries: Export raw per-CPU VPA data via debugfs

2019-11-16 Thread Sasha Levin
From: Aravinda Prasad [ Upstream commit c6c26fb55e8e4b3fc376be5611685990a17de27a ] This patch exports the raw per-CPU VPA data via debugfs. A per-CPU file is created which exports the VPA data of that CPU to help debug some of the VPA related issues or to analyze the per-CPU VPA related statisti

[PATCH AUTOSEL 4.14 048/150] macintosh/windfarm_smu_sat: Fix debug output

2019-11-16 Thread Sasha Levin
From: Benjamin Herrenschmidt [ Upstream commit fc0c8b36d379a046525eacb9c3323ca635283757 ] There's some antiquated debug output that's trying to do a hand-made hexdump and turning into horrible 1-byte-per-line output these days. Use print_hex_dump() instead Signed-off-by: Benjamin Herrenschmidt

[PATCH AUTOSEL 4.14 008/150] powerpc/eeh: Fix use of EEH_PE_KEEP on wrong field

2019-11-16 Thread Sasha Levin
From: Sam Bobroff [ Upstream commit 473af09b56dc4be68e4af33220ceca6be67aa60d ] eeh_add_to_parent_pe() sometimes removes the EEH_PE_KEEP flag, but it incorrectly removes it from pe->type, instead of pe->state. However, rather than clearing it from the correct field, remove it. Inspection of the

[PATCH AUTOSEL 4.14 007/150] powerpc/boot: Disable vector instructions

2019-11-16 Thread Sasha Levin
From: Joel Stanley [ Upstream commit e8e132e6885962582784b6fa16a80d07ea739c0f ] This will avoid auto-vectorisation when building with higher optimisation levels. We don't know if the machine can support VSX and even if it's present it's probably not going to be enabled at this point in boot. T

[PATCH AUTOSEL 4.14 006/150] powerpc: Fix signedness bug in update_flash_db()

2019-11-16 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit 014704e6f54189a203cc14c7c0bb411b940241bc ] The "count < sizeof(struct os_area_db)" comparison is type promoted to size_t so negative values of "count" are treated as very high values and we accidentally return success instead of a negative error code. This

[PATCH AUTOSEL 4.19 165/237] powerpc/powernv: hold device_hotplug_lock when calling device_online()

2019-11-16 Thread Sasha Levin
From: David Hildenbrand [ Upstream commit cec1680591d6d5b10ecc10f370210089416e98af ] device_online() should be called with device_hotplug_lock() held. Link: http://lkml.kernel.org/r/20180925091457.28651-5-da...@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Pavel Tatashin Reviewed-b

[PATCH AUTOSEL 4.19 163/237] mm/memory_hotplug: make add_memory() take the device_hotplug_lock

2019-11-16 Thread Sasha Levin
From: David Hildenbrand [ Upstream commit 8df1d0e4a265f25dc1e7e7624ccdbcb4a6630c89 ] add_memory() currently does not take the device_hotplug_lock, however is aleady called under the lock from arch/powerpc/platforms/pseries/hotplug-memory.c drivers/acpi/acpi_memhotplug.c to synchr

[PATCH AUTOSEL 4.19 147/237] selftests/powerpc/cache_shape: Fix out-of-tree build

2019-11-16 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit 69f8117f17b332a68cd8f4bf8c2d0d3d5b84efc5 ] Use TEST_GEN_PROGS and don't redefine all, this makes the out-of-tree build work. We need to move the extra dependencies below the include of lib.mk, because it adds the $(OUTPUT) prefix if it's defined. We can

[PATCH AUTOSEL 4.19 146/237] selftests/powerpc/switch_endian: Fix out-of-tree build

2019-11-16 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit 266bac361d5677e61a6815bd29abeb3bdced2b07 ] For the out-of-tree build to work we need to tell switch_endian_test to look for check-reversed.S in $(OUTPUT). Signed-off-by: Michael Ellerman Signed-off-by: Sasha Levin --- tools/testing/selftests/powerpc/s

[PATCH AUTOSEL 4.19 145/237] selftests/powerpc/signal: Fix out-of-tree build

2019-11-16 Thread Sasha Levin
From: Joel Stanley [ Upstream commit 27825349d7b238533a47e3d98b8bb0efd886b752 ] We should use TEST_GEN_PROGS, not TEST_PROGS. That tells the selftests makefile (lib.mk) that those tests are generated (built), and so it adds the $(OUTPUT) prefix for us, making the out-of-tree build work correctly

[PATCH AUTOSEL 4.19 144/237] selftests/powerpc/ptrace: Fix out-of-tree build

2019-11-16 Thread Sasha Levin
From: Joel Stanley [ Upstream commit c39b79082a38a4f8c801790edecbbb4d62ed2992 ] We should use TEST_GEN_PROGS, not TEST_PROGS. That tells the selftests makefile (lib.mk) that those tests are generated (built), and so it adds the $(OUTPUT) prefix for us, making the out-of-tree build work correctly

[PATCH AUTOSEL 4.19 143/237] powerpc/xmon: Relax frame size for clang

2019-11-16 Thread Sasha Levin
From: Joel Stanley [ Upstream commit 9c87156cce5a63735d1218f0096a65c50a7a32aa ] When building with clang (8 trunk, 7.0 release) the frame size limit is hit: arch/powerpc/xmon/xmon.c:452:12: warning: stack frame size of 2576 bytes in function 'xmon_core' [-Wframe-larger-than=] Some investigat

[PATCH AUTOSEL 4.19 126/237] powerpc/process: Fix flush_all_to_thread for SPE

2019-11-16 Thread Sasha Levin
From: Felipe Rechia [ Upstream commit e901378578c62202594cba0f6c076f3df365ec91 ] Fix a bug introduced by the creation of flush_all_to_thread() for processors that have SPE (Signal Processing Engine) and use it to compute floating-point operations. >From userspace perspective, the problem was se

[PATCH AUTOSEL 4.19 095/237] powerpc/64s/radix: Fix radix__flush_tlb_collapsed_pmd double flushing pmd

2019-11-16 Thread Sasha Levin
From: Nicholas Piggin [ Upstream commit dd76ff5af35350fd6d5bb5b069e73b6017f66893 ] Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Signed-off-by: Sasha Levin --- arch/powerpc/mm/tlb-radix.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/powerpc/mm/tlb-radix.c b/arch/p

[PATCH AUTOSEL 4.19 094/237] powerpc/mm/radix: Fix small page at boundary when splitting

2019-11-16 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit 81d1b54dec95209ab5e5be2cf37182885f998753 ] When we have CONFIG_STRICT_KERNEL_RWX enabled, we want to split the linear mapping at the text/data boundary so we can map the kernel text read only. Currently we always use a small page at the text/data boundar

[PATCH AUTOSEL 4.19 093/237] powerpc/mm/radix: Fix overuse of small pages in splitting logic

2019-11-16 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit 3b5657ed5b4e27ccf593a41ff3c5aa27dae8df18 ] When we have CONFIG_STRICT_KERNEL_RWX enabled, we want to split the linear mapping at the text/data boundary so we can map the kernel text read only. But the current logic uses small pages for the entire text se

[PATCH AUTOSEL 4.19 092/237] powerpc/mm/radix: Fix off-by-one in split mapping logic

2019-11-16 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit 5c6499b7041b43807dfaeda28aa87fc0e62558f7 ] When we have CONFIG_STRICT_KERNEL_RWX enabled, we try to split the kernel linear (1:1) mapping so that the kernel text is in a separate page to kernel data, so we can mark the former read-only. We could achieve

[PATCH AUTOSEL 4.19 091/237] powerpc/pseries: Export raw per-CPU VPA data via debugfs

2019-11-16 Thread Sasha Levin
From: Aravinda Prasad [ Upstream commit c6c26fb55e8e4b3fc376be5611685990a17de27a ] This patch exports the raw per-CPU VPA data via debugfs. A per-CPU file is created which exports the VPA data of that CPU to help debug some of the VPA related issues or to analyze the per-CPU VPA related statisti

[PATCH AUTOSEL 4.19 075/237] macintosh/windfarm_smu_sat: Fix debug output

2019-11-16 Thread Sasha Levin
From: Benjamin Herrenschmidt [ Upstream commit fc0c8b36d379a046525eacb9c3323ca635283757 ] There's some antiquated debug output that's trying to do a hand-made hexdump and turning into horrible 1-byte-per-line output these days. Use print_hex_dump() instead Signed-off-by: Benjamin Herrenschmidt

[PATCH AUTOSEL 4.19 014/237] powerpc/eeh: Fix use of EEH_PE_KEEP on wrong field

2019-11-16 Thread Sasha Levin
From: Sam Bobroff [ Upstream commit 473af09b56dc4be68e4af33220ceca6be67aa60d ] eeh_add_to_parent_pe() sometimes removes the EEH_PE_KEEP flag, but it incorrectly removes it from pe->type, instead of pe->state. However, rather than clearing it from the correct field, remove it. Inspection of the

[PATCH AUTOSEL 4.19 013/237] powerpc/eeh: Fix null deref for devices removed during EEH

2019-11-16 Thread Sasha Levin
From: Sam Bobroff [ Upstream commit bcbe3730531239abd45ab6c6af4a18078b37dd47 ] If a device is removed during EEH processing (either by a driver's handler or as part of recovery), it can lead to a null dereference in eeh_pe_report_edev(). To handle this, skip devices that have been removed. Sig

[PATCH AUTOSEL 4.19 012/237] powerpc/boot: Disable vector instructions

2019-11-16 Thread Sasha Levin
From: Joel Stanley [ Upstream commit e8e132e6885962582784b6fa16a80d07ea739c0f ] This will avoid auto-vectorisation when building with higher optimisation levels. We don't know if the machine can support VSX and even if it's present it's probably not going to be enabled at this point in boot. T

[PATCH AUTOSEL 4.19 011/237] powerpc/boot: Fix opal console in boot wrapper

2019-11-16 Thread Sasha Levin
From: Joel Stanley [ Upstream commit 1a855eaccf353f7ed1d51a3d4b3af727ccbd81ca ] As of commit 10c77dba40ff ("powerpc/boot: Fix build failure in 32-bit boot wrapper") the opal code is hidden behind CONFIG_PPC64_BOOT_WRAPPER, but the boot wrapper avoids include/linux, so it does not get the normal

[PATCH AUTOSEL 4.19 010/237] powerpc: Fix signedness bug in update_flash_db()

2019-11-16 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit 014704e6f54189a203cc14c7c0bb411b940241bc ] The "count < sizeof(struct os_area_db)" comparison is type promoted to size_t so negative values of "count" are treated as very high values and we accidentally return success instead of a negative error code. This

Re: [PATCH v3 2/4] powerpc/fadump: reorganize /sys/kernel/fadump_* sysfs files

2019-11-16 Thread Sourabh Jain
On 11/9/19 6:29 PM, Michal Suchánek wrote: > On Sat, Nov 09, 2019 at 05:53:37PM +0530, Sourabh Jain wrote: >> As the number of FADump sysfs files increases it is hard to manage all of >> them inside /sys/kernel directory. It's better to have all the FADump >> related sysfs files in a dedicated d

Re: [RFC PATCH 1/4] libnvdimm/namespace: Make namespace size validation arch dependent

2019-11-16 Thread Aneesh Kumar K.V
Hi Dan, "Aneesh Kumar K.V" writes: > Dan Williams writes: > >> On Wed, Oct 30, 2019 at 10:35 PM Aneesh Kumar K.V >> wrote: >> [..] >>> > True, for the pfn device and the device-dax mapping size, but I'm >>> > suggesting adding another instance of alignment control at the raw >>> > namespace