[PATCH] powerpc/pkeys: preallocate execute_only key only if the key is available.

2018-06-19 Thread Ram Pai
Key 2 is preallocated and reserved for execute-only key. In rare cases if key-2 is unavailable, mprotect(PROT_EXEC) will behave incorrectly. NOTE: mprotect(PROT_EXEC) uses execute-only key. Ensure key 2 is available for preallocation before reserving it for execute_only purpose. CC: Michael

Re: [PATCH 3/3] powernv/cpuidle: Use parsed device tree values for cpuidle_init

2018-06-19 Thread Gautham R Shenoy
Hi Akshay, On Tue, Jun 19, 2018 at 10:34:28AM +0530, Akshay Adiga wrote: > Export pnv_idle_states and nr_pnv_idle_states so that its accessible to > cpuidle driver. Use properties from pnv_idle_states structure for powernv > cpuidle_init. > > Signed-off-by: Akshay Adiga > --- >

Re: [PATCH 2/3] cpuidle/powernv: Change platform init to avoid reparsing dt

2018-06-19 Thread Gautham R Shenoy
Hi Akshay, On Tue, Jun 19, 2018 at 10:34:27AM +0530, Akshay Adiga wrote: > The required data is accessible from cpuidle_states structure and > nr_cpu_idle_states. This patch makes changes to avoid reparsing and use > data from these structures. > > Signed-off-by: Akshay Adiga > --- >

Re: [PATCH 1/3] powernv/cpuidle: Parse dt idle properties into global structure

2018-06-19 Thread Gautham R Shenoy
Hi Akshay, On Tue, Jun 19, 2018 at 10:34:26AM +0530, Akshay Adiga wrote: > Device-tree parsing happens in twice, once while deciding idle state to > be used for hotplug and once during cpuidle init. Hence, parsing the > device tree and caching it will reduce code duplication. Parsing code > has

[PATCH] powerpc/mm: Initialize kernel pagetable memory for PTE fragments

2018-06-19 Thread Anshuman Khandual
Kernel pagetable pages for PTE fragments never go through the standard init sequence which can cause inaccuracies in utilization statistics reported at places like /proc and /sysfs interfaces etc. Also the allocated page misses out on pagetable lock and page flag init as well. Fix it by making

Re: [PATCH] ocxl: Fix page fault handler in case of fault on dying process

2018-06-19 Thread Alastair D'Silva
On Mon, 2018-06-18 at 14:14 +0200, Frederic Barrat wrote: > If a process exits without doing proper cleanup, there's a window > where an opencapi device can try to access the memory of the dying > process and may trigger a page fault. That's an expected scenario and > the ocxl driver holds a

Re: [PATCH kernel 1/2] vfio/spapr: Use IOMMU pageshift rather than pagesize

2018-06-19 Thread David Gibson
On Tue, Jun 19, 2018 at 06:44:13PM +1000, Alexey Kardashevskiy wrote: > The size is always equal to 1 page so let's use this. Later on this will > be used for other checks which use page shifts to check the granularity > of access. > > This should cause no behavioral change. > > Signed-off-by:

Re: [RFC PATCH 17/23] watchdog/hardlockup/hpet: Convert the timer's interrupt to NMI

2018-06-19 Thread Randy Dunlap
On 06/19/2018 05:15 PM, Ricardo Neri wrote: > On Sat, Jun 16, 2018 at 03:24:49PM +0200, Thomas Gleixner wrote: >> On Fri, 15 Jun 2018, Ricardo Neri wrote: >>> On Fri, Jun 15, 2018 at 11:19:09AM +0200, Thomas Gleixner wrote: On Thu, 14 Jun 2018, Ricardo Neri wrote: > Alternatively, there

Re: [RFC PATCH 17/23] watchdog/hardlockup/hpet: Convert the timer's interrupt to NMI

2018-06-19 Thread Ricardo Neri
On Sat, Jun 16, 2018 at 03:24:49PM +0200, Thomas Gleixner wrote: > On Fri, 15 Jun 2018, Ricardo Neri wrote: > > On Fri, Jun 15, 2018 at 11:19:09AM +0200, Thomas Gleixner wrote: > > > On Thu, 14 Jun 2018, Ricardo Neri wrote: > > > > Alternatively, there could be a counter that skips reading the

Re: [git pull] Please pull powerpc.git next branch

