Re: ppc64le reliable stack unwinder and scheduled tasks

2019-01-10 Thread Nicolai Stange
Joe Lawrence writes: > On Fri, Jan 11, 2019 at 01:00:38AM +0100, Nicolai Stange wrote: >> Hi Joe, >> >> Joe Lawrence writes: >> >> > tl;dr: On ppc64le, what is top-most stack frame for scheduled tasks >> >about? >> >> If I'm reading the code in _switch() correctly, the first frame is

Re: Kconfig label updates

2019-01-10 Thread Michael Ellerman
Tyrel Datwyler writes: > On 01/09/2019 04:37 AM, Michael Ellerman wrote: >> Bjorn Helgaas writes: >>> I want to update the PCI Kconfig labels so they're more consistent and >>> useful to users, something like the patch below. IIUC, the items >>> below are all IBM-related; please correct me if

Re: Patch series for 4.19 to compile powerpc with Clang

2019-01-10 Thread Greg Kroah-Hartman
On Thu, Jan 10, 2019 at 10:17:38AM -0700, Nathan Chancellor wrote: > Hi Greg and Sasha, > > Attached is an mbox with a series of patches to allow building the > powerpc kernel with Clang. We have been running continuous integration > that builds and boots the kernel in QEMU for almost two months

Re: [RFC PATCH kernel] powerpc/stack_protector: Fix external modules building

2019-01-10 Thread Michael Ellerman
Masahiro Yamada writes: > On Thu, Jan 10, 2019 at 2:44 PM Alexey Kardashevskiy wrote: ... >> diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile >> index 488c9ed..0492f62 100644 >> --- a/arch/powerpc/Makefile >> +++ b/arch/powerpc/Makefile >> @@ -419,7 +419,11 @@ archheaders: >> ifdef

Re: [PATCH 04/19] KVM: PPC: Book3S HV: export services for the XIVE native exploitation device

2019-01-10 Thread David Gibson
On Mon, Jan 07, 2019 at 07:43:16PM +0100, Cédric Le Goater wrote: > The KVM device for the XIVE native exploitation mode will reuse the > structures of the XICS-over-XIVE glue implementation. Some code will > also be shared : source block creation and destruction, target > selection and escalation

Re: [RFC PATCH kernel] powerpc/stack_protector: Fix external modules building

2019-01-10 Thread Alexey Kardashevskiy
On 11/01/2019 14:08, Masahiro Yamada wrote: > On Thu, Jan 10, 2019 at 2:44 PM Alexey Kardashevskiy wrote: >> >> c3ff2a519 "powerpc/32: add stack protector support" addes stack protector >> support so now powerpc's "prepare" target depends on prepare0 (via >> stack_protector_prepare target). >>

[PATCH 2/3] powerpc: remove redundant header search path additions

2019-01-10 Thread Masahiro Yamada
The same path -Iarch/$(ARCH) is passed to KBUILD_CPPFLAGS, KBUILD_AFLAGS, and KBUILD_CFLAGS. As you see in scripts/Makefile.lib, KBUILD_CPPFLAGS is passed to c_flags and a_flags as well. Passing it to KBUILD_CPPFLAGS is enough. Signed-off-by: Masahiro Yamada --- arch/powerpc/Makefile | 4

[PATCH 0/3] powerpc: some header search path cleanups

2019-01-10 Thread Masahiro Yamada
I am trying to get rid of crappy magic from Kbuild core makefiles. Before that, I want to drop as many useless paths as possible. Actually, many Makefiles are adding around pointless options. This series cleans some powerpc Makefiles. (only compile-tested by 0day bot) Masahiro Yamada (3):

[PATCH 1/3] KVM: powerpc: remove -I. header search paths

2019-01-10 Thread Masahiro Yamada
The header search path -I. in kernel Makefiles is very suspicious; it allows the compiler to search for headers in the top of $(srctree), where obviously no header file exists. Commit 46f43c6ee022 ("KVM: powerpc: convert marker probes to event trace") first added these options, but they are

[PATCH 3/3] powerpc: math-emu: remove unneeded header search paths

2019-01-10 Thread Masahiro Yamada
The header search path -I. in kernel Makefiles is very suspicious; it allows the compiler to search for headers in the top of $(srctree), where obviously no header file exists. -Iinclude/math-emu seems unnecessary because all files include headers in the form of #include . I was able to build

Re: [RFC PATCH kernel] powerpc/stack_protector: Fix external modules building

2019-01-10 Thread Masahiro Yamada
On Thu, Jan 10, 2019 at 2:44 PM Alexey Kardashevskiy wrote: > > c3ff2a519 "powerpc/32: add stack protector support" addes stack protector > support so now powerpc's "prepare" target depends on prepare0 (via > stack_protector_prepare target). > > It works fine until we try build an external module

Re: [PATCH] soc: fsl: guts: us devm_kstrdup_const() for RO data

2019-01-10 Thread Nicholas Mc Guire
On Thu, Jan 10, 2019 at 01:43:01PM -0600, Li Yang wrote: > On Sat, Dec 22, 2018 at 2:02 AM Nicholas Mc Guire wrote: > > > > On Fri, Dec 21, 2018 at 08:29:56PM -0600, Scott Wood wrote: > > > On Fri, 2018-12-07 at 09:22 +0100, Nicholas Mc Guire wrote: > > > > devm_kstrdup() may return NULL if

