Re: [PATCH v5] reboot: support offline CPUs before reboot

2020-01-15 Thread Rafael J. Wysocki
On Wed, Jan 15, 2020 at 7:35 AM Hsin-Yi Wang wrote: > > Currently system reboots uses architecture specific codes (smp_send_stop) > to offline non reboot CPUs. Most architecture's implementation is looping > through all non reboot online CPUs and call ipi function to each of them. Some > architect

Re: [PATCH v5] reboot: support offline CPUs before reboot

2020-01-15 Thread Hsin-Yi Wang
On Wed, Jan 15, 2020 at 5:49 PM Rafael J. Wysocki wrote: > > On Wed, Jan 15, 2020 at 7:35 AM Hsin-Yi Wang wrote: > > > > Currently system reboots uses architecture specific codes (smp_send_stop) > > to offline non reboot CPUs. Most architecture's implementation is looping > > through all non rebo

Re: [PATCH v5] reboot: support offline CPUs before reboot

2020-01-15 Thread Sudeep Holla
On Wed, Jan 15, 2020 at 02:34:10PM +0800, Hsin-Yi Wang wrote: > Currently system reboots uses architecture specific codes (smp_send_stop) > to offline non reboot CPUs. Most architecture's implementation is looping > through all non reboot online CPUs and call ipi function to each of them. Some > ar

[PATCH vdsotest] Use vdso wrapper for gettimeofday()

2020-01-15 Thread Christophe Leroy
To properly handle errors returned by gettimeofday(), the DO_VDSO_CALL() macro has to be used, otherwise vdsotest misinterpret VDSO function return on error. This has gone unnoticed until now because the powerpc VDSO gettimeofday() always succeed, but while porting powerpc to generic C VDSO, the f

RE: [PATCH] evh_bytechan: fix out of bounds accesses

2020-01-15 Thread Laurentiu Tudor
> -Original Message- > From: Linuxppc-dev bounces+laurentiu.tudor=nxp@lists.ozlabs.org> On Behalf Of Stephen > Rothwell > Sent: Tuesday, January 14, 2020 8:32 AM > To: Timur Tabi > Cc: b08...@gmail.com; Greg Kroah-Hartman ; > Jiri Slaby ; York Sun ; PowerPC Mailing > List ; sw...@re

Re: [PATCH] evh_bytechan: fix out of bounds accesses

2020-01-15 Thread Timur Tabi
On 1/14/20 12:31 AM, Stephen Rothwell wrote: +/** + * ev_byte_channel_send - send characters to a byte stream + * @handle: byte stream handle + * @count: (input) num of chars to send, (output) num chars sent + * @bp: pointer to chars to send + * + * Returns 0 for success, or an error code. + */ +

Re: [PATCH] Fix display of Maximum Memory

2020-01-15 Thread Michael Bringmann
On 1/14/20 11:41 PM, Christophe Leroy wrote: > > > Le 14/01/2020 à 22:07, Michael Bringmann a écrit : >> Correct overflow problem in calculation+display of Maximum Memory >> value to syscfg where 32bits is insufficient. >> >> Signed-off-by: Michael Bringmann >> --- >>   arch/powerpc/platforms/ps

Re: [PATCH 1/2] kasan: stop tests being eliminated as dead code with FORTIFY_SOURCE

2020-01-15 Thread Dmitry Vyukov
On Wed, Jan 15, 2020 at 7:37 AM Daniel Axtens wrote: > > 3 KASAN self-tests fail on a kernel with both KASAN and FORTIFY_SOURCE: > memchr, memcmp and strlen. > > When FORTIFY_SOURCE is on, a number of functions are replaced with > fortified versions, which attempt to check the sizes of the operand

Re: [PATCH 1/2] kasan: stop tests being eliminated as dead code with FORTIFY_SOURCE

2020-01-15 Thread Christophe Leroy
Le 15/01/2020 à 15:43, Dmitry Vyukov a écrit : On Wed, Jan 15, 2020 at 7:37 AM Daniel Axtens wrote: 3 KASAN self-tests fail on a kernel with both KASAN and FORTIFY_SOURCE: memchr, memcmp and strlen. When FORTIFY_SOURCE is on, a number of functions are replaced with fortified versions, whic

[PATCH v2] Fix display of Maximum Memory

