Re: [GIT PULL] s390 patches for the 4.17 merge window #1

2018-04-09 Thread Martin Schwidefsky
On Mon, 9 Apr 2018 09:07:12 -0700 Linus Torvalds <torva...@linux-foundation.org> wrote: > On Mon, Apr 9, 2018 at 6:18 AM, Martin Schwidefsky > <schwidef...@de.ibm.com> wrote: > > Hi Linus, > > > > On Tue, 3 Apr 2018 11:12:42 +0200 > > Martin

Re: [GIT PULL] s390 patches for the 4.17 merge window #1

2018-04-09 Thread Martin Schwidefsky
On Mon, 9 Apr 2018 09:07:12 -0700 Linus Torvalds wrote: > On Mon, Apr 9, 2018 at 6:18 AM, Martin Schwidefsky > wrote: > > Hi Linus, > > > > On Tue, 3 Apr 2018 11:12:42 +0200 > > Martin Schwidefsky wrote: > > > >> please pull from the 'for-linus' b

Re: [GIT PULL] s390 patches for the 4.17 merge window #1

2018-04-09 Thread Martin Schwidefsky
Hi Linus, On Tue, 3 Apr 2018 11:12:42 +0200 Martin Schwidefsky <schwidef...@de.ibm.com> wrote: > please pull from the 'for-linus' branch of > > git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git for-linus > > to receive the following updates:

Re: [GIT PULL] s390 patches for the 4.17 merge window #1

2018-04-09 Thread Martin Schwidefsky
Hi Linus, On Tue, 3 Apr 2018 11:12:42 +0200 Martin Schwidefsky wrote: > please pull from the 'for-linus' branch of > > git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git for-linus > > to receive the following updates: > > * Improvements fo

Re: s390: defective uses of va_arg in __debug_sprintf_event

2018-04-09 Thread Martin Schwidefsky
On Fri, 06 Apr 2018 12:08:43 -0700 Joe Perches wrote: > debug_sprintf_event calls __debug_sprintf_event > with a format and arguments. > > There various types of arguments used in these > call, but __debug_sprintf_event uses va_arg > with only long as the type argument so

Re: s390: defective uses of va_arg in __debug_sprintf_event

2018-04-09 Thread Martin Schwidefsky
On Fri, 06 Apr 2018 12:08:43 -0700 Joe Perches wrote: > debug_sprintf_event calls __debug_sprintf_event > with a format and arguments. > > There various types of arguments used in these > call, but __debug_sprintf_event uses va_arg > with only long as the type argument so random > errors could

[GIT PULL] s390 patches for the 4.17 merge window #1

2018-04-03 Thread Martin Schwidefsky
/qdio: restrict buffer merging to eligible devices s390/qdio: don't retry EQBS after CCQ 96 s390/qdio: split up CCQ handling for EQBS / SQBS Martin Schwidefsky (8): s390: move nobp parameter functions to nospec-branch.c s390: add automatic detection of the spectre defense

[GIT PULL] s390 patches for the 4.17 merge window #1

2018-04-03 Thread Martin Schwidefsky
/qdio: restrict buffer merging to eligible devices s390/qdio: don't retry EQBS after CCQ 96 s390/qdio: split up CCQ handling for EQBS / SQBS Martin Schwidefsky (8): s390: move nobp parameter functions to nospec-branch.c s390: add automatic detection of the spectre defense

Re: [PATCH 10/10] softirq: Remove __ARCH_SET_SOFTIRQ_PENDING

2018-04-02 Thread Martin Schwidefsky
On Thu, 29 Mar 2018 20:08:36 +0200 Peter Zijlstra <pet...@infradead.org> wrote: > On Thu, Mar 29, 2018 at 04:53:43PM +0200, Martin Schwidefsky wrote: > > The lowcore optimization for softirq_pending field is not really needed, > > just nice to have. But if there is a

Re: [PATCH 10/10] softirq: Remove __ARCH_SET_SOFTIRQ_PENDING

2018-04-02 Thread Martin Schwidefsky
On Thu, 29 Mar 2018 20:08:36 +0200 Peter Zijlstra wrote: > On Thu, Mar 29, 2018 at 04:53:43PM +0200, Martin Schwidefsky wrote: > > The lowcore optimization for softirq_pending field is not really needed, > > just nice to have. But if there is a strong reason to make a common

Re: [PATCH 10/10] softirq: Remove __ARCH_SET_SOFTIRQ_PENDING

2018-03-29 Thread Martin Schwidefsky
On Thu, 29 Mar 2018 16:07:49 +0200 Frederic Weisbecker wrote: > On Thu, Mar 29, 2018 at 04:01:11PM +0200, Peter Zijlstra wrote: > > On Thu, Mar 29, 2018 at 03:47:46PM +0200, Frederic Weisbecker wrote: > > > On Thu, Mar 29, 2018 at 09:16:19AM +0200, Peter Zijlstra wrote:

Re: [PATCH 10/10] softirq: Remove __ARCH_SET_SOFTIRQ_PENDING

2018-03-29 Thread Martin Schwidefsky
On Thu, 29 Mar 2018 16:07:49 +0200 Frederic Weisbecker wrote: > On Thu, Mar 29, 2018 at 04:01:11PM +0200, Peter Zijlstra wrote: > > On Thu, Mar 29, 2018 at 03:47:46PM +0200, Frederic Weisbecker wrote: > > > On Thu, Mar 29, 2018 at 09:16:19AM +0200, Peter Zijlstra wrote: > > > > On Thu, Mar