Re: [PATCH] powerpc/powernv/npu: Allocate enough memory in pnv_try_setup_npu_table_group()

2019-01-10 Thread Alexey Kardashevskiy
On 09/01/2019 22:54, Michael Ellerman wrote: > Dan Carpenter writes: >> There is a typo so we accidentally allocate enough memory for a pointer >> when we wanted to allocate enough for a struct. >> >> Fixes: 0bd971676e68 ("powerpc/powernv/npu: Add compound IOMMU groups") >> Signed-off-by: Dan

Re: use generic DMA mapping code in powerpc V4

2019-01-10 Thread Christian Zigotzky
Next step: 891dcc1072f1fa27a83da920d88daff6ca08fc02 (powerpc/dma: remove dma_nommu_dma_supported) git clone git://git.infradead.org/users/hch/misc.git -b powerpc-dma.6 a git checkout 891dcc1072f1fa27a83da920d88daff6ca08fc02 Output: Note: checking out

Re: ppc64le reliable stack unwinder and scheduled tasks

2019-01-10 Thread Joe Lawrence
On Fri, Jan 11, 2019 at 01:00:38AM +0100, Nicolai Stange wrote: > Hi Joe, > > Joe Lawrence writes: > > > tl;dr: On ppc64le, what is top-most stack frame for scheduled tasks > >about? > > If I'm reading the code in _switch() correctly, the first frame is > completely uninitialized

Re: ppc64le reliable stack unwinder and scheduled tasks

2019-01-10 Thread Nicolai Stange
Hi Joe, Joe Lawrence writes: > tl;dr: On ppc64le, what is top-most stack frame for scheduled tasks >about? If I'm reading the code in _switch() correctly, the first frame is completely uninitialized except for the pointer back to the caller's stack frame. For completeness: _switch()

Re: [PATCH 00/15] arch: synchronize syscall tables in preparation for y2038

2019-01-10 Thread Michael Cree
On Thu, Jan 10, 2019 at 11:42:32PM +0100, Arnd Bergmann wrote: > On Thu, Jan 10, 2019 at 7:10 PM Joseph Myers wrote: > > > > On Thu, 10 Jan 2019, Arnd Bergmann wrote: > > > > > - Add system calls that have not yet been integrated into all > > > architectures but that we definitely want there. >

Re: [PATCH] ibmvscsi: use GFP_ATOMIC with dma_alloc_coherent in map_sg_data

2019-01-10 Thread Tyrel Datwyler
On 01/10/2019 07:07 AM, Christoph Hellwig wrote: > On Wed, Jan 09, 2019 at 06:58:56PM -0800, Tyrel Datwyler wrote: >> While mapping DMA for scatter list when a scsi command is queued the >> existing call to dma_alloc_coherent() in our map_sg_data() function >> passes zero for the gfp_flags

Re: [PATCH 11/15] mips: fix n32 compat_ipc_parse_version

2019-01-10 Thread Arnd Bergmann
On Thu, Jan 10, 2019 at 8:40 PM Paul Burton wrote: > On Thu, Jan 10, 2019 at 05:24:31PM +0100, Arnd Bergmann wrote: > > While reading through the sysvipc implementation, I noticed that the n32 > > semctl/shmctl/msgctl system calls behave differently based on whether > > o32 support is enabled or

Re: [PATCH V6 0/4] mm/kvm/vfio/ppc64: Migrate compound pages out of CMA region

2019-01-10 Thread David Gibson
On Wed, Jan 09, 2019 at 02:11:25PM +0530, Aneesh Kumar K.V wrote: > Andrew Morton writes: > > > On Tue, 8 Jan 2019 10:21:06 +0530 "Aneesh Kumar K.V" > > wrote: > > > >> ppc64 use CMA area for the allocation of guest page table (hash page > >> table). We won't > >> be able to start guest if

Re: [PATCH 00/15] arch: synchronize syscall tables in preparation for y2038

2019-01-10 Thread Arnd Bergmann
On Thu, Jan 10, 2019 at 7:11 PM Geert Uytterhoeven wrote: > On Thu, Jan 10, 2019 at 6:06 PM Arnd Bergmann wrote: > > On Thu, Jan 10, 2019 at 5:59 PM Geert Uytterhoeven > > wrote: > > > On Thu, Jan 10, 2019 at 5:26 PM Arnd Bergmann wrote: > > > > The system call tables have diverged a bit over

Re: [PATCH 00/15] arch: synchronize syscall tables in preparation for y2038

2019-01-10 Thread Arnd Bergmann
On Thu, Jan 10, 2019 at 7:10 PM Joseph Myers wrote: > > On Thu, 10 Jan 2019, Arnd Bergmann wrote: > > > - Add system calls that have not yet been integrated into all > > architectures but that we definitely want there. > > glibc has a note that alpha lacks statfs64, any plans for that? Good

ppc64le reliable stack unwinder and scheduled tasks

2019-01-10 Thread Joe Lawrence
Hi all, tl;dr: On ppc64le, what is top-most stack frame for scheduled tasks about? I am looking at a bug in which ~10% of livepatch tests on RHEL-7 and RHEL-8 distro kernels, the ppc64le reliable stack unwinder consistently reports an unreliable stack for a given task. This condition

[PATCH] powerpc/pseries: Split CPU readd for single CPU systems