2020-01-15 Thread Michael Bringmann
Correct overflow problem in calculation+display of Maximum Memory value to syscfg where 32bits is insufficient. Signed-off-by: Michael Bringmann --- arch/powerpc/platforms/pseries/lparcfg.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/platforms/pseries

Re: [PATCH v2] Fix display of Maximum Memory

2020-01-15 Thread Christophe Leroy
Le 15/01/2020 à 15:53, Michael Bringmann a écrit : Correct overflow problem in calculation+display of Maximum Memory value to syscfg where 32bits is insufficient. Signed-off-by: Michael Bringmann Reviewed-by: Christophe Leroy --- arch/powerpc/platforms/pseries/lparcfg.c | 8

Re: [PATCH 2/2] string.h: fix incompatibility between FORTIFY_SOURCE and KASAN

2020-01-15 Thread Dmitry Vyukov
On Wed, Jan 15, 2020 at 7:37 AM Daniel Axtens wrote: > > The memcmp KASAN self-test fails on a kernel with both KASAN and > FORTIFY_SOURCE. > > When FORTIFY_SOURCE is on, a number of functions are replaced with > fortified versions, which attempt to check the sizes of the operands. > However, thes

Re: Bug 205201 - Booting halts if Dawicontrol DC-2976 UW SCSI board installed, unless RAM size limited to 3500M

2020-01-15 Thread Christoph Hellwig
On Fri, Jan 10, 2020 at 08:10:28AM +0100, Christian Zigotzky wrote: > Hi All, > > The SCSI cards work again. [1, 2] > > Sorry for bothering you. No problem, and sorry for not following up earlier. The Christmas holiday and catch up phase led to a lot of delay. Thanks a lot for taking care of t

Re: [PATCH v12 04/22] mm: devmap: refactor 1-based refcounting for ZONE_DEVICE pages

2020-01-15 Thread Christoph Hellwig
On Tue, Jan 07, 2020 at 02:45:40PM -0800, John Hubbard wrote: > An upcoming patch changes and complicates the refcounting and > especially the "put page" aspects of it. In order to keep > everything clean, refactor the devmap page release routines: > > * Rename put_devmap_managed_page() to page_is

Re: [PATCH v12 05/22] goldish_pipe: rename local pin_user_pages() routine

2020-01-15 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH v12 06/22] mm: fix get_user_pages_remote()'s handling of FOLL_LONGTERM

2020-01-15 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH v12 08/22] mm/gup: allow FOLL_FORCE for get_user_pages_fast()

2020-01-15 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH v12 22/22] mm, tree-wide: rename put_user_page*() to unpin_user_page*()

2020-01-15 Thread Christoph Hellwig
Looks sensible: Reviewed-by: Christoph Hellwig

Re: [PATCH v12 11/22] mm/gup: introduce pin_user_pages*() and FOLL_PIN