Re: [PULL 0/2] vfio-ccw patches for 4.17

2018-03-19 Thread Martin Schwidefsky
On Mon, 5 Mar 2018 13:31:14 +0100 Cornelia Huck wrote: > The following changes since commit 5628683cf77bc8dad3336a9b254e55f728f7c70e: > > s390/dasd: set timestamps unconditionally (2018-02-27 08:05:29 +0100) > > are available in the git repository at: > >

Re: [PULL 0/2] vfio-ccw patches for 4.17

2018-03-19 Thread Martin Schwidefsky
On Mon, 5 Mar 2018 13:31:14 +0100 Cornelia Huck wrote: > The following changes since commit 5628683cf77bc8dad3336a9b254e55f728f7c70e: > > s390/dasd: set timestamps unconditionally (2018-02-27 08:05:29 +0100) > > are available in the git repository at: > >

[GIT PULL] s390 patches for 4.16-rc5

2018-03-06 Thread Martin Schwidefsky
about negative pgtables_bytes Hendrik Brueckner (1): s390/clean-up: use CFI_* macros in entry.S Martin Schwidefsky (1): s390: do not bypass BPENTER for interrupt system calls Sebastian Ott (3): s390/cio: fix ccw_device_start_timeout API s390/cio: fix return code after

[GIT PULL] s390 patches for 4.16-rc5

2018-03-06 Thread Martin Schwidefsky
about negative pgtables_bytes Hendrik Brueckner (1): s390/clean-up: use CFI_* macros in entry.S Martin Schwidefsky (1): s390: do not bypass BPENTER for interrupt system calls Sebastian Ott (3): s390/cio: fix ccw_device_start_timeout API s390/cio: fix return code after

Re: [RFC PATCH] s390: Fix runtime warning about negative pgtables_bytes