2019-01-10 Thread Michael Bringmann
[FYI: Please post to linuxppc-dev mailing list when you are ready. Good luck.] We have encountered cases where DLPAR CPU 'readd' fails on single CPU platforms, because the system needs a minimum amount of resources to keep operating. The current implementation attempts to add, and remove

Re: [PATCH 07/11] y2038: syscalls: rename y2038 compat syscalls

2019-01-10 Thread Heiko Carstens
On Thu, Jan 10, 2019 at 06:22:12PM +0100, Arnd Bergmann wrote: > diff --git a/arch/s390/kernel/syscalls/syscall.tbl > b/arch/s390/kernel/syscalls/syscall.tbl > index f84ea364a302..b3199a744731 100644 > --- a/arch/s390/kernel/syscalls/syscall.tbl > +++ b/arch/s390/kernel/syscalls/syscall.tbl > @@

Re: Kconfig label updates

2019-01-10 Thread Tyrel Datwyler
On 01/09/2019 04:37 AM, Michael Ellerman wrote: > Hi Bjorn, > > Bjorn Helgaas writes: >> Hi, >> >> I want to update the PCI Kconfig labels so they're more consistent and >> useful to users, something like the patch below. IIUC, the items >> below are all IBM-related; please correct me if not.

Re: [PATCH 15/15] arch: add pkey and rseq syscall numbers everywhere

2019-01-10 Thread Heiko Carstens
On Thu, Jan 10, 2019 at 05:24:35PM +0100, Arnd Bergmann wrote: > Most architectures define system call numbers for the rseq and pkey system > calls, even when they don't support the features, and perhaps never will. > > Only a few architectures are missing these, so just define them anyway > for

Re: [PATCH 14/15] arch: add split IPC system calls where needed

2019-01-10 Thread Heiko Carstens
On Thu, Jan 10, 2019 at 05:24:34PM +0100, Arnd Bergmann wrote: > The IPC system call handling is highly inconsistent across architectures, > some use sys_ipc, some use separate calls, and some use both. We also > have some architectures that require passing IPC_64 in the flags, and > others that

Patch series for 4.14 to compile powerpc with Clang

2019-01-10 Thread Nathan Chancellor
Hi Greg and Sasha, Attached is an mbox with a series of patches to allow building the powerpc kernel with Clang. We have been running continuous integration that builds and boots the kernel in QEMU for almost two months now with no regressions. This is on top of 4.14.92, there should be no

Patch series for 4.19 to compile powerpc with Clang

2019-01-10 Thread Nathan Chancellor
Hi Greg and Sasha, Attached is an mbox with a series of patches to allow building the powerpc kernel with Clang. We have been running continuous integration that builds and boots the kernel in QEMU for almost two months now with no regressions. This is on top of 4.19.14, there should be no

Re: [PATCH] ibmvscsi: use GFP_ATOMIC with dma_alloc_coherent in map_sg_data

2019-01-10 Thread Tyrel Datwyler
On 01/10/2019 07:07 AM, Christoph Hellwig wrote: > On Wed, Jan 09, 2019 at 06:58:56PM -0800, Tyrel Datwyler wrote: >> While mapping DMA for scatter list when a scsi command is queued the >> existing call to dma_alloc_coherent() in our map_sg_data() function >> passes zero for the gfp_flags

Re: [PATCH] soc: fsl: guts: us devm_kstrdup_const() for RO data

2019-01-10 Thread Li Yang
On Sat, Dec 22, 2018 at 2:02 AM Nicholas Mc Guire wrote: > > On Fri, Dec 21, 2018 at 08:29:56PM -0600, Scott Wood wrote: > > On Fri, 2018-12-07 at 09:22 +0100, Nicholas Mc Guire wrote: > > > devm_kstrdup() may return NULL if internal allocation failed, but > > > as machine is from the device

Re: [PATCH 11/15] mips: fix n32 compat_ipc_parse_version

2019-01-10 Thread Paul Burton
Hi Arnd, On Thu, Jan 10, 2019 at 05:24:31PM +0100, Arnd Bergmann wrote: > While reading through the sysvipc implementation, I noticed that the n32 > semctl/shmctl/msgctl system calls behave differently based on whether > o32 support is enabled or not: Without o32, the IPC_64 flag passed by > user

Re: [PATCH 00/15] arch: synchronize syscall tables in preparation for y2038

2019-01-10 Thread Joseph Myers
On Thu, 10 Jan 2019, Arnd Bergmann wrote: > - Add system calls that have not yet been integrated into all > architectures but that we definitely want there. glibc has a note that alpha lacks statfs64, any plans for that? -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH 00/15] arch: synchronize syscall tables in preparation for y2038

2019-01-10 Thread Geert Uytterhoeven
Hi Arnd, On Thu, Jan 10, 2019 at 6:06 PM Arnd Bergmann wrote: > On Thu, Jan 10, 2019 at 5:59 PM Geert Uytterhoeven > wrote: > > On Thu, Jan 10, 2019 at 5:26 PM Arnd Bergmann wrote: > > > The system call tables have diverged a bit over the years, and a number > > > of the recent additions

[PATCH 10/11] y2038: rename old time and utime syscalls

2019-01-10 Thread Arnd Bergmann
The time, stime, utime, utimes, and futimesat system calls are only used on older architectures, and we do not provide y2038 safe variants of them, as they are replaced by clock_gettime64, clock_settime64, and utimensat_time64. However, for consistency it seems better to have the 32-bit