2020-01-15 Thread Christoph Hellwig
On Tue, Jan 07, 2020 at 02:45:47PM -0800, John Hubbard wrote: > Introduce pin_user_pages*() variations of get_user_pages*() calls, > and also pin_longterm_pages*() variations. > > For now, these are placeholder calls, until the various call sites > are converted to use the correct get_user_pages*(

Re: [PATCH] net/wan/fsl_ucc_hdlc: fix out of bounds write on array utdm_info

2020-01-15 Thread Joakim Tjernlund
On Tue, 2020-01-14 at 14:54 +, Colin King wrote: > > From: Colin Ian King > > Array utdm_info is declared as an array of MAX_HDLC_NUM (4) elements > however up to UCC_MAX_NUM (8) elements are potentially being written > to it. Currently we have an array out-of-bounds write error on the > la

Re: [PATCH] evh_bytechan: fix out of bounds accesses

2020-01-15 Thread Stephen Rothwell
Hi Timur, On Wed, 15 Jan 2020 07:25:45 -0600 Timur Tabi wrote: > > On 1/14/20 12:31 AM, Stephen Rothwell wrote: > > +/** > > + * ev_byte_channel_send - send characters to a byte stream > > + * @handle: byte stream handle > > + * @count: (input) num of chars to send, (output) num chars sent > > +

Re: [PATCH] evh_bytechan: fix out of bounds accesses

2020-01-15 Thread Scott Wood
On Thu, 2020-01-16 at 06:42 +1100, Stephen Rothwell wrote: > Hi Timur, > > On Wed, 15 Jan 2020 07:25:45 -0600 Timur Tabi wrote: > > On 1/14/20 12:31 AM, Stephen Rothwell wrote: > > > +/** > > > + * ev_byte_channel_send - send characters to a byte stream > > > + * @handle: byte stream handle > > >

Re: linux-next: build warning after merge of the bpf-next tree

2020-01-15 Thread Alexandre Ghiti
On 1/14/20 6:23 AM, Alexei Starovoitov wrote: On Sun, Jan 12, 2020 at 8:33 PM Zong Li wrote: I'm not quite familiar with btf, so I have no idea why there are two weak symbols be added in 8580ac9404f6 ("bpf: Process in-kernel BTF") I can explain what these weak symbols are for, but that won't c

[PATCH] powerpc: Do not consider weak unresolved symbol relocations as bad

2020-01-15 Thread Alexandre Ghiti
Commit 8580ac9404f6 ("bpf: Process in-kernel BTF") introduced two weak symbols that may be unresolved at link time which result in an absolute relocation to 0. relocs_check.sh emits the following warning: "WARNING: 2 bad relocations c1a41478 R_PPC64_ADDR64_binary__btf_vmlinux_bin_start

Re: [PATCH v12 04/22] mm: devmap: refactor 1-based refcounting for ZONE_DEVICE pages

2020-01-15 Thread John Hubbard
On 1/15/20 7:23 AM, Christoph Hellwig wrote: ... > > I'm really not sold on this scheme. Note that I think it is > particularly bad, but it also doesn't seem any better than what > we had before, and it introduced quite a bit more code. > Hi Christoph, All by itself, yes. But the very next pat

Re: [PATCH v12 11/22] mm/gup: introduce pin_user_pages*() and FOLL_PIN

2020-01-15 Thread John Hubbard
On 1/15/20 7:30 AM, Christoph Hellwig wrote: > On Tue, Jan 07, 2020 at 02:45:47PM -0800, John Hubbard wrote: >> Introduce pin_user_pages*() variations of get_user_pages*() calls, >> and also pin_longterm_pages*() variations. >> >> For now, these are placeholder calls, until the various call sites >

Re: [PATCH] net/wan/fsl_ucc_hdlc: fix out of bounds write on array utdm_info

2020-01-15 Thread David Miller
From: Colin King Date: Tue, 14 Jan 2020 14:54:48 + > From: Colin Ian King > > Array utdm_info is declared as an array of MAX_HDLC_NUM (4) elements > however up to UCC_MAX_NUM (8) elements are potentially being written > to it. Currently we have an array out-of-bounds write error on the > l

Re: [PATCH] powerpc: Do not consider weak unresolved symbol relocations as bad

2020-01-15 Thread Stephen Rothwell
Hi Alexandre, Thanks for sorting this out. Just a few comments below. On Wed, 15 Jan 2020 15:46:48 -0500 Alexandre Ghiti wrote: > > > # Have Kbuild supply the path to objdump so we handle cross compilation. ^ "and nm" > +# Remove from the bad rel

Re: [PATCH v2] Fix display of Maximum Memory

2020-01-15 Thread Tyrel Datwyler
On 1/15/20 6:53 AM, Michael Bringmann wrote: > Correct overflow problem in calculation+display of Maximum Memory > value to syscfg where 32bits is insufficient. > Probably needs the following Fixes tag: Fixes: 772b039fd9a7 ("powerpc/pseries: Export maximum memory value") otherwise, Reviewed-by

Re: [PATCH v5] reboot: support offline CPUs before reboot

2020-01-15 Thread Thomas Gleixner
Hsin-Yi Wang writes: > Currently system reboots uses architecture specific codes (smp_send_stop) > to offline non reboot CPUs. Most architecture's implementation is looping > through all non reboot online CPUs and call ipi function to each of them. Some > architecture like arm64, arm, and x86...

Re: [PATCH] evh_bytechan: fix out of bounds accesses

2020-01-15 Thread Stephen Rothwell
Hi Scott, On Wed, 15 Jan 2020 14:01:35 -0600 Scott Wood wrote: > > On Thu, 2020-01-16 at 06:42 +1100, Stephen Rothwell wrote: > > Hi Timur, > > > > On Wed, 15 Jan 2020 07:25:45 -0600 Timur Tabi wrote: > > > On 1/14/20 12:31 AM, Stephen Rothwell wrote: > > > > +/** > > > > + * ev_byte_channe

Re: [PATCH 00/12] i2c: convert subsystem to use i2c_new_client_device()

2020-01-15 Thread Wolfram Sang
On Tue, Jan 07, 2020 at 06:47:34PM +0100, Wolfram Sang wrote: > This patch series converts the I2C subsystem to use the new API. Drivers > have been build tested. There is one user left in the SMBus part of the > core which will need a seperate series because all users of this > function need to be

[PATCH 1/9] powerpc/configs: Drop CONFIG_QLGE which moved to staging

2020-01-15 Thread Michael Ellerman
The QLGE driver moved to staging in commit 955315b0dc8c ("qlge: Move drivers/net/ethernet/qlogic/qlge/ to drivers/staging/qlge/"), meaning our defconfigs that enable it have no effect as we don't enable CONFIG_STAGING. It sounds like the device is obsolete, so drop the driver. Signed-off-by: Mich

[PATCH 2/9] powerpc/configs: NET_CADENCE became NET_VENDOR_CADENCE

2020-01-15 Thread Michael Ellerman
The NET_CADENCE symbol was renamed to NET_VENDOR_CADENCE, so we don't need to disable the former, see commit 0df5f81c481e ("net: ethernet: Add missing VENDOR to Cadence and Packet Engines symbols"). Signed-off-by: Michael Ellerman --- arch/powerpc/configs/skiroot_defconfig | 1 - 1 file changed,

[PATCH 4/9] powerpc/configs/skiroot: Drop HID_LOGITECH

2020-01-15 Thread Michael Ellerman
Commit bdd08fff4915 ("HID: logitech: Add depends on LEDS_CLASS to Logitech Kconfig entry") made HID_LOGITECH depend on LEDS_CLASS which we do not enable, meaning we are not actually enabling those drivers any more. The Kconfig help text suggests USB HID compliant Logictech devices will continue to

[PATCH 3/9] powerpc/configs: Drop NET_VENDOR_HP which moved to staging

2020-01-15 Thread Michael Ellerman
The HP network driver moved to staging in commit 52340b82cf1a ("hp100: Move 100BaseVG AnyLAN driver to staging") meaning we don't need to disable it any more in our defconfigs. Signed-off-by: Michael Ellerman --- arch/powerpc/configs/44x/akebono_defconfig | 1 - arch/powerpc/configs/skiroot_defc

[PATCH 5/9] powerpc/configs/skiroot: Drop default n CONFIG_CRYPTO_ECHAINIV

2020-01-15 Thread Michael Ellerman
It's default n so we don't need to disable it. Signed-off-by: Michael Ellerman --- arch/powerpc/configs/skiroot_defconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/powerpc/configs/skiroot_defconfig b/arch/powerpc/configs/skiroot_defconfig index 74cffb854c0f..0aa060eef06c 100644 --

[PATCH 6/9] powerpc/configs/skiroot: Update for symbol movement only

2020-01-15 Thread Michael Ellerman
Signed-off-by: Michael Ellerman --- arch/powerpc/configs/skiroot_defconfig | 42 +- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/arch/powerpc/configs/skiroot_defconfig b/arch/powerpc/configs/skiroot_defconfig index 0aa060eef06c..24a210fe0049 100644 ---

[PATCH 7/9] powerpc/configs/skiroot: Enable security features

2020-01-15 Thread Michael Ellerman
From: Joel Stanley This turns on HARDENED_USERCOPY with HARDENED_USERCOPY_PAGESPAN, and FORTIFY_SOURCE. It also enables SECURITY_LOCKDOWN_LSM with _EARLY and LOCK_DOWN_KERNEL_FORCE_CONFIDENTIALITY options enabled. MODULE_SIG is selected by lockdown, so it is still enabled. Signed-off-by: Joel

[RFC PATCH 8/9] powerpc/configs/skiroot: Disable xmon default & enable reboot on panic

2020-01-15 Thread Michael Ellerman
If the skiroot kernel crashes we don't want it sitting at an xmon prompt forever. Instead it's more helpful to reboot and bring the boot loader back up, and if the crash was transient we can then boot successfully. Similarly if we panic we should reboot, with a short timeout in case someone is wat

[RFC PATCH 9/9] powerpc/configs/skiroot: Enable some more hardening options

2020-01-15 Thread Michael Ellerman
Enable more hardening options. Note BUG_ON_DATA_CORRUPTION selects DEBUG_LIST and is essentially just a synonym for it. DEBUG_SG, DEBUG_NOTIFIERS, DEBUG_LIST, DEBUG_CREDENTIALS and SCHED_STACK_END_CHECK should all be low overhead and just add a few extra checks. Unselecting SLAB_MERGE_DEFAULT ca

Re: [RFC PATCH 9/9] powerpc/configs/skiroot: Enable some more hardening options

2020-01-15 Thread Joel Stanley
On Thu, 16 Jan 2020 at 01:48, Michael Ellerman wrote: > > Enable more hardening options. > > Note BUG_ON_DATA_CORRUPTION selects DEBUG_LIST and is essentially just > a synonym for it. > > DEBUG_SG, DEBUG_NOTIFIERS, DEBUG_LIST, DEBUG_CREDENTIALS and > SCHED_STACK_END_CHECK should all be low overhea

Re: [PATCH 6/9] powerpc/configs/skiroot: Update for symbol movement only

2020-01-15 Thread Joel Stanley
On Thu, 16 Jan 2020 at 01:48, Michael Ellerman wrote: > > Signed-off-by: Michael Ellerman Acked-by: Joel Stanley

Re: [RFC PATCH 8/9] powerpc/configs/skiroot: Disable xmon default & enable reboot on panic

2020-01-15 Thread Joel Stanley
On Thu, 16 Jan 2020 at 01:48, Michael Ellerman wrote: > > If the skiroot kernel crashes we don't want it sitting at an xmon > prompt forever. Instead it's more helpful to reboot and bring the > boot loader back up, and if the crash was transient we can then boot > successfully. > > Similarly if we

Re: [PATCH 2/9] powerpc/configs: NET_CADENCE became NET_VENDOR_CADENCE

2020-01-15 Thread Joel Stanley
On Thu, 16 Jan 2020 at 01:48, Michael Ellerman wrote: > > The NET_CADENCE symbol was renamed to NET_VENDOR_CADENCE, so we don't > need to disable the former, see commit 0df5f81c481e ("net: ethernet: > Add missing VENDOR to Cadence and Packet Engines symbols"). > > Signed-off-by: Michael Ellerman

Re: [PATCH 1/9] powerpc/configs: Drop CONFIG_QLGE which moved to staging

2020-01-15 Thread Joel Stanley
On Thu, 16 Jan 2020 at 01:48, Michael Ellerman wrote: > > The QLGE driver moved to staging in commit 955315b0dc8c ("qlge: Move > drivers/net/ethernet/qlogic/qlge/ to drivers/staging/qlge/"), meaning > our defconfigs that enable it have no effect as we don't enable > CONFIG_STAGING. > > It sounds l

Re: [PATCH 3/9] powerpc/configs: Drop NET_VENDOR_HP which moved to staging

2020-01-15 Thread Joel Stanley
On Thu, 16 Jan 2020 at 01:48, Michael Ellerman wrote: > > The HP network driver moved to staging in commit 52340b82cf1a ("hp100: > Move 100BaseVG AnyLAN driver to staging") meaning we don't need to > disable it any more in our defconfigs. > > Signed-off-by: Michael Ellerman Acked-by: Joel Stanle

Re: [PATCH 4/9] powerpc/configs/skiroot: Drop HID_LOGITECH

2020-01-15 Thread Joel Stanley
On Thu, 16 Jan 2020 at 01:48, Michael Ellerman wrote: > > Commit bdd08fff4915 ("HID: logitech: Add depends on LEDS_CLASS to > Logitech Kconfig entry") made HID_LOGITECH depend on LEDS_CLASS which > we do not enable, meaning we are not actually enabling those drivers > any more. > > The Kconfig hel

Re: [PATCH 5/9] powerpc/configs/skiroot: Drop default n CONFIG_CRYPTO_ECHAINIV

2020-01-15 Thread Joel Stanley
On Thu, 16 Jan 2020 at 01:48, Michael Ellerman wrote: > > It's default n so we don't need to disable it. > > Signed-off-by: Michael Ellerman Acked-by: Joel Stanley

Re: [PATCH] evh_bytechan: fix out of bounds accesses

2020-01-15 Thread Timur Tabi
On 1/15/20 2:01 PM, Scott Wood wrote: FWIW I'd rather see the original patch, that keeps the raw asm hcall stuff as simple wrappers in one place. I can live with that.

Re: [PATCH v5 4/5] powerpc/numa: Early request for home node associativity

2020-01-15 Thread Michael Ellerman
Srikar Dronamraju writes: > Currently the kernel detects if its running on a shared lpar platform > and requests home node associativity before the scheduler sched_domains > are setup. However between the time NUMA setup is initialized and the > request for home node associativity, workqueue initi

Re: [PATCH 2/2] string.h: fix incompatibility between FORTIFY_SOURCE and KASAN

2020-01-15 Thread Daniel Axtens
Dmitry Vyukov writes: > On Wed, Jan 15, 2020 at 7:37 AM Daniel Axtens wrote: >> >> The memcmp KASAN self-test fails on a kernel with both KASAN and >> FORTIFY_SOURCE. >> >> When FORTIFY_SOURCE is on, a number of functions are replaced with >> fortified versions, which attempt to check the sizes

Re: [PATCH 7/9] powerpc/configs/skiroot: Enable security features

2020-01-15 Thread Daniel Axtens
Michael Ellerman writes: > From: Joel Stanley > > This turns on HARDENED_USERCOPY with HARDENED_USERCOPY_PAGESPAN, and > FORTIFY_SOURCE. > > It also enables SECURITY_LOCKDOWN_LSM with _EARLY and > LOCK_DOWN_KERNEL_FORCE_CONFIDENTIALITY options enabled. > As I said before, this will disable xmon

Re: [PATCH 1/2] kasan: stop tests being eliminated as dead code with FORTIFY_SOURCE

2020-01-15 Thread Daniel Axtens
>> >> +/* >> >> + * We assign some test results to these globals to make sure the tests >> >> + * are not eliminated as dead code. >> >> + */ >> >> + >> >> +int int_result; >> >> +void *ptr_result; >> > >> > These are globals, but are not static and don't have kasan_ prefix. >> > But I guess this d

Re: [PATCH v2] Fix display of Maximum Memory

2020-01-15 Thread Michael Ellerman
Michael Bringmann writes: > Correct overflow problem in calculation+display of Maximum Memory > value to syscfg where 32bits is insufficient. > > Signed-off-by: Michael Bringmann > --- > arch/powerpc/platforms/pseries/lparcfg.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > >

Re: [PATCH V6 3/4] ASoC: pcm_dmaengine: Extract snd_dmaengine_pcm_refine_runtime_hwparams

2020-01-15 Thread John Stultz
On Wed, Jan 8, 2020 at 8:58 PM John Stultz wrote: > On Thu, Sep 26, 2019 at 6:50 PM Shengjiu Wang wrote: > > > > When set the runtime hardware parameters, we may need to query > > the capability of DMA to complete the parameters. > > > > This patch is to Extract this operation from > > dmaengine_

Re: [PATCH] powerpc/xive: discard ESB load value when interrupt is invalid

2020-01-15 Thread Michael Ellerman
Greg Kurz writes: > On Tue, 14 Jan 2020 08:44:54 +0100 > Cédric Le Goater wrote: >> On 1/14/20 2:14 AM, Michael Ellerman wrote: >> > Cédric Le Goater writes: >> >> On 1/13/20 2:01 PM, Cédric Le Goater wrote: >> >>> From: Frederic Barrat >> >>> >> >>> A load on an ESB page returning all 1's mean

Re: [PATCH 14/18] powerpc/kprobes: Support kprobes on prefixed instructions

2020-01-15 Thread Michael Ellerman
Balamuruhan S writes: > On Tue, Nov 26, 2019 at 04:21:37PM +1100, Jordan Niethe wrote: ... >> diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c >> index 7303fe3856cc..aa15b3480385 100644 >> --- a/arch/powerpc/kernel/kprobes.c >> +++ b/arch/powerpc/kernel/kprobes.c >> @@ -1

z constraint in powerpc inline assembly ?

2020-01-15 Thread Christophe Leroy
Hi Segher, I'm trying to see if we could enhance TCP checksum calculations by splitting inline assembly blocks to give GCC the opportunity to mix it with other stuff, but I'm getting difficulties with the carry. As far as I can read in the documentation, the z constraint represents '‘XER[CA]

[PATCH v2 0/3] Fix some incompatibilites between KASAN and FORTIFY_SOURCE

2020-01-15 Thread Daniel Axtens
3 KASAN self-tests fail on a kernel with both KASAN and FORTIFY_SOURCE: memchr, memcmp and strlen. I have observed this on x86 and powerpc. When FORTIFY_SOURCE is on, a number of functions are replaced with fortified versions, which attempt to check the sizes of the operands. However, these functi

[PATCH v2 1/3] kasan: stop tests being eliminated as dead code with FORTIFY_SOURCE

2020-01-15 Thread Daniel Axtens
3 KASAN self-tests fail on a kernel with both KASAN and FORTIFY_SOURCE: memchr, memcmp and strlen. When FORTIFY_SOURCE is on, a number of functions are replaced with fortified versions, which attempt to check the sizes of the operands. However, these functions often directly invoke __builtin_foo()

[PATCH v2 2/3] string.h: fix incompatibility between FORTIFY_SOURCE and KASAN

2020-01-15 Thread Daniel Axtens
The memcmp KASAN self-test fails on a kernel with both KASAN and FORTIFY_SOURCE. When FORTIFY_SOURCE is on, a number of functions are replaced with fortified versions, which attempt to check the sizes of the operands. However, these functions often directly invoke __builtin_foo() once they have pe

[PATCH v2 3/3] kasan: initialise array in kasan_memcmp test

2020-01-15 Thread Daniel Axtens
memcmp may bail out before accessing all the memory if the buffers contain differing bytes. kasan_memcmp calls memcmp with a stack array. Stack variables are not necessarily initialised (in the absence of a compiler plugin, at least). Sometimes this causes the memcpy to bail early thus fail to trig

Re: [linux-next/mainline][bisected 3acac06][ppc] Oops when unloading mpt3sas driver

2020-01-15 Thread Michael Ellerman
Abdul Haleem writes: > On Thu, 2020-01-09 at 06:22 -0800, Christoph Hellwig wrote: >> On Thu, Jan 09, 2020 at 02:27:25PM +0530, Abdul Haleem wrote: >> > + CC Christoph Hellwig >> >> The only thing this commit changed for the dma coherent case (which >> ppc64 uses) is that we now look up the page

[PATCH v4 1/9] powerpc/mmu_gather: Enable RCU_TABLE_FREE even for !SMP case

2020-01-15 Thread Aneesh Kumar K.V
A follow up patch is going to make sure we correctly invalidate page walk cache before we free page table pages. In order to keep things simple enable RCU_TABLE_FREE even for !SMP so that we don't have to fixup the !SMP case differently in the followup patch !SMP case is right now broken for radix

[PATCH v4 0/9] Fixup page directory freeing

2020-01-15 Thread Aneesh Kumar K.V
This is a repost of patch series from Peter with the arch specific changes except ppc64 dropped. ppc64 changes are added here because we are redoing the patch series on top of ppc64 changes. This makes it easy to backport these changes. Only the first 2 patches need to be backported to stable.

[PATCH v4 2/9] mm/mmu_gather: Invalidate TLB correctly on batch allocation failure and flush

2020-01-15 Thread Aneesh Kumar K.V
From: Peter Zijlstra Architectures for which we have hardware walkers of Linux page table should flush TLB on mmu gather batch allocation failures and batch flush. Some architectures like POWER supports multiple translation modes (hash and radix) and in the case of POWER only radix translation mo

[PATCH v4 3/9] asm-generic/tlb: Avoid potential double flush

2020-01-15 Thread Aneesh Kumar K.V
From: Peter Zijlstra Aneesh reported that: tlb_flush_mmu() tlb_flush_mmu_tlbonly() tlb_flush() <-- #1 tlb_flush_mmu_free() tlb_table_flush() tlb_table_invalidate() tlb_flush_mmu_tlbonly()

[PATCH v4 4/9] asm-gemeric/tlb: Remove stray function declarations

2020-01-15 Thread Aneesh Kumar K.V
From: Peter Zijlstra We removed the actual functions a while ago. Fixes: 1808d65b55e4 ("asm-generic/tlb: Remove arch_tlb*_mmu()") Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Aneesh Kumar K.V --- include/asm-generic/tlb.h | 4 1 file changed, 4 deletions(-) diff --git a/include/

[PATCH v4 5/9] asm-generic/tlb: Add missing CONFIG symbol

2020-01-15 Thread Aneesh Kumar K.V
From: Peter Zijlstra Without this the symbol will not actually end up in .config files. Fixes: a30e32bd79e9 ("asm-generic/tlb: Provide generic tlb_flush() based on flush_tlb_mm()") Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Aneesh Kumar K.V --- arch/Kconfig | 3 +++ 1 file changed,

[PATCH v4 6/9] asm-generic/tlb: Rename HAVE_RCU_TABLE_FREE

2020-01-15 Thread Aneesh Kumar K.V
From: Peter Zijlstra Towards a more consistent naming scheme. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Aneesh Kumar K.V --- arch/Kconfig| 2 +- arch/arm/Kconfig| 2 +- arch/arm/include/asm/tlb.h | 2 +- arch/arm64/Kconfig |

[PATCH v4 7/9] asm-generic/tlb: Rename HAVE_MMU_GATHER_PAGE_SIZE

2020-01-15 Thread Aneesh Kumar K.V
From: Peter Zijlstra Towards a more consistent naming scheme. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Aneesh Kumar K.V --- arch/Kconfig | 2 +- arch/powerpc/Kconfig | 2 +- include/asm-generic/tlb.h | 9 ++--- mm/mmu_gather.c | 4 ++-- 4 files chan

[PATCH v4 8/9] asm-generic/tlb: Rename HAVE_MMU_GATHER_NO_GATHER

2020-01-15 Thread Aneesh Kumar K.V
From: Peter Zijlstra Towards a more consistent naming scheme. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Aneesh Kumar K.V --- arch/Kconfig | 2 +- arch/s390/Kconfig | 2 +- include/asm-generic/tlb.h | 14 -- mm/mmu_gather.c | 10 +

[PATCH v4 9/9] asm-generic/tlb: Provide MMU_GATHER_TABLE_FREE

2020-01-15 Thread Aneesh Kumar K.V
From: Peter Zijlstra As described in the comment, the correct order for freeing pages is: 1) unhook page 2) TLB invalidate page 3) free page This order equally applies to page directories. Currently there are two correct options: - use tlb_remove_page(), when all page directores are full