2018-03-02 Thread Martin Schwidefsky
On Thu, 1 Mar 2018 14:40:52 -0800 Guenter Roeck wrote: > When running s390 images with 'compat' processes, the following > BUG is seen repeatedly. > > BUG: non-zero pgtables_bytes on freeing mm: -16384 > > Bisect points to commit b4e98d9ac775 ("mm: account pud page

Re: [RFC PATCH] s390: Fix runtime warning about negative pgtables_bytes

2018-03-02 Thread Martin Schwidefsky
On Thu, 1 Mar 2018 14:40:52 -0800 Guenter Roeck wrote: > When running s390 images with 'compat' processes, the following > BUG is seen repeatedly. > > BUG: non-zero pgtables_bytes on freeing mm: -16384 > > Bisect points to commit b4e98d9ac775 ("mm: account pud page tables"). > Analysis shows

Re: [PATCH v3 0/4] Split page_type out from mapcount

2018-03-01 Thread Martin Schwidefsky
On Thu, 1 Mar 2018 06:50:58 -0800 Matthew Wilcox <wi...@infradead.org> wrote: > On Thu, Mar 01, 2018 at 03:44:12PM +0300, Kirill A. Shutemov wrote: > > On Thu, Mar 01, 2018 at 08:17:50AM +0100, Martin Schwidefsky wrote: > > > Yeah, that is a nasty bit of code. On s39

Re: [PATCH v3 0/4] Split page_type out from mapcount

2018-03-01 Thread Martin Schwidefsky
On Thu, 1 Mar 2018 06:50:58 -0800 Matthew Wilcox wrote: > On Thu, Mar 01, 2018 at 03:44:12PM +0300, Kirill A. Shutemov wrote: > > On Thu, Mar 01, 2018 at 08:17:50AM +0100, Martin Schwidefsky wrote: > > > Yeah, that is a nasty bit of code. On s390 we have 2K page tables (pte)

Re: [PATCH v3 0/4] Split page_type out from mapcount

2018-03-01 Thread Martin Schwidefsky
On Thu, 1 Mar 2018 15:44:12 +0300 "Kirill A. Shutemov" <kir...@shutemov.name> wrote: > On Thu, Mar 01, 2018 at 08:17:50AM +0100, Martin Schwidefsky wrote: > > On Wed, 28 Feb 2018 14:31:53 -0800 > > Matthew Wilcox <wi...@infradead.org> wrote: >

Re: [PATCH v3 0/4] Split page_type out from mapcount

2018-03-01 Thread Martin Schwidefsky
On Thu, 1 Mar 2018 15:44:12 +0300 "Kirill A. Shutemov" wrote: > On Thu, Mar 01, 2018 at 08:17:50AM +0100, Martin Schwidefsky wrote: > > On Wed, 28 Feb 2018 14:31:53 -0800 > > Matthew Wilcox wrote: > > > > > From: Matthew Wilcox > > > >

Re: [PATCH v3 1/4] s390: Use _refcount for pgtables

2018-03-01 Thread Martin Schwidefsky
On Thu, 1 Mar 2018 17:28:55 +0300 "Kirill A. Shutemov" <kir...@shutemov.name> wrote: > On Thu, Mar 01, 2018 at 03:04:20PM +0100, Martin Schwidefsky wrote: > > On Thu, 1 Mar 2018 15:53:10 +0300 > > "Kirill A. Shutemov" <kir...@shutemov.name> wrote:

Re: [PATCH v3 1/4] s390: Use _refcount for pgtables

2018-03-01 Thread Martin Schwidefsky
On Thu, 1 Mar 2018 17:28:55 +0300 "Kirill A. Shutemov" wrote: > On Thu, Mar 01, 2018 at 03:04:20PM +0100, Martin Schwidefsky wrote: > > On Thu, 1 Mar 2018 15:53:10 +0300 > > "Kirill A. Shutemov" wrote: > > > > > On Wed, Feb 28, 2018 at 02:3

Re: [PATCH v3 1/4] s390: Use _refcount for pgtables

2018-03-01 Thread Martin Schwidefsky
On Thu, 1 Mar 2018 15:53:10 +0300 "Kirill A. Shutemov" wrote: > On Wed, Feb 28, 2018 at 02:31:54PM -0800, Matthew Wilcox wrote: > > From: Matthew Wilcox > > > > s390 borrows the storage used for _mapcount in struct page in order to > > account

Re: [PATCH v3 1/4] s390: Use _refcount for pgtables

2018-03-01 Thread Martin Schwidefsky
On Thu, 1 Mar 2018 15:53:10 +0300 "Kirill A. Shutemov" wrote: > On Wed, Feb 28, 2018 at 02:31:54PM -0800, Matthew Wilcox wrote: > > From: Matthew Wilcox > > > > s390 borrows the storage used for _mapcount in struct page in order to > > account whether the bottom or top half is being used for

Re: [PATCH v3 0/4] Split page_type out from mapcount

2018-03-01 Thread Martin Schwidefsky
On Thu, 1 Mar 2018 08:17:50 +0100 Martin Schwidefsky <schwidef...@de.ibm.com> wrote: > On Wed, 28 Feb 2018 14:31:53 -0800 > Matthew Wilcox <wi...@infradead.org> wrote: > > > From: Matthew Wilcox <mawil...@microsoft.com> > > > > I want to use the _m

Re: [PATCH v3 0/4] Split page_type out from mapcount

2018-03-01 Thread Martin Schwidefsky
On Thu, 1 Mar 2018 08:17:50 +0100 Martin Schwidefsky wrote: > On Wed, 28 Feb 2018 14:31:53 -0800 > Matthew Wilcox wrote: > > > From: Matthew Wilcox > > > > I want to use the _mapcount field to record what a page is in use as. > > This can help with

Re: [PATCH v3 0/4] Split page_type out from mapcount

2018-02-28 Thread Martin Schwidefsky
On Wed, 28 Feb 2018 14:31:53 -0800 Matthew Wilcox wrote: > From: Matthew Wilcox > > I want to use the _mapcount field to record what a page is in use as. > This can help with debugging and we can also expose that information to > userspace through

Re: [PATCH v3 0/4] Split page_type out from mapcount

2018-02-28 Thread Martin Schwidefsky
On Wed, 28 Feb 2018 14:31:53 -0800 Matthew Wilcox wrote: > From: Matthew Wilcox > > I want to use the _mapcount field to record what a page is in use as. > This can help with debugging and we can also expose that information to > userspace through /proc/kpageflags to help diagnose memory usage

Re: linux-next: Signed-off-by missing for commit in the s390 tree

2018-02-07 Thread Martin Schwidefsky
On Thu, 8 Feb 2018 07:35:39 +1100 Stephen Rothwell wrote: > Commit > > b175210bd231 ("s390/kconfig: Remove ARCH_WANTS_PROT_NUMA_PROT_NONE select") > > is missing a Signed-off-by from its committer. It is always that "last" one you add. Fixed. Thanks. -- blue skies,

Re: linux-next: Signed-off-by missing for commit in the s390 tree

2018-02-07 Thread Martin Schwidefsky
On Thu, 8 Feb 2018 07:35:39 +1100 Stephen Rothwell wrote: > Commit > > b175210bd231 ("s390/kconfig: Remove ARCH_WANTS_PROT_NUMA_PROT_NONE select") > > is missing a Signed-off-by from its committer. It is always that "last" one you add. Fixed. Thanks. -- blue skies, Martin. "Reality

Re: [PATCH 6/6] s390: introduce execute-trampolines for branches

2018-02-07 Thread Martin Schwidefsky
On Wed, 07 Feb 2018 12:07:55 + David Woodhouse wrote: > On Wed, 2018-02-07 at 11:07 +0100, Pavel Machek wrote: > > This is really unfortunate naming of kernel option. > > > > spectre_v2=off sounds like we are turning the "bug" off, but i somehow > > suspect you are

Re: [PATCH 6/6] s390: introduce execute-trampolines for branches

2018-02-07 Thread Martin Schwidefsky
On Wed, 07 Feb 2018 12:07:55 + David Woodhouse wrote: > On Wed, 2018-02-07 at 11:07 +0100, Pavel Machek wrote: > > This is really unfortunate naming of kernel option. > > > > spectre_v2=off sounds like we are turning the "bug" off, but i somehow > > suspect you are turning the bug

Re: [PATCH 6/6] s390: introduce execute-trampolines for branches

2018-02-07 Thread Martin Schwidefsky
On Wed, 7 Feb 2018 11:07:26 +0100 Pavel Machek <pa...@ucw.cz> wrote: > On Wed 2018-02-07 08:00:11, Martin Schwidefsky wrote: > > Add CONFIG_EXPOLINE to enable the use of the new -mindirect-branch= and > > -mfunction_return= compiler options to create a kernel fortified agai

Re: [PATCH 6/6] s390: introduce execute-trampolines for branches

2018-02-07 Thread Martin Schwidefsky
On Wed, 7 Feb 2018 11:07:26 +0100 Pavel Machek wrote: > On Wed 2018-02-07 08:00:11, Martin Schwidefsky wrote: > > Add CONFIG_EXPOLINE to enable the use of the new -mindirect-branch= and > > -mfunction_return= compiler options to create a kernel fortified against > >

Re: [PATCH 4/6] s390: add options to change branch prediction behaviour for the kernel

2018-02-07 Thread Martin Schwidefsky
On Wed, 7 Feb 2018 11:02:52 +0100 Pavel Machek <pa...@ucw.cz> wrote: > On Wed 2018-02-07 08:00:09, Martin Schwidefsky wrote: > > Add the PPA instruction to the system entry and exit path to switch > > the kernel to a different branch prediction behaviour. The instructions

Re: [PATCH 4/6] s390: add options to change branch prediction behaviour for the kernel

2018-02-07 Thread Martin Schwidefsky
On Wed, 7 Feb 2018 11:02:52 +0100 Pavel Machek wrote: > On Wed 2018-02-07 08:00:09, Martin Schwidefsky wrote: > > Add the PPA instruction to the system entry and exit path to switch > > the kernel to a different branch prediction behaviour. The instructions > > are added

[PATCH 6/6] s390: introduce execute-trampolines for branches

2018-02-06 Thread Martin Schwidefsky
rnel and module code will be patched at runtime. Signed-off-by: Martin Schwidefsky <schwidef...@de.ibm.com> --- arch/s390/Kconfig | 28 + arch/s390/Makefile| 12 arch/s390/include/asm/lowcore.h | 6 +- arch/s390/include/asm/nospec-b

[PATCH 6/6] s390: introduce execute-trampolines for branches

2018-02-06 Thread Martin Schwidefsky
rnel and module code will be patched at runtime. Signed-off-by: Martin Schwidefsky --- arch/s390/Kconfig | 28 + arch/s390/Makefile| 12 arch/s390/include/asm/lowcore.h | 6 +- arch/s390/include/asm/nospec-branch.h | 18 ++ arch/

[PATCH 3/6] s390/alternative: use a copy of the facility bit mask

2018-02-06 Thread Martin Schwidefsky
; Signed-off-by: Martin Schwidefsky <schwidef...@de.ibm.com> --- arch/s390/include/asm/facility.h | 18 ++ arch/s390/include/asm/lowcore.h | 3 ++- arch/s390/kernel/alternative.c | 3 ++- arch/s390/kernel/early.c | 3 +++ arch/s390/kernel/setup.c | 4 +++-

[PATCH 1/6] s390: scrub registers on kernel entry and KVM exit

2018-02-06 Thread Martin Schwidefsky
Clear all user space registers on entry to the kernel and all KVM guest registers on KVM guest exit if the register does not contain either a parameter or a result value. Reviewed-by: Christian Borntraeger <borntrae...@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidef...@d

[PATCH 1/6] s390: scrub registers on kernel entry and KVM exit

2018-02-06 Thread Martin Schwidefsky
Clear all user space registers on entry to the kernel and all KVM guest registers on KVM guest exit if the register does not contain either a parameter or a result value. Reviewed-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky --- arch/s390/kernel/entry.S | 47

[PATCH 3/6] s390/alternative: use a copy of the facility bit mask

2018-02-06 Thread Martin Schwidefsky
To be able to switch off specific CPU alternatives with kernel parameters make a copy of the facility bit mask provided by STFLE and use the copy for the decision to apply an alternative. Reviewed-by: David Hildenbrand Reviewed-by: Cornelia Huck Signed-off-by: Martin Schwidefsky --- arch/s390

[PATCH 0/6] s390: improve speculative execution handling v3

2018-02-06 Thread Martin Schwidefsky
nother gcc option -mindirect-branch-table to keep a list of PC relative locations of calls to the execute thunks. With spectre_v2=off the call will be replaced with the original indirect branch and a nop. Martin Schwidefsky (6): s390: scrub registers on kernel entry and KVM exit s390: add

[PATCH 5/6] s390: run user space and KVM guests with modified branch prediction

2018-02-06 Thread Martin Schwidefsky
of a KVM guest associated with the current task with limited branch prediction call s390_isolate_bp_guest(). Signed-off-by: Martin Schwidefsky <schwidef...@de.ibm.com> --- arch/s390/include/asm/processor.h | 3 +++ arch/s390/include/asm/thread_info.h | 4 +++ arch/s390/kernel/entry.S

[PATCH 0/6] s390: improve speculative execution handling v3

2018-02-06 Thread Martin Schwidefsky
nother gcc option -mindirect-branch-table to keep a list of PC relative locations of calls to the execute thunks. With spectre_v2=off the call will be replaced with the original indirect branch and a nop. Martin Schwidefsky (6): s390: scrub registers on kernel entry and KVM exit s390: add

[PATCH 5/6] s390: run user space and KVM guests with modified branch prediction

2018-02-06 Thread Martin Schwidefsky
of a KVM guest associated with the current task with limited branch prediction call s390_isolate_bp_guest(). Signed-off-by: Martin Schwidefsky --- arch/s390/include/asm/processor.h | 3 +++ arch/s390/include/asm/thread_info.h | 4 +++ arch/s390/kernel/entry.S| 51

[PATCH 2/6] s390: add optimized array_index_mask_nospec

2018-02-06 Thread Martin Schwidefsky
Add an optimized version of the array_index_mask_nospec function for s390 based on a compare and a subtract with borrow. Signed-off-by: Martin Schwidefsky <schwidef...@de.ibm.com> --- arch/s390/include/asm/barrier.h | 24 1 file changed, 24 insertions(+) diff

[PATCH 4/6] s390: add options to change branch prediction behaviour for the kernel

2018-02-06 Thread Martin Schwidefsky
t behaviour selected with CONFIG_KERNEL_NOBP is set to "n" then the "nobp=1" parameter can be used to enable the changed kernel branch prediction. Acked-by: Cornelia Huck <coh...@redhat.com> Signed-off-by: Martin Schwidefsky <schwidef...@de.ibm.com> --- arch/s390/Kconfig

[PATCH 2/6] s390: add optimized array_index_mask_nospec

2018-02-06 Thread Martin Schwidefsky
Add an optimized version of the array_index_mask_nospec function for s390 based on a compare and a subtract with borrow. Signed-off-by: Martin Schwidefsky --- arch/s390/include/asm/barrier.h | 24 1 file changed, 24 insertions(+) diff --git a/arch/s390/include/asm

[PATCH 4/6] s390: add options to change branch prediction behaviour for the kernel

2018-02-06 Thread Martin Schwidefsky
t behaviour selected with CONFIG_KERNEL_NOBP is set to "n" then the "nobp=1" parameter can be used to enable the changed kernel branch prediction. Acked-by: Cornelia Huck Signed-off-by: Martin Schwidefsky --- arch/s390/Kconfig | 17 ++ arch/s390/include/asm/processor.

Re: linux-next: Signed-off-by missing for commits in the s390 tree

2018-02-04 Thread Martin Schwidefsky
Hi Stephen, On Sat, 3 Feb 2018 13:03:48 +1100 Stephen Rothwell wrote: > Commits > > a39892ed47bf ("s390/runtime_instrumentation: re-add signum system call > parameter") > 279d2cea3aad ("s390/cio: fix kernel-doc usage") > > are missing a Signed-off-by from their

Re: linux-next: Signed-off-by missing for commits in the s390 tree

2018-02-04 Thread Martin Schwidefsky
Hi Stephen, On Sat, 3 Feb 2018 13:03:48 +1100 Stephen Rothwell wrote: > Commits > > a39892ed47bf ("s390/runtime_instrumentation: re-add signum system call > parameter") > 279d2cea3aad ("s390/cio: fix kernel-doc usage") > > are missing a Signed-off-by from their committer. Thanks for the

[GIT PULL] s390 patches for the 4.15 merge window

2018-01-30 Thread Martin Schwidefsky
Hi Linus, please pull from the 'for-linus' branch of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git for-linus to receive the following updates: Bug fixes, small improvements and one notable change: * The system call table and the unistd.h header are now generated

[GIT PULL] s390 patches for the 4.15 merge window

2018-01-30 Thread Martin Schwidefsky
Hi Linus, please pull from the 'for-linus' branch of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git for-linus to receive the following updates: Bug fixes, small improvements and one notable change: * The system call table and the unistd.h header are now generated

Re: Avoiding information leaks between users and between processes by default? [Was: : [PATCH 1/5] prctl: add PR_ISOLATE_BP process control]

2018-01-24 Thread Martin Schwidefsky
On Wed, 24 Jan 2018 12:15:53 +0100 Pavel Machek <pa...@ucw.cz> wrote: > Hi! > > On Wed 2018-01-24 09:37:05, Dominik Brodowski wrote: > > On Wed, Jan 24, 2018 at 07:29:53AM +0100, Martin Schwidefsky wrote: > > > On Tue, 23 Jan 2018 18:07:19 +01

Re: Avoiding information leaks between users and between processes by default? [Was: : [PATCH 1/5] prctl: add PR_ISOLATE_BP process control]

2018-01-24 Thread Martin Schwidefsky
On Wed, 24 Jan 2018 12:15:53 +0100 Pavel Machek wrote: > Hi! > > On Wed 2018-01-24 09:37:05, Dominik Brodowski wrote: > > On Wed, Jan 24, 2018 at 07:29:53AM +0100, Martin Schwidefsky wrote: > > > On Tue, 23 Jan 2018 18:07:19 +0100 > > > Dominik Brodowski wr

Re: [PATCH 4/5] s390: define ISOLATE_BP to run tasks with modified branch prediction

2018-01-23 Thread Martin Schwidefsky
On Tue, 23 Jan 2018 21:32:24 +0100 Radim Krčmář wrote: > 2018-01-23 15:21+0100, Christian Borntraeger: > > Paolo, Radim, > > > > this patch not only allows to isolate a userspace process, it also allows us > > to add a new interface for KVM that would allow us to isolate a

Re: [PATCH 4/5] s390: define ISOLATE_BP to run tasks with modified branch prediction

2018-01-23 Thread Martin Schwidefsky
On Tue, 23 Jan 2018 21:32:24 +0100 Radim Krčmář wrote: > 2018-01-23 15:21+0100, Christian Borntraeger: > > Paolo, Radim, > > > > this patch not only allows to isolate a userspace process, it also allows us > > to add a new interface for KVM that would allow us to isolate a KVM guest > > CPU >

Re: [PATCH 1/5] prctl: add PR_ISOLATE_BP process control

2018-01-23 Thread Martin Schwidefsky
On Tue, 23 Jan 2018 18:07:19 +0100 Dominik Brodowski <li...@dominikbrodowski.net> wrote: > On Tue, Jan 23, 2018 at 02:07:01PM +0100, Martin Schwidefsky wrote: > > Add the PR_ISOLATE_BP operation to prctl. The effect of the process > > control is to make all branch predi

Re: [PATCH 1/5] prctl: add PR_ISOLATE_BP process control

2018-01-23 Thread Martin Schwidefsky
On Tue, 23 Jan 2018 18:07:19 +0100 Dominik Brodowski wrote: > On Tue, Jan 23, 2018 at 02:07:01PM +0100, Martin Schwidefsky wrote: > > Add the PR_ISOLATE_BP operation to prctl. The effect of the process > > control is to make all branch prediction entries created by the execution

Re: [PATCH 2/5] s390/alternative: use a copy of the facility bit mask

2018-01-23 Thread Martin Schwidefsky
On Tue, 23 Jan 2018 14:59:47 +0100 Cornelia Huck <coh...@redhat.com> wrote: > On Tue, 23 Jan 2018 14:07:02 +0100 > Martin Schwidefsky <schwidef...@de.ibm.com> wrote: > > > To be able to switch off specific CPU alternatives with kernel parameters > > make a copy

Re: [PATCH 2/5] s390/alternative: use a copy of the facility bit mask

2018-01-23 Thread Martin Schwidefsky
On Tue, 23 Jan 2018 14:59:47 +0100 Cornelia Huck wrote: > On Tue, 23 Jan 2018 14:07:02 +0100 > Martin Schwidefsky wrote: > > > To be able to switch off specific CPU alternatives with kernel parameters > > make a copy of the facility bit mask provided by S

Re: [PATCH 5/5] s390: scrub registers on kernel entry and KVM exit

2018-01-23 Thread Martin Schwidefsky
On Tue, 23 Jan 2018 14:09:50 +0100 Christian Borntraeger <borntrae...@de.ibm.com> wrote: > On 01/23/2018 02:07 PM, Martin Schwidefsky wrote: > > Clear all user space registers on entry to the kernel and all KVM guest > > registers on KVM guest exit if the register do

Re: [PATCH 5/5] s390: scrub registers on kernel entry and KVM exit

2018-01-23 Thread Martin Schwidefsky
On Tue, 23 Jan 2018 14:09:50 +0100 Christian Borntraeger wrote: > On 01/23/2018 02:07 PM, Martin Schwidefsky wrote: > > Clear all user space registers on entry to the kernel and all KVM guest > > registers on KVM guest exit if the register does not contain either a > >

[PATCH 2/5] s390/alternative: use a copy of the facility bit mask

2018-01-23 Thread Martin Schwidefsky
To be able to switch off specific CPU alternatives with kernel parameters make a copy of the facility bit mask provided by STFLE and use the copy for the decision to apply an alternative. Signed-off-by: Martin Schwidefsky <schwidef...@de.ibm.com> --- arch/s390/include/asm/facility.

[PATCH 2/5] s390/alternative: use a copy of the facility bit mask

2018-01-23 Thread Martin Schwidefsky
To be able to switch off specific CPU alternatives with kernel parameters make a copy of the facility bit mask provided by STFLE and use the copy for the decision to apply an alternative. Signed-off-by: Martin Schwidefsky --- arch/s390/include/asm/facility.h | 18 ++ arch/s390

[PATCH 5/5] s390: scrub registers on kernel entry and KVM exit

2018-01-23 Thread Martin Schwidefsky
Clear all user space registers on entry to the kernel and all KVM guest registers on KVM guest exit if the register does not contain either a parameter or a result value. Signed-off-by: Martin Schwidefsky <schwidef...@de.ibm.com> --- arch/s390/kernel/entry.

[PATCH 5/5] s390: scrub registers on kernel entry and KVM exit

2018-01-23 Thread Martin Schwidefsky
Clear all user space registers on entry to the kernel and all KVM guest registers on KVM guest exit if the register does not contain either a parameter or a result value. Signed-off-by: Martin Schwidefsky --- arch/s390/kernel/entry.S | 41 + 1 file

[PATCH 4/5] s390: define ISOLATE_BP to run tasks with modified branch prediction

2018-01-23 Thread Martin Schwidefsky
Define the ISOLATE_BP macro to enable the use of the PR_ISOLATE_BP process control to switch a task from the standard branch prediction to a modified, more secure but slower behaviour. Signed-off-by: Martin Schwidefsky <schwidef...@de.ibm.com> --- arch/s390/include/asm/processor.h

[PATCH 3/5] s390: add options to change branch prediction behaviour for the kernel

2018-01-23 Thread Martin Schwidefsky
t behaviour selected with CONFIG_KERNEL_NOBP is set to "n" then the "nobp=1" parameter can be used to enable the changed kernel branch prediction. Signed-off-by: Martin Schwidefsky <schwidef...@de.ibm.com> --- arch/s390/Kconfig | 17 + arch/s390/include/asm/proc

[PATCH 4/5] s390: define ISOLATE_BP to run tasks with modified branch prediction

2018-01-23 Thread Martin Schwidefsky
Define the ISOLATE_BP macro to enable the use of the PR_ISOLATE_BP process control to switch a task from the standard branch prediction to a modified, more secure but slower behaviour. Signed-off-by: Martin Schwidefsky --- arch/s390/include/asm/processor.h | 3 +++ arch/s390/include/asm

[PATCH 3/5] s390: add options to change branch prediction behaviour for the kernel

2018-01-23 Thread Martin Schwidefsky
t behaviour selected with CONFIG_KERNEL_NOBP is set to "n" then the "nobp=1" parameter can be used to enable the changed kernel branch prediction. Signed-off-by: Martin Schwidefsky --- arch/s390/Kconfig | 17 + arch/s390/include/asm/processor.h | 1 +

[PATCH 1/5] prctl: add PR_ISOLATE_BP process control

2018-01-23 Thread Martin Schwidefsky
exit(EXIT_FAILURE); } execve(argv[1], argv + 1, envp); perror("execve"); exit(EXIT_FAILURE); } Signed-off-by: Martin Schwidefsky <schwidef...@de.ibm.com> --- include/uapi/linux/prctl.h | 8 kernel/sys.c | 6 ++ 2 files changed,