[PATCH 11/11] y2038: add 64-bit time_t syscalls to all 32-bit architectures

2019-01-10 Thread Arnd Bergmann
This adds 21 new system calls on each ABI that has 32-bit time_t today. All of these have the exact same semantics as their existing counterparts, and the new ones all have macro names that end in 'time64' for clarification. This gets us to the point of being able to safely use a C library that

[PATCH 00/11] y2038: add time64 syscalls

2019-01-10 Thread Arnd Bergmann
This series finally gets us to the point of having system calls with 64-bit time_t on all architectures, after a long time of incremental preparation patches. There was actually one conversion that I missed during the summer, i.e. Deepa's timex series, which I now updated based the 5.0-rc1

[PATCH 09/11] y2038: remove struct definition redirects

2019-01-10 Thread Arnd Bergmann
We now use 64-bit time_t on all architectures, so the __kernel_timex, __kernel_timeval and __kernel_timespec redirects can be removed after having served their purpose. This makes it all much less confusing, as the __kernel_* types now always refer to the same layout based on 64-bit time_t across

[PATCH 06/11] timex: change syscalls to use struct __kernel_timex

2019-01-10 Thread Arnd Bergmann
From: Deepa Dinamani struct timex is not y2038 safe. Switch all the syscall apis to use y2038 safe __kernel_timex. Note that sys_adjtimex() does not have a y2038 safe solution. C libraries can implement it by calling clock_adjtime(CLOCK_REALTIME, ...). Signed-off-by: Deepa Dinamani

[PATCH 07/11] y2038: syscalls: rename y2038 compat syscalls

2019-01-10 Thread Arnd Bergmann
A lot of system calls that pass a time_t somewhere have an implementation using a COMPAT_SYSCALL_DEFINEx() on 64-bit architectures, and have been reworked so that this implementation can now be used on 32-bit architectures as well. The missing step is to redefine them using the regular

[PATCH 01/11] time: make adjtime compat handling available for 32 bit

2019-01-10 Thread Arnd Bergmann
We want to reuse the compat_timex handling on 32-bit architectures the same way we are using the compat handling for timespec when moving to 64-bit time_t. Move all definitions related to compat_timex out of the compat code into the normal timekeeping code, along with a rename to old_timex32,

[PATCH 05/11] timex: use __kernel_timex internally

2019-01-10 Thread Arnd Bergmann
From: Deepa Dinamani struct timex is not y2038 safe. Replace all uses of timex with y2038 safe __kernel_timex. Note that struct __kernel_timex is an ABI interface definition. We could define a new structure based on __kernel_timex that is only available internally instead. Right now, there

[PATCH 08/11] y2038: use time32 syscall names on 32-bit

2019-01-10 Thread Arnd Bergmann
This is the big flip, where all 32-bit architectures set COMPAT_32BIT_TIME abd use the _time32 system calls from the former compat layer instead of the system calls that take __kernel_timespec and similar arguments. The temporary redirects for __kernel_timespec, __kernel_itimerspec and

[PATCH 03/11] time: fix sys_timer_settime prototype

2019-01-10 Thread Arnd Bergmann
A small typo has crept into the y2038 conversion of the timer_settime system call. So far this was completely harmless, but once we start using the new version, this has to be fixed. Fixes: 6ff847350702 ("time: Change types to new y2038 safe __kernel_itimerspec") Signed-off-by: Arnd Bergmann ---

[PATCH 04/11] sparc64: add custom adjtimex/clock_adjtime functions

2019-01-10 Thread Arnd Bergmann
sparc64 is the only architecture on Linux that has a 'timeval' definition with a 32-bit tv_usec but a 64-bit tv_sec. This causes problems for sparc32 compat mode when we convert it to use the new __kernel_timex type that has the same layout as all other 64-bit architectures. To avoid adding

[PATCH 02/11] time: Add struct __kernel_timex

2019-01-10 Thread Arnd Bergmann
From: Deepa Dinamani struct timex uses struct timeval internally. struct timeval is not y2038 safe. Introduce a new UAPI type struct __kernel_timex that is y2038 safe. struct __kernel_timex uses a timeval type that is similar to struct __kernel_timespec which preserves the same structure size

Re: [PATCH 07/15] ARM: add kexec_file_load system call number

2019-01-10 Thread Arnd Bergmann
On Thu, Jan 10, 2019 at 5:39 PM Will Deacon wrote: > > > diff --git a/arch/arm64/include/asm/unistd32.h > > b/arch/arm64/include/asm/unistd32.h > > index 355fe2bc035b..19f3f58b6146 100644 > > --- a/arch/arm64/include/asm/unistd32.h > > +++ b/arch/arm64/include/asm/unistd32.h > > @@ -823,6 +823,8

[PATCH 4/4] tools headers powerpc: Remove unistd.h

2019-01-10 Thread Arnaldo Carvalho de Melo
From: Ravi Bangoria We use syscall.tbl to generate system call table on powerpc. The unistd.h copy is no longer required now. Remove it. Signed-off-by: Ravi Bangoria Cc: Jiri Olsa Cc: Michael Ellerman Cc: Namhyung Kim Cc: linuxppc-dev@lists.ozlabs.org Link:

Re: [PATCH 06/15] ARM: add migrate_pages() system call