2018-06-19 Thread Benjamin Herrenschmidt
On Wed, 2018-06-20 at 07:58 +0900, Linus Torvalds wrote: > On Wed, Jun 20, 2018 at 5:23 AM Benjamin Herrenschmidt > wrote: > > > > git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git merge > > I love the alleged line removal, but there's nothing in that 'merge' > branch. It points

Re: Constant ata messages on console with commit 28361c403683 ("libata: add extra internal command") (was Re: [GIT PULL 2/2] libata changes for v4.18-rc1)

2018-06-19 Thread Jens Axboe
On 6/19/18 5:35 PM, Michael Ellerman wrote: > Jens Axboe writes: >> On 6/19/18 1:29 AM, Michael Ellerman wrote: >>> Jens Axboe writes: On 6/18/18 1:33 AM, Michael Ellerman wrote: > Tejun Heo writes: > ... >> Jens Axboe (10): >> libata: introduce notion of separate

Re: Constant ata messages on console with commit 28361c403683 ("libata: add extra internal command") (was Re: [GIT PULL 2/2] libata changes for v4.18-rc1)

2018-06-19 Thread Michael Ellerman
Jens Axboe writes: > On 6/19/18 1:29 AM, Michael Ellerman wrote: >> Jens Axboe writes: >>> On 6/18/18 1:33 AM, Michael Ellerman wrote: Tejun Heo writes: ... > Jens Axboe (10): > libata: introduce notion of separate hardware tags > libata: convert core and

Re: [v3] powerpc/64s/radix: Fix MADV_[FREE|DONTNEED] TLB flush miss problem with THP