[PATCH 1/5] prctl: add PR_ISOLATE_BP process control

2018-01-23 Thread Martin Schwidefsky
exit(EXIT_FAILURE); } execve(argv[1], argv + 1, envp); perror("execve"); exit(EXIT_FAILURE); } Signed-off-by: Martin Schwidefsky --- include/uapi/linux/prctl.h | 8 kernel/sys.c | 6 ++ 2 files changed, 14 insertions(+) diff --g

[RFC][PATCH 0/5] s390: improve speculative execution handling v2

2018-01-23 Thread Martin Schwidefsky
from a system call to the PR_ISOLATE_BP process control to run user space tasks with branch prediction isolation. My main question is if the prctl(PR_ISOLATE_BP) makes sense. Martin Schwidefsky (5): prctl: add PR_ISOLATE_BP process control s390/alternative: use a copy of the facility bit

[RFC][PATCH 0/5] s390: improve speculative execution handling v2

2018-01-23 Thread Martin Schwidefsky
from a system call to the PR_ISOLATE_BP process control to run user space tasks with branch prediction isolation. My main question is if the prctl(PR_ISOLATE_BP) makes sense. Martin Schwidefsky (5): prctl: add PR_ISOLATE_BP process control s390/alternative: use a copy of the facility bit

Re: [PATCH v2] KVM: s390: wire up bpb feature