2019-01-10 Thread Arnd Bergmann
On Thu, Jan 10, 2019 at 5:32 PM Will Deacon wrote: > > diff --git a/arch/arm64/include/asm/unistd32.h > > b/arch/arm64/include/asm/unistd32.h > > index 04ee190b90fe..355fe2bc035b 100644 > > --- a/arch/arm64/include/asm/unistd32.h > > +++ b/arch/arm64/include/asm/unistd32.h > > @@ -821,6 +821,8

Re: [PATCH 00/15] arch: synchronize syscall tables in preparation for y2038

2019-01-10 Thread Arnd Bergmann
On Thu, Jan 10, 2019 at 5:59 PM Geert Uytterhoeven wrote: > > Hi Arnd, > > On Thu, Jan 10, 2019 at 5:26 PM Arnd Bergmann wrote: > > The system call tables have diverged a bit over the years, and a number > > of the recent additions never made it into all architectures, for one > > reason or

Re: [PATCH 00/15] arch: synchronize syscall tables in preparation for y2038

2019-01-10 Thread Geert Uytterhoeven
Hi Arnd, On Thu, Jan 10, 2019 at 5:26 PM Arnd Bergmann wrote: > The system call tables have diverged a bit over the years, and a number > of the recent additions never made it into all architectures, for one > reason or another. > > This is an attempt to clean it up as far as we can without

[PATCH 3/4] perf powerpc: Rework syscall table generation

2019-01-10 Thread Arnaldo Carvalho de Melo
From: Ravi Bangoria Commit aff850393200 ("powerpc: add system call table generation support") changed how systemcall table is generated for powerpc. Incorporate these changes into perf as well. Committer testing: $ podman run --entrypoint=/bin/sh --privileged -v /home/acme/git:/git --rm -ti

Re: [PATCH 07/15] ARM: add kexec_file_load system call number

2019-01-10 Thread Will Deacon
On Thu, Jan 10, 2019 at 05:24:27PM +0100, Arnd Bergmann wrote: > A couple of architectures including arm64 already implement the > kexec_file_load system call, on many others we have assigned a system > call number for it, but not implemented it yet. > > Adding the number in arch/arm/ lets us use

[PATCH 12/15] sparc64: fix sparc_ipc type conversion

2019-01-10 Thread Arnd Bergmann
__kernel_timespec and timespec are currently the same type, but once they are different, the type cast has to be changed here. Signed-off-by: Arnd Bergmann --- arch/sparc/kernel/sys_sparc_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sparc/kernel/sys_sparc_64.c

[PATCH 13/15] ipc: rename old-style shmctl/semctl/msgctl syscalls

2019-01-10 Thread Arnd Bergmann
The behavior of these system calls is slightly different between architectures, as determined by the CONFIG_ARCH_WANT_IPC_PARSE_VERSION symbol. Most architectures that implement the split IPC syscalls don't set that symbol and only get the modern version, but alpha, arm, microblaze, mips-n32,

[PATCH 01/15] ia64: add __NR_umount2 definition

2019-01-10 Thread Arnd Bergmann
Other architectures commonly use __NR_umount2 for sys_umount, only ia64 and alpha use __NR_umount here. In order to synchronize the generated tables, use umount2 like everyone else, and add back the old name from asm/unistd.h for compatibility. The __IGNORE_* lines are now all obsolete and can be

[PATCH 06/15] ARM: add migrate_pages() system call

2019-01-10 Thread Arnd Bergmann
The migrate_pages system call has an assigned number on all architectures except ARM. When it got added initially in commit d80ade7b3231 ("ARM: Fix warning: #warning syscall migrate_pages not implemented"), it was intentionally left out based on the observation that there are no 32-bit ARM NUMA

[PATCH 04/15] alpha: wire up io_pgetevents system call

2019-01-10 Thread Arnd Bergmann
The io_pgetevents system call was added in linux-4.18 but has no entry for alpha: warning: #warning syscall io_pgetevents not implemented [-Wcpp] Assign a the next system call number here. Cc: sta...@vger.kernel.org Signed-off-by: Arnd Bergmann --- arch/alpha/kernel/syscalls/syscall.tbl | 1 +

[PATCH 15/15] arch: add pkey and rseq syscall numbers everywhere

2019-01-10 Thread Arnd Bergmann
Most architectures define system call numbers for the rseq and pkey system calls, even when they don't support the features, and perhaps never will. Only a few architectures are missing these, so just define them anyway for consistency. If we decide to add them later to one of these, the system

Re: [PATCH 06/15] ARM: add migrate_pages() system call

2019-01-10 Thread Will Deacon
On Thu, Jan 10, 2019 at 05:24:26PM +0100, Arnd Bergmann wrote: > The migrate_pages system call has an assigned number on all architectures > except ARM. When it got added initially in commit d80ade7b3231 ("ARM: > Fix warning: #warning syscall migrate_pages not implemented"), it was > intentionally

Re: [PATCH] powerpc/vdso32: Drop -mabi=elfv1 for 32 bit objects

2019-01-10 Thread Segher Boessenkool
On Thu, Jan 10, 2019 at 08:10:43AM +0100, Christophe Leroy wrote: > Le 10/01/2019 à 02:42, Joel Stanley a écrit : > >From: Daniel Axtens > > > >All 64-bit objects need to specify the flag to be compiled correctly, we > >just don't need it for 32-bit objects. GCC just ignored it, but clang >