2018-06-19 Thread Michael Ellerman
On Fri, 2018-06-15 at 01:38:37 UTC, Nicholas Piggin wrote: > The patch 99baac21e4 ("mm: fix MADV_[FREE|DONTNEED] TLB flush miss > problem") added a force flush mode to the mmu_gather flush, which > unconditionally flushes the entire address range being invalidated > (even if actual ptes only

Re: powerpc/e500mc: Set assembler machine type to e500mc

2018-06-19 Thread Michael Ellerman
On Thu, 2018-06-14 at 15:27:42 UTC, Michael Jeanson wrote: > In binutils 2.26 a new opcode for the "wait" instruction was added for the > POWER9 and has precedence over the one specific to the e500mc. Commit > ebf714ff3756 ("powerpc/e500mc: Add support for the wait instruction in > e500_idle")

Re: powerpc/64s: Fix DT CPU features Power9 DD2.1 logic

2018-06-19 Thread Michael Ellerman
On Wed, 2018-06-13 at 13:23:56 UTC, Michael Ellerman wrote: > In the device tree CPU features quirk code we want to set > CPU_FTR_POWER9_DD2_1 on all Power9s that aren't DD2.0 or earlier. But > we got the logic wrong and instead set it on all CPUs that aren't > Power9 DD2.0 or earlier, ie.

Re: [1/3] powerpc/64: hard disable irqs in panic_smp_self_stop

2018-06-19 Thread Michael Ellerman
On Sat, 2018-05-19 at 04:35:52 UTC, Nicholas Piggin wrote: > Similarly to commit 855bfe0de1 ("powerpc: hard disable irqs in > smp_send_stop loop"), irqs should be hard disabled by > panic_smp_self_stop. > > Signed-off-by: Nicholas Piggin Series applied to powerpc fixes, thanks.

[PATCH] powerpc/64s: Fix build failures with CONFIG_NMI_IPI=n

2018-06-19 Thread Michael Ellerman
I broke the build when CONFIG_NMI_IPI=n with my recent commit to add arch_trigger_cpumask_backtrace(), eg: stacktrace.c:(.text+0x1b0): undefined reference to `.smp_send_safe_nmi_ipi' We should rework the CONFIG symbols here in future to avoid these double barrelled ifdefs but for now they fix

Re: [git pull] Please pull powerpc.git next branch

2018-06-19 Thread Linus Torvalds
On Wed, Jun 20, 2018 at 5:23 AM Benjamin Herrenschmidt wrote: > > git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git merge I love the alleged line removal, but there's nothing in that 'merge' branch. It points to an ancient powerpc commit from 2016. And please, signed tags. I know

Re: [PATCH] Revert "net: pskb_trim_rcsum() and CHECKSUM_COMPLETE are friends"

2018-06-19 Thread Eric Dumazet
On 06/19/2018 03:32 PM, Andreas Schwab wrote: > On Jun 19 2018, Eric Dumazet wrote: > >> diff --git a/drivers/net/ethernet/sun/sungem.c >> b/drivers/net/ethernet/sun/sungem.c >> index >> 7a16d40a72d13cf1d522e8a3a396c826fe76f9b9..672d6748ab44f0890e92d5ca55d6ff6834c20dc9 >> 100644 >> ---

Re: [PATCH] Revert "net: pskb_trim_rcsum() and CHECKSUM_COMPLETE are friends"

2018-06-19 Thread Andreas Schwab
On Jun 19 2018, Eric Dumazet wrote: > diff --git a/drivers/net/ethernet/sun/sungem.c > b/drivers/net/ethernet/sun/sungem.c > index > 7a16d40a72d13cf1d522e8a3a396c826fe76f9b9..672d6748ab44f0890e92d5ca55d6ff6834c20dc9 > 100644 > --- a/drivers/net/ethernet/sun/sungem.c > +++

Re: [PATCH] Revert "net: pskb_trim_rcsum() and CHECKSUM_COMPLETE are friends"

2018-06-19 Thread Eric Dumazet
On 06/19/2018 01:10 PM, Eric Dumazet wrote: > > > On 06/19/2018 12:10 PM, Andreas Schwab wrote: >> On Jun 18 2018, Eric Dumazet wrote: >> >>> DUMP_PREFIX_ADDRESS might give us more information (say alignment problem, >>> or crossing page boundaries) >> >> DUMP_PREFIX_ADDRESS is useless for

Re: [PATCH] arch: powerpc: pci-common: fix wrong return value check on phd_id

2018-06-19 Thread Guilherme G. Piccoli
> [...] > What your doing is changing the phb_id to some transformation of "reg" for > all platforms except which have "ibm,opal-phbid". This is what we observe. > This is a radical altering of the prior phb_id selection before your patch. > > The question is, was that your intent ? We are

Re: [PATCH 3/3] m68k: remove unused set_clock_mmss() helpers

2018-06-19 Thread Greg Ungerer
Hi Arnd, On 19/06/18 00:05, Arnd Bergmann wrote: Commit 397ac99c6cef ("m68k: remove dead timer code") removed set_rtc_mmss() because it was unused in 2012. However, this was itself the only user of the mach_set_clock_mmss() callback and the many implementations of that callback, which are

[PATCH] powerpc: enable kernel XZ compression option on BOOK3S_32

2018-06-19 Thread Aaro Koskinen
Enable kernel XZ compression option on BOOK3S_32. Tested on G4 PowerBook. Signed-off-by: Aaro Koskinen --- arch/powerpc/platforms/Kconfig.cputype | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype index

Re: [git pull] Please pull powerpc.git next branch

2018-06-19 Thread Grant Likely
On Sun, Aug 8, 2010 at 10:11 PM, Benjamin Herrenschmidt wrote: > Hi Linus ! > > Here's a few misc things for .36. The big bit is that I trimmed all the > defconfigs using make savedefconfig. [...] >  108 files changed, 270 insertions(+), 134609 deletions(-) And how is anyone else to make it into

[git pull] Please pull powerpc.git next branch

2018-06-19 Thread Benjamin Herrenschmidt
Hi Linus ! Here's a few misc things for .36. The big bit is that I trimmed all the defconfigs using make savedefconfig. Then there's a revert for a change to the appletouch driver that went in .34 but broke quite a few powerbooks around. Since the original problem this was trying to address is

Re: [git pull] Please pull powerpc.git next branch

2018-06-19 Thread Benjamin Herrenschmidt
On Mon, 2010-08-09 at 14:11 +1000, Benjamin Herrenschmidt wrote: > Hi Linus ! > > Here's a few misc things for .36. The big bit is that I trimmed all the > defconfigs using make savedefconfig. > > Then there's a revert for a change to the appletouch driver that went > in .34 but broke quite a

[PATCH v2 3/3] powerpc: Remove -Wattribute-alias pragmas

2018-06-19 Thread Paul Burton
With SYSCALL_DEFINEx() disabling -Wattribute-alias generically, there's no need to duplicate that for PowerPC syscalls. This reverts commit 415520373975 ("powerpc: fix build failure by disabling attribute-alias warning in pci_32") and commit 2479bfc9bc60 ("powerpc: Fix build by disabling

[PATCH v2 2/3] disable -Wattribute-alias warning for SYSCALL_DEFINEx()

2018-06-19 Thread Paul Burton
From: Arnd Bergmann gcc-8 warns for every single definition of a system call entry point, e.g.: include/linux/compat.h:56:18: error: 'compat_sys_rt_sigprocmask' alias between functions of incompatible types 'long int(int, compat_sigset_t *, compat_sigset_t *, compat_size_t)' {aka 'long

[PATCH v2 1/3] kbuild: add macro for controlling warnings to linux/compiler.h

2018-06-19 Thread Paul Burton
From: Arnd Bergmann I have occasionally run into a situation where it would make sense to control a compiler warning from a source file rather than doing so from a Makefile using the $(cc-disable-warning, ...) or $(cc-option, ...) helpers. The approach here is similar to what glibc uses, using

[PATCH v2 0/3] Resolve -Wattribute-alias warnings from SYSCALL_DEFINEx()

2018-06-19 Thread Paul Burton
This series introduces infrastructure allowing compiler diagnostics to be disabled or their severity modified for specific pieces of code, with suitable abstractions to prevent that code from becoming tied to a specific compiler. This infrastructure is then used to disable the -Wattribute-alias

Re: [PATCH] Revert "net: pskb_trim_rcsum() and CHECKSUM_COMPLETE are friends"

2018-06-19 Thread Eric Dumazet
On 06/19/2018 12:10 PM, Andreas Schwab wrote: > On Jun 18 2018, Eric Dumazet wrote: > >> DUMP_PREFIX_ADDRESS might give us more information (say alignment problem, >> or crossing page boundaries) > > DUMP_PREFIX_ADDRESS is useless for that purpose. > > Here are some samples of broken

Re: [PATCH v1] mm: relax deferred struct page requirements

2018-06-19 Thread Pavel Tatashin
On Tue, Jun 19, 2018 at 9:50 AM Pavel Tatashin wrote: > > On Sat, Jun 16, 2018 at 4:04 AM Jiri Slaby wrote: > > > > On 11/21/2017, 08:24 AM, Michal Hocko wrote: > > > On Thu 16-11-17 20:46:01, Pavel Tatashin wrote: > > >> There is no need to have ARCH_SUPPORTS_DEFERRED_STRUCT_PAGE_INIT, > > >>

[PATCH 1/2] powerpc: Flush checkpointed gpr state for 32-bit processes in ptrace

2018-06-19 Thread Pedro Franco de Carvalho
Would something like this be ok? I factored out the calls to flush_fp_to_thread and flush_altivec_to_thread, although I don't really understand why these are necessary. The tm_cvsx_get/set functions also calls flush_vsx_to_thread (outside of the helper function). I also noticed that

[PATCH 2/2] powerpc: Use helper function to flush TM state in ptrace

2018-06-19 Thread Pedro Franco de Carvalho
This patch updates the get/set regset functions that flush tm, fpu and altvec state when TM is available and active to use a helper function. Signed-off-by: Pedro Franco de Carvalho --- arch/powerpc/kernel/ptrace.c | 104 --- 1 file changed, 28

Re: [PATCH] Revert "net: pskb_trim_rcsum() and CHECKSUM_COMPLETE are friends"

2018-06-19 Thread Andreas Schwab
On Jun 18 2018, Eric Dumazet wrote: > DUMP_PREFIX_ADDRESS might give us more information (say alignment problem, or > crossing page boundaries) DUMP_PREFIX_ADDRESS is useless for that purpose. Here are some samples of broken csums: [ 853.849225] sungem: sungem wrong csum : 9886/07be, len 94

Re: [PATCH 1/3] kbuild: add macro for controlling warnings to linux/compiler.h

2018-06-19 Thread Paul Burton
Hi Masahiro, On Wed, Jun 20, 2018 at 02:34:35AM +0900, Masahiro Yamada wrote: > 2018-06-16 9:53 GMT+09:00 Paul Burton : > > diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h > > index f1a7492a5cc8..aba64a2912d8 100644 > > --- a/include/linux/compiler-gcc.h > > +++

Re: [PATCH 1/3] kbuild: add macro for controlling warnings to linux/compiler.h

2018-06-19 Thread Masahiro Yamada
Hi. 2018-06-16 9:53 GMT+09:00 Paul Burton : > From: Arnd Bergmann > > I have occasionally run into a situation where it would make sense to > control a compiler warning from a source file rather than doing so from > a Makefile using the $(cc-disable-warning, ...) or $(cc-option, ...) > helpers.

Re: [PATCH] QE GPIO: Add qe_gpio_set_multiple

2018-06-19 Thread Scott Wood
On Tue, 2018-06-19 at 16:38 +, York Sun wrote: > On 06/19/2018 09:22 AM, Joakim Tjernlund wrote: > > This cousin to gpio-mpc8xxx was lacking a multiple pins method, > > add one. > > > > Signed-off-by: Joakim Tjernlund > > --- > > drivers/soc/fsl/qe/gpio.c | 28 >

Re: [PATCH] arch: powerpc: pci-common: fix wrong return value check on phd_id

2018-06-19 Thread Daniel Walker
On 06/19/2018 09:26 AM, Guilherme G. Piccoli wrote: [...] What your doing is changing the phb_id to some transformation of "reg" for all platforms except which have "ibm,opal-phbid". This is what we observe. This is a radical altering of the prior phb_id selection before your patch. The

Re: [PATCH v2 4/6] powerpc/pkeys: Preallocate execute-only key

2018-06-19 Thread Ram Pai
On Tue, Jun 19, 2018 at 10:40:13PM +1000, Michael Ellerman wrote: > Ram Pai writes: > > > execute-only key is allocated dynamically. This is a problem. When a > > thread implicitly creates a execute-only key, and resets UAMOR for that > > key, the UAMOR value does not percolate to all the other

Re: [PATCH] QE GPIO: Add qe_gpio_set_multiple

2018-06-19 Thread York Sun
On 06/19/2018 09:22 AM, Joakim Tjernlund wrote: > This cousin to gpio-mpc8xxx was lacking a multiple pins method, > add one. > > Signed-off-by: Joakim Tjernlund > --- > drivers/soc/fsl/qe/gpio.c | 28 > 1 file changed, 28 insertions(+) > Joakim, I am not the

Re: [PATCH v2 5/6] powerpc/pkeys: make protection key 0 less special

2018-06-19 Thread Ram Pai
On Tue, Jun 19, 2018 at 10:40:08PM +1000, Michael Ellerman wrote: > Ram Pai writes: > > Applications need the ability to associate an address-range with some > > key and latter revert to its initial default key. Pkey-0 comes close to > > providing this function but falls short, because the

Re: [PATCH v2 6/6] powerpc/pkeys: Deny read/write/execute by default

2018-06-19 Thread Ram Pai
On Tue, Jun 19, 2018 at 10:39:59PM +1000, Michael Ellerman wrote: > Ram Pai writes: > > Deny all permissions on all keys, with some exceptions. pkey-0 must > > allow all permissions, or else everything comes to a screaching halt. > > Execute-only key must allow execute permission. > > Another

[PATCH] spi/fsl-espi: Add missing cell-index OF property

2018-06-19 Thread Joakim Tjernlund
espi does not look for a OF cell-index property which makes the bus numbering dynamic only. This add an optional cell-index. Signed-off-by: Joakim Tjernlund --- drivers/spi/spi-fsl-espi.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/spi/spi-fsl-espi.c

[PATCH] QE GPIO: Add qe_gpio_set_multiple

2018-06-19 Thread Joakim Tjernlund
This cousin to gpio-mpc8xxx was lacking a multiple pins method, add one. Signed-off-by: Joakim Tjernlund --- drivers/soc/fsl/qe/gpio.c | 28 1 file changed, 28 insertions(+) diff --git a/drivers/soc/fsl/qe/gpio.c b/drivers/soc/fsl/qe/gpio.c index

Re: [PATCH] spi/fsl-espi: Add missing cell-index OF property

2018-06-19 Thread York Sun
Joakim, I am not the maintainer for this driver. Adding Mark Brown. York On 06/19/2018 09:23 AM, Joakim Tjernlund wrote: > espi does not look for a OF cell-index property which > makes the bus numbering dynamic only. This add an > optional cell-index. > > Signed-off-by: Joakim Tjernlund > ---

[PATCH -tip v6 24/27] bpf: error-inject: kprobes: Clear current_kprobe and enable preempt in kprobe

2018-06-19 Thread Masami Hiramatsu
Clear current_kprobe and enable preemption in kprobe even if pre_handler returns !0. This simplifies function override using kprobes. Jprobe used to require to keep the preemption disabled and keep current_kprobe until it returned to original function entry. For this reason kprobe_int3_handler()

[PATCH -tip v6 18/27] powerpc/kprobes: Don't call the ->break_handler() in powerpc kprobes code

2018-06-19 Thread Masami Hiramatsu
Don't call the ->break_handler() from the powerpc kprobes code, because it was only used by jprobes which got removed. This also removes skip_singlestep() and embeds it in the caller, kprobe_ftrace_handler(), which simplifies regs->nip operation around there. Signed-off-by: Masami Hiramatsu

[PATCH -tip v6 07/27] powerpc/kprobes: Remove jprobe powerpc implementation

2018-06-19 Thread Masami Hiramatsu
Remove arch dependent setjump/longjump functions and unused fields in kprobe_ctlblk for jprobes from arch/powerpc. This also reverts commits related __is_active_jprobe() function. Signed-off-by: Masami Hiramatsu Acked-by: "Naveen N. Rao" Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc:

Re: Constant ata messages on console with commit 28361c403683 ("libata: add extra internal command") (was Re: [GIT PULL 2/2] libata changes for v4.18-rc1)

2018-06-19 Thread Jens Axboe
On 6/19/18 1:29 AM, Michael Ellerman wrote: > Jens Axboe writes: >> On 6/18/18 1:33 AM, Michael Ellerman wrote: >>> Tejun Heo writes: >>> ... Jens Axboe (10): libata: introduce notion of separate hardware tags libata: convert core and drivers to ->hw_tag usage

Re: [PATCH] arch: powerpc: pci-common: fix wrong return value check on phd_id

2018-06-19 Thread Guilherme Piccoli
On Mon, Jun 18, 2018 at 1:57 PM, Daniel Walker wrote: > Cisco has a couple platforms which depend on the domain values getting > set a certain way. We discovered our machines not detecting the pci > devices, and traced it back to this commit, > > 63a7228 powerpc/pci: Assign fixed PHB number based

Re: Constant ata messages on console with commit 28361c403683 ("libata: add extra internal command") (was Re: [GIT PULL 2/2] libata changes for v4.18-rc1)

2018-06-19 Thread Jens Axboe
On 6/19/18 1:29 AM, Michael Ellerman wrote: > Jens Axboe writes: >> On 6/18/18 1:33 AM, Michael Ellerman wrote: >>> Tejun Heo writes: >>> ... Jens Axboe (10): libata: introduce notion of separate hardware tags libata: convert core and drivers to ->hw_tag usage

Re: [PATCH v2 2/6] powerpc/pkeys: Save the pkey registers before fork

2018-06-19 Thread Ram Pai
On Tue, Jun 19, 2018 at 10:39:56PM +1000, Michael Ellerman wrote: > Ram Pai writes: > > > When a thread forks the contents of AMR, IAMR, UAMOR registers in the > > newly forked thread are not inherited. > > > > Save the registers before forking, for content of those > > registers to be

Re: [PATCH v2 1/6] powerpc/pkeys: Enable all user-allocatable pkeys at init.

2018-06-19 Thread Ram Pai
On Tue, Jun 19, 2018 at 10:39:52PM +1000, Michael Ellerman wrote: > Ram Pai writes: > > > In a multithreaded application, a key allocated by one thread must > > be activate and usable on all threads. > > > > Currently this is not the case, because the UAMOR bits for all keys are > > disabled by

[PATCH 3/3] [v2] m68k: remove unused set_clock_mmss() helpers

2018-06-19 Thread Arnd Bergmann
Commit 397ac99c6cef ("m68k: remove dead timer code") removed set_rtc_mmss() because it was unused in 2012. However, this was itself the only user of the mach_set_clock_mmss() callback and the many implementations of that callback, which are equally unused. This removes all of those as well.

[PATCH 1/3] [v2] powerpc: mac: fix rtc read/write functions

2018-06-19 Thread Arnd Bergmann
As Mathieu pointed out, my conversion to time64_t was incorrect and resulted in negative times to be read from the RTC. The problem is that during the conversion from a byte array to a time64_t, the 'unsigned char' variable holding the top byte gets turned into a negative signed 32-bit integer

[PATCH 2/3] [v2] m68k: mac: use time64_t in RTC handling

2018-06-19 Thread Arnd Bergmann
The real-time clock on m68k (and powerpc) mac systems uses an unsigned 32-bit value starting in 1904, which overflows in 2040, about two years later than everyone else, but this gets wrapped around in the Linux code in 2038 already because of the deprecated usage of time_t and/or long in the

Re: [PATCH v1] mm: relax deferred struct page requirements

2018-06-19 Thread Pavel Tatashin
On Sat, Jun 16, 2018 at 4:04 AM Jiri Slaby wrote: > > On 11/21/2017, 08:24 AM, Michal Hocko wrote: > > On Thu 16-11-17 20:46:01, Pavel Tatashin wrote: > >> There is no need to have ARCH_SUPPORTS_DEFERRED_STRUCT_PAGE_INIT, > >> as all the page initialization code is in common code. > >> > >> Also,

Re: [PATCH] powerpc/mm/hash/4k: Free hugetlb page table caches correctly.

2018-06-19 Thread Aneesh Kumar K.V
On 06/19/2018 04:47 PM, Michael Ellerman wrote: "Aneesh Kumar K.V" writes: With 4k page size for hugetlb we allocate hugepage directories from its on slab cache. With patch 0c4d26802 ("powerpc/book3s64/mm: Simplify the rcu callback for page table free") we missed to free these allocated

Re: [PATCH v2 6/6] powerpc/pkeys: Deny read/write/execute by default

2018-06-19 Thread Florian Weimer
On 06/19/2018 02:39 PM, Michael Ellerman wrote: Ram Pai writes: Deny all permissions on all keys, with some exceptions. pkey-0 must allow all permissions, or else everything comes to a screaching halt. Execute-only key must allow execute permission. Another ABI change. Are we calling this

Re: [PATCH 3/3] Revert "powerpc: fix build failure by disabling attribute-alias warning in pci_32"

2018-06-19 Thread Michael Ellerman
Paul Burton writes: > With SYSCALL_DEFINEx() disabling -Wattribute-alias generically, there's > no need to duplicate that for PowerPC's pciconfig_iobase syscall. > > This reverts commit 415520373975 ("powerpc: fix build failure by > disabling attribute-alias warning in pci_32"). > >

Re: [PATCH] misc: ocxl: Change return type for fault handler

2018-06-19 Thread Michael Ellerman
Souptick Joarder writes: > On Thu, Jun 14, 2018 at 9:36 PM, Frederic Barrat > wrote: >> Le 11/06/2018 à 22:29, Souptick Joarder a écrit : >>> >>> Use new return type vm_fault_t for fault handler. For >>> now, this is just documenting that the function returns >>> a VM_FAULT value rather than an

Re: [PATCH v2 3/6] powerpc/pkeys: fix calculation of total pkeys.

2018-06-19 Thread Michael Ellerman
Ram Pai writes: > Total number of pkeys calculation is off by 1. Fix it. Oops. Fixes: 4fb158f65ac5 ("powerpc: track allocation status of all pkeys") Cc: sta...@vger.kernel.org # v4.16+ cheers

Re: [PATCH v2 4/6] powerpc/pkeys: Preallocate execute-only key

2018-06-19 Thread Michael Ellerman
Ram Pai writes: > execute-only key is allocated dynamically. This is a problem. When a > thread implicitly creates a execute-only key, and resets UAMOR for that > key, the UAMOR value does not percolate to all the other threads. Any > other thread may ignorantly change the permissions on the

Re: [PATCH v2 5/6] powerpc/pkeys: make protection key 0 less special

2018-06-19 Thread Michael Ellerman
Ram Pai writes: > Applications need the ability to associate an address-range with some > key and latter revert to its initial default key. Pkey-0 comes close to > providing this function but falls short, because the current > implementation disallows applications to explicitly associate pkey-0

Re: [PATCH v2 0/6] powerpc/pkeys: fixes to pkeys

2018-06-19 Thread Michael Ellerman
Florian Weimer writes: > On 06/14/2018 02:28 AM, Ram Pai wrote: >> Assortment of fixes to pkey. >> >> Patch 1 makes pkey consumable in multithreaded applications. >> >> Patch 2 fixes fork behavior to inherit the key attributes. >> >> Patch 3 A off-by-one bug made one key unusable. Fixes it.

Re: [PATCH v2 6/6] powerpc/pkeys: Deny read/write/execute by default

2018-06-19 Thread Michael Ellerman
Ram Pai writes: > Deny all permissions on all keys, with some exceptions. pkey-0 must > allow all permissions, or else everything comes to a screaching halt. > Execute-only key must allow execute permission. Another ABI change. Are we calling this a bug fix? cheers

Re: [PATCH v2 2/6] powerpc/pkeys: Save the pkey registers before fork

2018-06-19 Thread Michael Ellerman
Ram Pai writes: > When a thread forks the contents of AMR, IAMR, UAMOR registers in the > newly forked thread are not inherited. > > Save the registers before forking, for content of those > registers to be automatically copied into the new thread. > > CC: Michael Ellerman > CC: Florian Weimer

Re: [PATCH v2 1/6] powerpc/pkeys: Enable all user-allocatable pkeys at init.

2018-06-19 Thread Michael Ellerman
Ram Pai writes: > In a multithreaded application, a key allocated by one thread must > be activate and usable on all threads. > > Currently this is not the case, because the UAMOR bits for all keys are > disabled by default. When a new key is allocated in one thread, though > the corresponding

Re: stacktrace.c:(.text+0x1b0): undefined reference to `.smp_send_safe_nmi_ipi'

2018-06-19 Thread Michael Ellerman
Christophe LEROY writes: > See http://kisskb.ellerman.id.au/kisskb/buildresult/13395345/ for details > > Seems like that function only exists when CONFIG_NMI_IPI is defined. > > Problem introduced by commit 5cc05910f26e6fd6da15f052f86f6150e4b91664 >

Re: [PATCH] powerpc/mm/hash/4k: Free hugetlb page table caches correctly.

2018-06-19 Thread Michael Ellerman
"Aneesh Kumar K.V" writes: > With 4k page size for hugetlb we allocate hugepage directories from its on > slab > cache. With patch 0c4d26802 ("powerpc/book3s64/mm: Simplify the rcu callback > for page table free") > we missed to free these allocated hugepd tables. > > Update pgtable_free to

Re: [PATCH 1/3] powerpc: mac: fix rtc read functions

2018-06-19 Thread Arnd Bergmann
On Mon, Jun 18, 2018 at 10:04 PM, Andreas Schwab wrote: > On Jun 18 2018, Mathieu Malaterre wrote: > >> Sadly, trying again today does not work anymore. Adding some printk >> just before WARN_ON: >> >> +printk(KERN_ERR " rtc DBG pmu_get_time1: %lld %d %lld \n", now, >> RTC_OFFSET, now -

[PATCH kernel 2/2] KVM: PPC: Check if IOMMU page is contained in the pinned physical page

2018-06-19 Thread Alexey Kardashevskiy
We already have a check in drivers/vfio/vfio_iommu_spapr_tce.c that an IOMMU page is contained in the physical page so the PCI hardware won't get access to unassigned host memory. However we do not have this check in KVM fastpath (H_PUT_TCE accelerated code) so the user space can pin memory

[PATCH kernel 0/2] KVM: PPC: Check if IOMMU page is contained in the pinned physical page

2018-06-19 Thread Alexey Kardashevskiy
This is to improve page boundaries checking and should probably be cc:stable. I came accross this while debugging nvlink2 passthrough but the lack of checking might be exploited by the existing userspace. Please comment. Thanks. Alexey Kardashevskiy (2): vfio/spapr: Use IOMMU pageshift

[PATCH kernel 1/2] vfio/spapr: Use IOMMU pageshift rather than pagesize

2018-06-19 Thread Alexey Kardashevskiy
The size is always equal to 1 page so let's use this. Later on this will be used for other checks which use page shifts to check the granularity of access. This should cause no behavioral change. Signed-off-by: Alexey Kardashevskiy --- drivers/vfio/vfio_iommu_spapr_tce.c | 8 1 file

Re: Constant ata messages on console with commit 28361c403683 ("libata: add extra internal command") (was Re: [GIT PULL 2/2] libata changes for v4.18-rc1)

2018-06-19 Thread Michael Ellerman
Jens Axboe writes: > On 6/18/18 1:33 AM, Michael Ellerman wrote: >> Tejun Heo writes: >> ... >>> Jens Axboe (10): >>> libata: introduce notion of separate hardware tags >>> libata: convert core and drivers to ->hw_tag usage >>> libata: bump ->qc_active to a 64-bit type >>>

Re: Build regressions/improvements in v4.18-rc1

2018-06-19 Thread Geert Uytterhoeven
Hi Michael, On Tue, Jun 19, 2018 at 8:35 AM Michael Ellerman wrote: > Geert Uytterhoeven writes: > > On Mon, Jun 18, 2018 at 11:18 AM Geert Uytterhoeven > > wrote: > >> Below is the list of build error/warning regressions/improvements in > >> v4.18-rc1[1] compared to v4.17[2]. > >> +

Re: Build regressions/improvements in v4.18-rc1

2018-06-19 Thread Michael Ellerman
Geert Uytterhoeven writes: > On Mon, Jun 18, 2018 at 11:18 AM Geert Uytterhoeven > wrote: >> Below is the list of build error/warning regressions/improvements in >> v4.18-rc1[1] compared to v4.17[2]. >> >> Summarized: >> - build errors: +11/-1 > >> [1] >>