2018-01-17 Thread Martin Schwidefsky
On Wed, 17 Jan 2018 22:43:24 +0100 Christian Borntraeger wrote: > Conny can you review and ack as well? > > Paolo, Radim, > > As the other patches need to sync on the ifetch/nospec/gmb naming I have > changed my mind. :-) > This patch is independent from the other

Re: [PATCH v2] KVM: s390: wire up bpb feature

2018-01-17 Thread Martin Schwidefsky
On Wed, 17 Jan 2018 22:43:24 +0100 Christian Borntraeger wrote: > Conny can you review and ack as well? > > Paolo, Radim, > > As the other patches need to sync on the ifetch/nospec/gmb naming I have > changed my mind. :-) > This patch is independent from the other patches (as it just provides

Re: [PATCH 4/6] s390: add system call to run tasks with modified branch prediction

2018-01-17 Thread Martin Schwidefsky
On Wed, 17 Jan 2018 12:14:52 +0100 Christian Borntraeger <borntrae...@de.ibm.com> wrote: > On 01/17/2018 11:03 AM, Florian Weimer wrote: > > On 01/17/2018 10:48 AM, Martin Schwidefsky wrote: > >> rc = syscall(__NR_s390_modify_bp); > >> if (r

Re: [PATCH 4/6] s390: add system call to run tasks with modified branch prediction

2018-01-17 Thread Martin Schwidefsky
On Wed, 17 Jan 2018 12:14:52 +0100 Christian Borntraeger wrote: > On 01/17/2018 11:03 AM, Florian Weimer wrote: > > On 01/17/2018 10:48 AM, Martin Schwidefsky wrote: > >> rc = syscall(__NR_s390_modify_bp); > >> if (rc) { > >>    

[PATCH 1/6] s390/alternative: use a copy of the facility bit mask

2018-01-17 Thread Martin Schwidefsky
To be able to switch off specific CPU alternatives with kernel parameters make a copy of the facility bit mask provided by STFLE and use the copy for the decision to apply an alternative. Reviewed-by: Christian Borntraeger <borntrae...@de.ibm.com> Signed-off-by: Martin Schwidefsky <

[PATCH 1/6] s390/alternative: use a copy of the facility bit mask

2018-01-17 Thread Martin Schwidefsky
To be able to switch off specific CPU alternatives with kernel parameters make a copy of the facility bit mask provided by STFLE and use the copy for the decision to apply an alternative. Reviewed-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky --- arch/s390/include/asm/facility.h

[PATCH 0/6] s390: improve speculative execution handling

2018-01-17 Thread Martin Schwidefsky
for retpoline, stay tuned. @Greg: I have started with the backports for the stable kernel releases, but unless the interface for gmp/nospec_ptr/nospec_load is cast in stone does it make sense to send them? Christian Borntraeger (1): KVM: s390: wire up seb feature Martin Schwidefsky (5): s39

[PATCH 0/6] s390: improve speculative execution handling

2018-01-17 Thread Martin Schwidefsky
for retpoline, stay tuned. @Greg: I have started with the backports for the stable kernel releases, but unless the interface for gmp/nospec_ptr/nospec_load is cast in stone does it make sense to send them? Christian Borntraeger (1): KVM: s390: wire up seb feature Martin Schwidefsky (5): s39

[PATCH 2/6] s390: implement nospec_[load|ptr]

2018-01-17 Thread Martin Schwidefsky
Implement nospec_load() and nospec_ptr() for s390 with the new gmb() barrier between the boundary condition and the load that may not be done speculatively. Acked-by: Christian Borntraeger <borntrae...@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidef...@de.ibm.com> --- arch/

[PATCH 2/6] s390: implement nospec_[load|ptr]

2018-01-17 Thread Martin Schwidefsky
Implement nospec_load() and nospec_ptr() for s390 with the new gmb() barrier between the boundary condition and the load that may not be done speculatively. Acked-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky --- arch/s390/include/asm/barrier.h | 38

[PATCH 6/6] s390: scrub registers on kernel entry and KVM exit

2018-01-17 Thread Martin Schwidefsky
e.ibm.com> Signed-off-by: Martin Schwidefsky <schwidef...@de.ibm.com> --- arch/s390/kernel/entry.S | 41 + 1 file changed, 41 insertions(+) diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S index 2a22c03..47227d3 100644 --- a/arch/s390/ke

[PATCH 6/6] s390: scrub registers on kernel entry and KVM exit

2018-01-17 Thread Martin Schwidefsky
Clear all user space registers on entry to the kernel and all KVM guest registers on KVM guest exit if the register does not contain either a parameter or a result value. Suggested-by: Christian Borntraeger Reviewed-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky --- arch/s390

[PATCH 4/6] s390: add system call to run tasks with modified branch prediction

2018-01-17 Thread Martin Schwidefsky
execve(argv[1], argv + 1, envp); perror("execve"); /* execve() returns only on error */ exit(EXIT_FAILURE); } Acked-by: Christian Borntraeger <borntrae...@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidef...@de.ibm.com> --- arch/s390/include/asm/t

[PATCH 5/6] KVM: s390: wire up seb feature

2018-01-17 Thread Martin Schwidefsky
reset, migration and VSIE. Signed-off-by: Christian Borntraeger <borntrae...@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidef...@de.ibm.com> --- arch/s390/include/asm/kvm_host.h | 3 ++- arch/s390/include/uapi/asm/kvm.h | 4 +++- arch/s390/kvm/kvm-s390.c | 11

[PATCH 5/6] KVM: s390: wire up seb feature

2018-01-17 Thread Martin Schwidefsky
-off-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky --- arch/s390/include/asm/kvm_host.h | 3 ++- arch/s390/include/uapi/asm/kvm.h | 4 +++- arch/s390/kvm/kvm-s390.c | 11 +++ arch/s390/kvm/vsie.c | 8 include/uapi/linux/kvm.h | 1 + 5

[PATCH 4/6] s390: add system call to run tasks with modified branch prediction

2018-01-17 Thread Martin Schwidefsky
execve(argv[1], argv + 1, envp); perror("execve"); /* execve() returns only on error */ exit(EXIT_FAILURE); } Acked-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky --- arch/s390/include/asm/thread_info.h | 4 +++ arch/s390/include/uapi/asm/unistd.h |

[PATCH 3/6] s390: add options to change branch prediction behaviour for the kernel

2018-01-17 Thread Martin Schwidefsky
t behaviour selected with CONFIG_KERNEL_NOBP is set to "n" then the "nobp=1" parameter can be used to enable the changed kernel branch prediction. Acked-by: Christian Borntraeger <borntrae...@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidef...@de.ibm.com> --- arch/s390/Kconfig

[PATCH 3/6] s390: add options to change branch prediction behaviour for the kernel

2018-01-17 Thread Martin Schwidefsky
t behaviour selected with CONFIG_KERNEL_NOBP is set to "n" then the "nobp=1" parameter can be used to enable the changed kernel branch prediction. Acked-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky --- arch/s390/Kconfig | 17 + arch/s390/include/

[GIT PULL] s390 patches for 4.15-rc7

2018-01-05 Thread Martin Schwidefsky
Hi Linus, please pull from the 'for-linus' branch of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git for-linus to receive the following updates: Four bug fixes. Heiko Carstens (1): s390/sclp: disable FORTIFY_SOURCE for early sclp code Martin Schwidefsky (1

[GIT PULL] s390 patches for 4.15-rc7

2018-01-05 Thread Martin Schwidefsky
Hi Linus, please pull from the 'for-linus' branch of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git for-linus to receive the following updates: Four bug fixes. Heiko Carstens (1): s390/sclp: disable FORTIFY_SOURCE for early sclp code Martin Schwidefsky (1

[GIT PULL] s390 patches for 4.15-rc3

2017-12-08 Thread Martin Schwidefsky
on context switch s390/mm: fix off-by-one bug in 5-level page table handling s390: fix compat system call table Julian Wiedmann (2): s390/qdio: consider ERROR buffers for inbound-full condition s390/qdio: restrict target-full handling to IQDIO Martin Schwidefsky (2): s390

[GIT PULL] s390 patches for 4.15-rc3

2017-12-08 Thread Martin Schwidefsky
on context switch s390/mm: fix off-by-one bug in 5-level page table handling s390: fix compat system call table Julian Wiedmann (2): s390/qdio: consider ERROR buffers for inbound-full condition s390/qdio: restrict target-full handling to IQDIO Martin Schwidefsky (2): s390

<    1   2   3   4   5   6   7   8   9   10   >