[PATCH 00/15] arch: synchronize syscall tables in preparation for y2038

2019-01-10 Thread Arnd Bergmann
The system call tables have diverged a bit over the years, and a number of the recent additions never made it into all architectures, for one reason or another. This is an attempt to clean it up as far as we can without breaking compatibility, doing a number of steps: - Add system calls that

[PATCH 14/15] arch: add split IPC system calls where needed

2019-01-10 Thread Arnd Bergmann
The IPC system call handling is highly inconsistent across architectures, some use sys_ipc, some use separate calls, and some use both. We also have some architectures that require passing IPC_64 in the flags, and others that set it implicitly. For the additon of a y2083 safe semtimedop() system

[PATCH 09/15] sh: remove duplicate unistd_32.h file

2019-01-10 Thread Arnd Bergmann
When I merged this patch, the file was accidentally left intact instead of being removed, which means any changes to syscall.tbl have no effect. Fixes: 2b3c5a99d5f3 ("sh: generate uapi header and syscall table header files") Signed-off-by: Arnd Bergmann --- arch/sh/include/uapi/asm/unistd_32.h

[PATCH 10/15] sh: add statx system call

2019-01-10 Thread Arnd Bergmann
statx is available on almost all other architectures but got missed on sh, so add it now. Signed-off-by: Arnd Bergmann --- arch/sh/kernel/syscalls/syscall.tbl | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/sh/kernel/syscalls/syscall.tbl b/arch/sh/kernel/syscalls/syscall.tbl index

[PATCH 07/15] ARM: add kexec_file_load system call number

2019-01-10 Thread Arnd Bergmann
A couple of architectures including arm64 already implement the kexec_file_load system call, on many others we have assigned a system call number for it, but not implemented it yet. Adding the number in arch/arm/ lets us use the system call on arm64 systems in compat mode, and also reduces the

[PATCH 08/15] m68k: assign syscall number for seccomp

2019-01-10 Thread Arnd Bergmann
Most architectures have assigned a numbers for the seccomp syscall even when they do not implement it. m68k is an exception here, so for consistency lets add the number. Unless CONFIG_SECCOMP is implemented, the system call just returns -ENOSYS. Signed-off-by: Arnd Bergmann ---

[PATCH 02/15] ia64: add statx and io_pgetevents syscalls

2019-01-10 Thread Arnd Bergmann
All architectures should implement these two, so assign numbers and hook them up on ia64. Signed-off-by: Arnd Bergmann --- arch/ia64/kernel/syscalls/syscall.tbl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/ia64/kernel/syscalls/syscall.tbl b/arch/ia64/kernel/syscalls/syscall.tbl

[PATCH 05/15] alpha: update syscall macro definitions

2019-01-10 Thread Arnd Bergmann
Other architectures commonly use __NR_umount2 for sys_umount, only ia64 and alpha use __NR_umount here. In order to synchronize the generated tables, use umount2 like everyone else, and add back the old name from asm/unistd.h for compatibility. For shmat, alpha uses the osf_shmat name, we can do

[PATCH 03/15] ia64: assign syscall numbers for perf and seccomp

2019-01-10 Thread Arnd Bergmann
Most architectures have assigned numbers for both seccomp and perf_event_open, even when they do not implement either. ia64 is an exception here, so for consistency lets add numbers for both of them. Unless CONFIG_PERF_EVENTS and CONFIG_SECCOMP are implemented, the system calls just return

[PATCH 11/15] mips: fix n32 compat_ipc_parse_version

2019-01-10 Thread Arnd Bergmann
While reading through the sysvipc implementation, I noticed that the n32 semctl/shmctl/msgctl system calls behave differently based on whether o32 support is enabled or not: Without o32, the IPC_64 flag passed by user space is rejected but calls without that flag get IPC_64 behavior. As far as I

[PATCH v2 15/15] powerpc/kconfig: make _etext and data areas alignment configurable on 8xx

2019-01-10 Thread Christophe Leroy
On 8xx, large pages (512kb or 8M) are used to map kernel linear memory. Aligning to 8M reduces TLB misses as only 8M pages are used in that case. This patchs allows the user to do it via Kconfig. Signed-off-by: Christophe Leroy --- arch/powerpc/Kconfig | 16 ++--

[PATCH v2 14/15] powerpc/8xx: don't disable large TLBs with CONFIG_STRICT_KERNEL_RWX

2019-01-10 Thread Christophe Leroy
This patch implements handling of STRICT_KERNEL_RWX with large TLBs directly in the TLB miss handlers. To do so, etext and sinittext are aligned on 512kB boundaries and the miss handlers use 512kB pages instead of 8Mb pages for addresses close to the boundaries. It sets RO PP flags for addresses

[PATCH v2 13/15] powerpc/kconfig: make _etext and data areas alignment configurable on Book3s 32

2019-01-10 Thread Christophe Leroy
Depending on the number of available BATs for mapping the different kernel areas, it might be needed to increase the alignment of _etext and/or of data areas. This patchs allows the user to do it via Kconfig. Signed-off-by: Christophe Leroy --- arch/powerpc/Kconfig | 32

[PATCH v2 12/15] powerpc/mm/32s: Use BATs for STRICT_KERNEL_RWX