Re: [PATCH v4 3/9] asm-generic/tlb: Avoid potential double flush

2020-01-15 Thread Aneesh Kumar K.V
On 1/16/20 12:15 PM, Aneesh Kumar K.V wrote: From: Peter Zijlstra Aneesh reported that: tlb_flush_mmu() tlb_flush_mmu_tlbonly() tlb_flush() <-- #1 tlb_flush_mmu_free() tlb_table_flush() tlb_table_invalidate()

Re: [PATCH 7/9] powerpc/configs/skiroot: Enable security features

2020-01-15 Thread Oliver O'Halloran
On Thu, Jan 16, 2020 at 4:00 PM Daniel Axtens wrote: > > Michael Ellerman writes: > > > From: Joel Stanley > > > > This turns on HARDENED_USERCOPY with HARDENED_USERCOPY_PAGESPAN, and > > FORTIFY_SOURCE. > > > > It also enables SECURITY_LOCKDOWN_LSM with _EARLY and > > LOCK_DOWN_KERNEL_FORCE_CON

Re: [PATCH 7/9] powerpc/configs/skiroot: Enable security features

2020-01-15 Thread Joel Stanley
On Thu, 16 Jan 2020 at 07:10, Oliver O'Halloran wrote: > > On Thu, Jan 16, 2020 at 4:00 PM Daniel Axtens wrote: > > > > Michael Ellerman writes: > > > > > From: Joel Stanley > > > > > > This turns on HARDENED_USERCOPY with HARDENED_USERCOPY_PAGESPAN, and > > > FORTIFY_SOURCE. > > > > > > It als

Re: [PATCH] crypto: vmx/xts - reject inputs that are too short

2020-01-15 Thread Herbert Xu
On Wed, Jan 08, 2020 at 04:06:46PM +1100, Daniel Axtens wrote: > When the kernel XTS implementation was extended to deal with ciphertext > stealing in commit 8083b1bf8163 ("crypto: xts - add support for ciphertext > stealing"), a check was added to reject inputs that were too short. > > However, i

Re: [RFC PATCH] skiboot machine check handler

2020-01-15 Thread Mahesh J Salgaonkar
On 2019-12-11 20:01:18 Wed, Nicholas Piggin wrote: > Provide facilities to decode machine checks into human readable > strings, with only sufficient information required to deal with > them sanely. > > The old machine check stuff was over engineered. The philosophy > here is that OPAL should corre