2019-01-10 Thread Christophe Leroy
Today, STRICT_KERNEL_RWX is based on the use of regular pages to map kernel pages. On Book3s 32, it has three consequences: - Using pages instead of BAT for mapping kernel linear memory severely impacts performance. - Exec protection is not effective because no-execute cannot be set at page level

[PATCH v2 11/15] powerpc/kconfig: define CONFIG_DATA_SHIFT and CONFIG_ETEXT_SHIFT

2019-01-10 Thread Christophe Leroy
CONFIG_STRICT_KERNEL_RWX requires a special alignment for DATA for some subarches. Today it is just defined as an #ifdef in vmlinux.lds.S In order to get more flexibility, this patch moves the definition of this alignment in Kconfig On some subarches, CONFIG_STRICT_KERNEL_RWX will require a

[PATCH v2 10/15] powerpc/kconfig: define PAGE_SHIFT inside Kconfig

2019-01-10 Thread Christophe Leroy
This patch defined CONFIG_PPC_PAGE_SHIFT in order to be able to use PAGE_SHIFT value inside Kconfig. Signed-off-by: Christophe Leroy --- arch/powerpc/Kconfig| 7 +++ arch/powerpc/include/asm/page.h | 13 ++--- 2 files changed, 9 insertions(+), 11 deletions(-) diff

[PATCH v2 09/15] powerpc/mmu: add is_strict_kernel_rwx() helper

2019-01-10 Thread Christophe Leroy
Add a helper to know whether STRICT_KERNEL_RWX is enabled. This is based on rodata_enabled flag which is defined only when CONFIG_STRICT_KERNEL_RWX is selected. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/mmu.h | 11 +++ arch/powerpc/mm/init_32.c | 4 +--- 2

[PATCH v2 08/15] powerpc/32: add helper to write into segment registers

2019-01-10 Thread Christophe Leroy
This patch add an helper which wraps 'mtsrin' instruction to write into segment registers. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/reg.h | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index

[PATCH v2 07/15] powerpc/mm/32s: add setibat() clearibat() and update_bats()

2019-01-10 Thread Christophe Leroy
setibat() and clearibat() allows to manipulate IBATs independently of DBATs. update_bats() allows to update bats after init. This is done with MMU off. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/book3s/32/mmu-hash.h | 2 ++ arch/powerpc/kernel/head_32.S | 35

[PATCH v2 06/15] powerpc/mm/32s: use _PAGE_EXEC in setbat()

2019-01-10 Thread Christophe Leroy
Do not set IBAT when setbat() is called without _PAGE_EXEC Signed-off-by: Christophe Leroy --- arch/powerpc/mm/ppc_mmu_32.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/mm/ppc_mmu_32.c b/arch/powerpc/mm/ppc_mmu_32.c index b8a8d55f51a6..42320688e415

[PATCH v2 05/15] powerpc/wii: remove wii_mmu_mapin_mem2()

2019-01-10 Thread Christophe Leroy
wii_mmu_mapin_mem2() is not used anymore, remove it. Signed-off-by: Christophe Leroy --- arch/powerpc/platforms/embedded6xx/wii.c | 24 1 file changed, 24 deletions(-) diff --git a/arch/powerpc/platforms/embedded6xx/wii.c b/arch/powerpc/platforms/embedded6xx/wii.c

[PATCH v2 04/15] powerpc/32: always populate page tables for Abatron BDI.

2019-01-10 Thread Christophe Leroy
When CONFIG_BDI_SWITCH is set, the page tables have to be populated allthough large TLBs are used, because the BDI switch knows nothing about those large TLBs which are handled directly in TLB miss logic. Signed-off-by: Christophe Leroy --- arch/powerpc/mm/pgtable_32.c | 5 - 1 file

[PATCH v2 03/15] powerpc/mm/32s: use generic mmu_mapin_ram() for all blocks.

2019-01-10 Thread Christophe Leroy
Now that mmu_mapin_ram() is able to handle other blocks than the one starting at 0, the WII can use it for all its blocks. Signed-off-by: Christophe Leroy --- arch/powerpc/mm/pgtable_32.c | 25 +++-- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git

[PATCH v2 02/15] powerpc/mm/32s: rework mmu_mapin_ram()

2019-01-10 Thread Christophe Leroy
This patch reworks mmu_mapin_ram() to be more generic and map as much blocks as possible. It now supports blocks not starting at address 0. It scans DBATs array to find free ones instead of forcing the use of BAT2 and BAT3. Signed-off-by: Christophe Leroy --- arch/powerpc/mm/ppc_mmu_32.c | 61

[PATCH v2 01/15] powerpc/mm/32: add base address to mmu_mapin_ram()

2019-01-10 Thread Christophe Leroy
At the time being, mmu_mapin_ram() always maps RAM from the beginning. But some platforms like the WII have to map a second block of RAM. This patch adds to mmu_mapin_ram() the base address of the block. At the moment, only base address 0 is supported. Signed-off-by: Christophe Leroy ---

[PATCH v2 00/15] powerpc/32s: Use BATs/LTLBs for STRICT_KERNEL_RWX

2019-01-10 Thread Christophe Leroy
The purpose of this serie is to: - use BATs with STRICT_KERNEL_RWX on book3s (See patch 12 for details.) - use LTLBs with STRICT_KERNEL_RWX on 8xx (See patch 14 for a few details.) v2: - Fix patch 2 (was patch 3 in v1) based on feedback from Jonathan. - Added support for 8xx with LTLBs. - Added

Re: [PATCH] ibmvscsi: use GFP_ATOMIC with dma_alloc_coherent in map_sg_data

2019-01-10 Thread Christoph Hellwig
On Wed, Jan 09, 2019 at 06:58:56PM -0800, Tyrel Datwyler wrote: > While mapping DMA for scatter list when a scsi command is queued the > existing call to dma_alloc_coherent() in our map_sg_data() function > passes zero for the gfp_flags parameter. We are most definitly in atomic > context at this

Re: [PATCH] ibmvscsi: use GFP_KERNEL with dma_alloc_coherent in initialize_event_pool

2019-01-10 Thread Brian King
On 01/09/2019 08:59 PM, Tyrel Datwyler wrote: > During driver probe we allocate a dma region for our event pool. > Currently, zero is passed for the gfp_flags parameter. Driver probe > callbacks run in process context and we hold no locks so we can sleep > here if necessary. > > Fix by passing

Re: [PATCH] ibmvscsi: use GFP_ATOMIC with dma_alloc_coherent in map_sg_data

2019-01-10 Thread Brian King
On 01/09/2019 08:58 PM, Tyrel Datwyler wrote: > While mapping DMA for scatter list when a scsi command is queued the > existing call to dma_alloc_coherent() in our map_sg_data() function > passes zero for the gfp_flags parameter. We are most definitly in atomic > context at this point as

[PATCH] powerpc/8xx: replace most #ifdef by IS_ENABLED() in 8xx_mmu.c

2019-01-10 Thread Christophe Leroy
This patch replaces most #ifdef mess by IS_ENABLED() in 8xx_mmu.c This has the advantage of allowing syntax verification at compile time regardless of selected options. Signed-off-by: Christophe Leroy --- arch/powerpc/mm/8xx_mmu.c | 65 +-- 1 file

Re: [PATCH] powerpc/vdso32: Drop -mabi=elfv1 for 32 bit objects

2019-01-10 Thread Daniel Axtens
Christophe Leroy writes: > Le 10/01/2019 à 02:42, Joel Stanley a écrit : >> From: Daniel Axtens >> >> All 64-bit objects need to specify the flag to be compiled correctly, we >> just don't need it for 32-bit objects. GCC just ignored it, but clang >> doesn't. >> >> Link:

Re: [PATCH v4 1/2] crypto: talitos - reorder code in talitos_edesc_alloc()

2019-01-10 Thread Herbert Xu
On Tue, Jan 08, 2019 at 06:56:46AM +, Christophe Leroy wrote: > This patch moves the mapping of IV after the kmalloc(). This > avoids having to unmap in case kmalloc() fails. > > Signed-off-by: Christophe Leroy > --- > new in v4 > > drivers/crypto/talitos.c | 25 +++--

[PATCH v5 12/12] perf/core: remove unused perf_flags

2019-01-10 Thread Andrew Murray
Now that perf_flags is not used we remove it. Signed-off-by: Andrew Murray --- include/uapi/linux/perf_event.h | 2 -- tools/include/uapi/linux/perf_event.h | 2 -- 2 files changed, 4 deletions(-) diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h index

[PATCH v5 11/12] x86: perf/core: strengthen exclude checks with PERF_PMU_CAP_NO_EXCLUDE

2019-01-10 Thread Andrew Murray
For x86 PMUs that do not support context exclusion let's advertise the PERF_PMU_CAP_NO_EXCLUDE capability. This ensures that perf will prevent us from handling events where any exclusion flags are set. Let's also remove the now unnecessary check for exclusion flags. This change means that

[PATCH v5 10/12] x86: perf/core: use PERF_PMU_CAP_NO_EXCLUDE for exclude incapable PMUs

2019-01-10 Thread Andrew Murray
For drivers that do not support context exclusion let's advertise the PERF_PMU_CAP_NOEXCLUDE capability. This ensures that perf will prevent us from handling events where any exclusion flags are set. Let's also remove the now unnecessary check for exclusion flags. PMU drivers that support at

[PATCH v5 09/12] powerpc: perf/core: use PERF_PMU_CAP_NO_EXCLUDE for exclude incapable PMUs

2019-01-10 Thread Andrew Murray
For PowerPC PMUs that do not support context exclusion let's advertise the PERF_PMU_CAP_NO_EXCLUDE capability. This ensures that perf will prevent us from handling events where any exclusion flags are set. Let's also remove the now unnecessary check for exclusion flags. Signed-off-by: Andrew

[PATCH v5 08/12] drivers/perf: perf/core: strengthen exclude checks with PERF_PMU_CAP_NO_EXCLUDE

2019-01-10 Thread Andrew Murray
For drivers that do not support context exclusion let's advertise the PERF_PMU_CAP_NO_EXCLUDE capability. This ensures that perf will prevent us from handling events where any exclusion flags are set. Let's also remove the now unnecessary check for exclusion flags. This change means that

[PATCH v5 07/12] drivers/perf: perf/core: use PERF_PMU_CAP_NO_EXCLUDE for exclude incapable PMUs

2019-01-10 Thread Andrew Murray
For drivers that do not support context exclusion let's advertise the PERF_PMU_CAP_NO_EXCLUDE capability. This ensures that perf will prevent us from handling events where any exclusion flags are set. Let's also remove the now unnecessary check for exclusion flags. Signed-off-by: Andrew Murray

  1   2   >