[PATCH] serial: jsm: change maintainer to myself

2015-12-28 Thread Gabriel Krisman Bertazi
Thadeu has moved on. Since his email address does not work anymore, it's not expected to get his ack. Signed-off-by: Gabriel Krisman Bertazi <kris...@linux.vnet.ibm.com> --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 2

Re: [PATCH] xhci: Fix soft lockup in xhci_pci_probe path when XHCI_STATE_HALTED

2016-08-01 Thread Gabriel Krisman Bertazi
rq to handle the interrupt when > XHCI_STATE_HALTED but not XHCI_STATE_DYING. > > Fixes: 27a41a83ec54 ("xhci: Cleanup only when releasing primary hcd") > BugLink: https://bugs.launchpad.net/bugs/1604058 > Signed-off-by: Kamal Mostafa <ka...@canonical.com> > Cc: &l

Re: [PATCH 2/3] nvme: implement DMA_ATTR_NO_WARN

2016-07-06 Thread Gabriel Krisman Bertazi
that, this looks good to me. Reviewed-by: Gabriel Krisman Bertazi <kris...@linux.vnet.ibm.com> > --- > drivers/nvme/host/pci.c | 10 -- > 1 file changed, 8 insertions(+), 2 deletions(-) > > diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c > index d1a8

Re: [PATCH] GenWQE: Change default access rights for device node

2016-06-29 Thread Gabriel Krisman Bertazi
ha...@linux.vnet.ibm.com> Reviewed-by: Gabriel Krisman Bertazi <kris...@linux.vnet.ibm.com> > --- > drivers/misc/genwqe/card_base.c | 15 +++ > 1 file changed, 15 insertions(+) > > diff --git a/drivers/misc/genwqe/card_base.c b/drivers/misc/genwqe/card_base.c >

Re: [PATCH 5/9] tty: serial: jsm_tty: constify uart_ops structures

2016-09-01 Thread Gabriel Krisman Bertazi
e.ops = @p; > > @bad@ > position p != {r.p,ok.p}; > identifier r.i; > struct uart_ops e; > @@ > e@i@p > > @depends on !bad disable optional_qualifier@ > identifier r.i; > @@ > static > +const > struct uart_ops i = { ... }; > // > Acked-by: Gabriel Krisman Bertazi <kris...@linux.vnet.ibm.com> -- Gabriel Krisman Bertazi

Re: [PATCH 5/6] genwqe: use pci_irq_allocate_vectors

2016-09-29 Thread Gabriel Krisman Bertazi
Christoph Hellwig <h...@lst.de> writes: > Simply the interrupt setup by using the new PCI layer helpers. Good clean up. Tested and: Acked-by: Gabriel Krisman Bertazi <kris...@linux.vnet.ibm.com> > One odd thing about this driver is that it looks like it could request >

Re: [PATCH 5/6] genwqe: use pci_irq_allocate_vectors

2016-09-29 Thread Gabriel Krisman Bertazi
Christoph Hellwig <h...@lst.de> writes: > On Thu, Sep 29, 2016 at 03:28:02PM -0300, Gabriel Krisman Bertazi wrote: >> Christoph Hellwig <h...@lst.de> writes: >> >> > Simply the interrupt setup by using the new PCI layer helpers. >> >> Good clean u

Re: [PATCH 5/6] genwqe: use pci_irq_allocate_vectors

2016-09-29 Thread Gabriel Krisman Bertazi
Christoph Hellwig <h...@lst.de> writes: > On Thu, Sep 29, 2016 at 03:45:29PM -0300, Gabriel Krisman Bertazi wrote: >> I'm stepping up to assist with the genwqe_card driver just now, since we >> (ibm) missed some of the last patches that went in. I'll add myself to >>

[PATCH 1/2] genwqe: use pci_irq_allocate_vectors

2016-10-04 Thread Gabriel Krisman Bertazi
de> Acked-by: Gabriel Krisman Bertazi <kris...@linux.vnet.ibm.com> --- drivers/misc/genwqe/card_base.h | 1 - drivers/misc/genwqe/card_utils.c | 12 ++-- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/misc/genwqe/card_base.h b/drivers/misc/genwqe/card_base.h

[PATCH 2/2] MAINTAINERS: Add entry for genwqe driver

2016-10-04 Thread Gabriel Krisman Bertazi
Frank and I maintain this Signed-off-by: Gabriel Krisman Bertazi <kris...@linux.vnet.ibm.com> Cc: ha...@linux.vnet.ibm.com --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index bd69bc0ed717..db20c3204606 100644 --- a/MAINTAINERS

Re: [PATCH] genirq/affinity: fix node generation from cpumask

2016-12-14 Thread Gabriel Krisman Bertazi
ich then led to > a bad mq allocation for nvme driver. > > Finally, we take the opportunity to fix a comment regarding the affinity > distribution when we have _more_ nodes than vectors. Thanks for taking care of this so quickly, Guilherme. Reviewed-by: Gabriel Krisman Bertazi <gabr...@krisman.be> -- Gabriel Krisman Bertazi

Re: [lkp-developer] [drm] 75f6dfe3e6: BUG:unable_to_handle_kernel

2017-01-03 Thread Gabriel Krisman Bertazi
nk not. I gave it a try with the jobfile just to be sure on top of drm-misc-next, and I couldn't reproduce the error anymore after applying Chris' patch (but I could reproduce the Oops when trying only with my patch). Also, sorry for the noise and lesson learned about virtual devices :( -- Gabriel Krisman Bertazi

Re: [drm] 4e64e5539d [ 1138.272031] NMI watchdog: BUG: soft lockup - CPU#0 stuck for 23s! [swapper:1]

2017-03-29 Thread Gabriel Krisman Bertazi
NULL pointer dereference at >>0620 >>[ 195.349309] IP: __lock_acquire+0xc8/0xfe6 > > > Sorry that looks like an old bug. While the below soft lockup > call trace looks more related to the code change. > Hi, For the record, I suspect the Null pointer dereference is already fixed in the tip of drm-misc-next. See 4fa13dbe8c86 ("drm: bochs: Don't remove uninitialized fbdev framebuffer"). -- Gabriel Krisman Bertazi

Re: [PATCH 11/28] drm/qxl: fix include notation and remove -Iinclude/drm flag

2017-04-25 Thread Gabriel Krisman Bertazi
Masahiro Yamada <yamada.masah...@socionext.com> writes: > Include instead of relative path from include/drm, then > remove the -Iinclude/drm compiler flag. > > Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> Please add Reviewed-by: Gabri

Re: [drm:qxl] BUG: sleeping function called from invalid context - qxl_bo_kmap_atomic_page()...splat

2017-05-14 Thread Gabriel Krisman Bertazi
Mike Galbraith <efa...@gmx.de> writes: > On Tue, 2017-05-09 at 04:37 +0200, Mike Galbraith wrote: >> On Mon, 2017-05-08 at 16:48 -0300, Gabriel Krisman Bertazi wrote: >> >> > Thanks for reporting this. Can you confirm the following patch prevents >> >

Re: [PATCH] MAINTAINERS: Change maintainer of genwqe driver

2017-05-18 Thread Gabriel Krisman Bertazi
ibm.com> Hi, Please take my: Acked-by: Gabriel Krisman Bertazi <gabr...@krisman.be> Thanks, -- Gabriel Krisman Bertazi

Re: [drm:qxl] BUG: sleeping function called from invalid context - qxl_bo_kmap_atomic_page()...splat

2017-05-19 Thread Gabriel Krisman Bertazi
Mike Galbraith <efa...@gmx.de> writes: > On Thu, 2017-05-18 at 17:40 -0300, Gabriel Krisman Bertazi wrote: >> > Mike Galbraith <efa...@gmx.de> writes: >> >> > >> > On Mon, 2017-05-08 at 16:48 -0300, Gabriel Krisman Bertazi wrote: >> > &

Re: [drm:qxl] BUG: sleeping function called from invalid context - qxl_bo_kmap_atomic_page()...splat

2017-05-18 Thread Gabriel Krisman Bertazi
Mike Galbraith <efa...@gmx.de> writes: > On Mon, 2017-05-08 at 16:48 -0300, Gabriel Krisman Bertazi wrote: > >> Thanks for reporting this. Can you confirm the following patch prevents >> the issue? > > Nope, it still gripes. Oops... Thanks for checking. The f

Re: [drm:qxl] BUG: sleeping function called from invalid context - qxl_bo_kmap_atomic_page()...splat

2017-05-08 Thread Gabriel Krisman Bertazi
RT. > Hi Mike, Thanks for reporting this. Can you confirm the following patch prevents the issue? >8 >From 407213129ef4a687378563cbb6ca78faa23f33bd Mon Sep 17 00:00:00 2001 From: Gabriel Krisman Bertazi <kris...@collabora.co.uk> Date: Mon, 8 May 2017 16:47:22 -0300 Subject: [PATCH]

[PATCH] x86: handle MSR exception when setting energy perf bias

2017-10-11 Thread Gabriel Krisman Bertazi
Krisman Bertazi <kris...@collabora.co.uk> --- arch/x86/kernel/cpu/intel.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index dfa90a3a5145..51082a9a3d8a 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/ar

Re: [PATCH] drm: Fix return value check in kirin_drm_platform_probe()

2017-10-12 Thread Gabriel Krisman Bertazi
Wei Yongjun <weiyongj...@huawei.com> writes: > In case of error, the function of_graph_get_remote_node() returns NULL > pointer not ERR_PTR(). The IS_ERR() test in the return value check > should be replaced with NULL test.. Looks good. Reviewed-by: Gabriel Krisma

[PATCH v2 11/15] scripts: add trie generator for UTF-8

2018-05-21 Thread Gabriel Krisman Bertazi
e next patch. Signed-off-by: Olaf Weber <o...@sgi.com> Signed-off-by: Gabriel Krisman Bertazi <kris...@collabora.co.uk> [Rebase to mainline] [Fix out-of-tree-build] [Fix checkpatch warnings] [Merge back robustness fixes from original patch. Requested by Dave Chinner] [Update

[PATCH v2 07/15] nls: Add new interface for string comparisons

2018-05-21 Thread Gabriel Krisman Bertazi
implements a new interface, allowing charsets to do the comparison, if needed. The original stricmp is left in the code, while all callers are not converted, but was rewritten the new interface. Signed-off-by: Gabriel Krisman Bertazi <kris...@collabora.co.uk> --- include/linux/nls.

[PATCH v2 12/15] nls: utf8norm: Introduce code for UTF-8 normalization

2018-05-21 Thread Gabriel Krisman Bertazi
ce RFC v1: - utf8_version_is_supported receives maj, min and rev as separate arguments. (Olaf Weber) Signed-off-by: Olaf Weber <o...@sgi.com> Signed-off-by: Gabriel Krisman Bertazi <kris...@collabora.co.uk> [Rebase to Mainline] [Fix up checkpatch.pl warnings] [Drop typedefs] [Merge with NLS s

[PATCH v2 13/15] nls: utf8norm: reduce the size of utf8data[]

2018-05-21 Thread Gabriel Krisman Bertazi
a leaf with the decomposition. Trie size is reduced from 245kB to 90kB. Signed-off-by: Olaf Weber <o...@sgi.com> Signed-off-by: Gabriel Krisman Bertazi <kris...@collabora.co.uk> [Rebase to mainline] [Fix checkpatch errors] [Extract robustness fixes and merge back to original mkutf8data.c

[PATCH v2 10/15] nls: utf8norm: Add unicode character database files

2018-05-21 Thread Gabriel Krisman Bertazi
<o...@sgi.com> Signed-off-by: Gabriel Krisman Bertazi <kris...@collabora.co.uk> [Move ucd directory to fs/nls/] [Update to ucd-10.0.0] --- fs/nls/ucd/README | 33 + 1 file changed, 33 insertions(+) create mode 100644 fs/nls/ucd/README diff --git a/fs/

[PATCH v2 09/15] nls: Add optional normalization and casefold hooks

2018-05-21 Thread Gabriel Krisman Bertazi
Signed-off-by: Gabriel Krisman Bertazi <kris...@collabora.co.uk> --- include/linux/nls.h | 28 +++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/include/linux/nls.h b/include/linux/nls.h index 72698d524b42..efd3712f0e81 100644 --- a/include/linux

[PATCH v2 08/15] nls: Let charsets define the behavior of tolower/toupper

2018-05-21 Thread Gabriel Krisman Bertazi
= charset_toupper, + .uppercase = charset_tolower, }; @@ struct nls_table *t; expression A; expression nc; @@ ( - nc = t->charset2lower[A] + nc = nls_tolower(t, A) | - nc = t->charset2upper[A] + nc = nls_toupper(t, A) ) <... - if(!nc) - nc = A; ...> Signed-off-by: Gab

[PATCH v2 15/15] nls: utf8norm: Introduce test module for utf8norm implementation

2018-05-21 Thread Gabriel Krisman Bertazi
Changes since RFC v2: - Merge with NLS Changes since RFC v1: - Include comparison tests for matching strings with different lengths. - Include tests for characters included in unicode 8.0.0, 9.0.0 and 10.0.0. Signed-off-by: Gabriel Krisman Bertazi <kris...@collabora.co.uk> ---

[PATCH v2 14/15] nls: utf8norm: Integrate utf8norm code with NLS subsystem

2018-05-21 Thread Gabriel Krisman Bertazi
on comparison functions. - Change length type to size_t. Signed-off-by: Gabriel Krisman Bertazi <kris...@collabora.co.uk> --- fs/nls/Makefile | 2 +- fs/nls/nls_utf8n-core.c | 291 fs/nls/nls_utf8n-norm.c | 6 + fs/nls/utf8n.h |

[PATCH v2 04/15] nls: Split default charset from NLS core

2018-05-21 Thread Gabriel Krisman Bertazi
Changes since v1: - Fix build as a module (kbuild test robot) Signed-off-by: Gabriel Krisman Bertazi <kris...@collabora.co.uk> --- fs/nls/Makefile | 1 + fs/nls/nls_core.c| 94 fs/nls/{nls_base.c => nls_defaul

[PATCH v2 05/15] nls: Split struct nls_charset from struct nls_table

2018-05-21 Thread Gabriel Krisman Bertazi
nls_charset = { + .alias = alias_str, }; Signed-off-by: Gabriel Krisman Bertazi <kris...@collabora.co.uk> --- fs/nls/mac-celtic.c | 12 +--- fs/nls/mac-centeuro.c | 12 +--- fs/nls/mac-croatian.c | 12 +--- fs/nls/mac-cyrillic.c | 12 +--- fs/n

[PATCH v2 03/15] nls: Wrap charset hooks in ops structure

2018-05-21 Thread Gabriel Krisman Bertazi
->uni2char + c->ops->uni2char | - c->char2uni + c->ops->char2uni ) Signed-off-by: Gabriel Krisman Bertazi <kris...@collabora.co.uk> --- fs/nls/mac-celtic.c | 8 ++-- fs/nls/mac-centeuro.c | 8 ++-- fs/nls/mac-croatian.c | 8 ++-- fs/nls/mac-cyrillic.c

[PATCH v2 06/15] nls: Add support for multiple versions of an encoding

2018-05-21 Thread Gabriel Krisman Bertazi
NLS charsets wanting to use this feature can implement the load_create() hook, which creates a nls_table for that specific encoding version. The charset code is responsible for freeing the table memory when the module is removed. Signed-off-by: Gabriel Krisman Bertazi <kris...@collabora.co

[PATCH v2 00/15] NLS refactor and UTF-8 normalization

2018-05-21 Thread Gabriel Krisman Bertazi
Krisman Bertazi (11): nls: Wrap uni2char/char2uni callers nls: Wrap charset field access nls: Wrap charset hooks in ops structure nls: Split default charset from NLS core nls: Split struct nls_charset from struct nls_table nls: Add support for multiple versions of an encoding nls: Add new

[PATCH v2 01/15] nls: Wrap uni2char/char2uni callers

2018-05-21 Thread Gabriel Krisman Bertazi
Generated with the following coccinele script: @@ expression A, B, C, D; @@ ( - A->uni2char(B, C, D) + nls_uni2char(A, B, C, D) | - A->char2uni(B, C, D) + nls_char2uni(A, B, C, D) ) Signed-off-by: Gabriel Krisman Bertazi <kris...@collabora.co.uk> --- drivers/staging/ncpfs/ncp

[PATCH v2 02/15] nls: Wrap charset field access

2018-05-21 Thread Gabriel Krisman Bertazi
Which will simplify further patches. No behavior changes intended. @@ struct nls_table *c; @@ - c->charset + nls_charset_name(c) Signed-off-by: Gabriel Krisman Bertazi <kris...@collabora.co.uk> --- drivers/staging/ncpfs/ioctl.c | 13 +++-- fs/befs/linuxvfs.c

[PATCH] x86: handle MSR exception when setting energy perf bias

2017-10-11 Thread Gabriel Krisman Bertazi
Krisman Bertazi --- arch/x86/kernel/cpu/intel.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index dfa90a3a5145..51082a9a3d8a 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c

Re: [PATCH] drm: Fix return value check in kirin_drm_platform_probe()

2017-10-12 Thread Gabriel Krisman Bertazi
Wei Yongjun writes: > In case of error, the function of_graph_get_remote_node() returns NULL > pointer not ERR_PTR(). The IS_ERR() test in the return value check > should be replaced with NULL test.. Looks good. Reviewed-by: Gabriel Krisman Bertazi -- Gabriel Krisman Bertazi

Re: [PATCH] um: ubd: Fix crash from option parsing

2021-01-19 Thread Gabriel Krisman Bertazi
Paul Lawrence writes: > Below patch will cause NULL ptr dereferences if the optional filenames > are not present. > > Fixes: ef3ba87cb7c9 (um: ubd: Set device serial attribute from cmdline) > Signed-off-by: Paul Lawrence Looks good. Reviewed-by: Gabriel Krisman Bertazi To

Re: [PATCH v4 0/2] Syscall User Redirection

2020-08-04 Thread Gabriel Krisman Bertazi
nk there is a right answer for this one, but I don't see anyone wanting to use these features at the same time. I think as long as it is documented behavior, it should be fine either way. -- Gabriel Krisman Bertazi

Re: [PATCH v2 7/9] x86: Use current USER_CS to setup correct context on vmx entry

2020-10-02 Thread Gabriel Krisman Bertazi
Sean Christopherson writes: > On Thu, Oct 01, 2020 at 02:52:32PM -0700, Andy Lutomirski wrote: >> On Thu, Oct 1, 2020 at 1:59 PM Gabriel Krisman Bertazi >> wrote: >> > >> > vmx_prepare_switch_to_guest shouldn't use is_64bit_mm, which has a >&g

[PATCH v3 03/10] x86: oprofile: Avoid TIF_IA32 when checking 64bit mode

2020-10-03 Thread Gabriel Krisman Bertazi
In preparation to remove TIF_IA32, stop using it in oprofile code. Signed-off-by: Gabriel Krisman Bertazi --- arch/x86/oprofile/backtrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/oprofile/backtrace.c b/arch/x86/oprofile/backtrace.c index a2488b6e27d6

[PATCH v3 00/10] Reclaim TIF_IA32 and TIF_X32

2020-10-03 Thread Gabriel Krisman Bertazi
these paths with x32 and ia32 binaries. Gabriel Krisman Bertazi (10): x86: events: Avoid TIF_IA32 when checking 64bit mode x86: Simplify compat syscall userspace allocation x86: oprofile: Avoid TIF_IA32 when checking 64bit mode x86: elf: Use e_machine to choose DLINFO in compat elf

[PATCH v3 01/10] x86: events: Avoid TIF_IA32 when checking 64bit mode

2020-10-03 Thread Gabriel Krisman Bertazi
In preparation to remove TIF_IA32, stop using it in perf events code. Tested by running perf on 32-bit, 64-bit and x32 applications. Suggested-by: Andy Lutomirski Signed-off-by: Gabriel Krisman Bertazi Acked-by: Peter Zijlstra (Intel) --- arch/x86/events/core.c | 2 +- arch/x86/events

[PATCH v3 02/10] x86: Simplify compat syscall userspace allocation

2020-10-03 Thread Gabriel Krisman Bertazi
Lutomirski Cc: Christoph Hellwig Signed-off-by: Gabriel Krisman Bertazi --- arch/x86/include/asm/compat.h | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/arch/x86/include/asm/compat.h b/arch/x86/include/asm/compat.h index d4edf281fff4..a4b5126dff4e 100644

[PATCH v3 07/10] elf: Expose ELF header on arch_setup_additional_pages

2020-10-03 Thread Gabriel Krisman Bertazi
to arch_setup_additional_pages, that x86 can reimplement to receive the extra parameter just for ELF files. This requires no changes to other architectures, who can continue to use the original arch_setup_additional_pages for ELF and non-ELF binaries. Signed-off-by: Gabriel Krisman Bertazi --- fs/binfmt_elf.c

[PATCH v3 08/10] x86: elf: Use e_machine to select additional_pages between x32

2020-10-03 Thread Gabriel Krisman Bertazi
object when executing setup_additional_pages in compat mode. Signed-off-by: Gabriel Krisman Bertazi --- Changes since v2: - Avoid a function-like macro in compat_setup_additional_pages (Andy) --- arch/x86/entry/vdso/vma.c | 4 ++-- arch/x86/include/asm/elf.h | 6 -- 2 files changed, 6

[PATCH v3 06/10] x86: elf: Use e_machine to select start_thread for x32

2020-10-03 Thread Gabriel Krisman Bertazi
start_thread in compat mode. Signed-off-by: Gabriel Krisman Bertazi --- Changes since v2: - Avoid a function-like macro in compat_start_thread (Andy) --- arch/x86/include/asm/elf.h | 5 +++-- arch/x86/kernel/process_64.c | 5 ++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git

[PATCH v3 04/10] x86: elf: Use e_machine to choose DLINFO in compat

2020-10-03 Thread Gabriel Krisman Bertazi
in compat mode. Signed-off-by: Gabriel Krisman Bertazi Reviewed-by: Andy Lutomirski --- arch/x86/include/asm/elf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/elf.h b/arch/x86/include/asm/elf.h index b9a5d488f1a5..9220efc65d78 100644 --- a/arch/x86

[PATCH v3 05/10] elf: Expose ELF header in compat_start_thread

2020-10-03 Thread Gabriel Krisman Bertazi
, and it prevents affecting non-ELF code paths for x86. Signed-off-by: Gabriel Krisman Bertazi --- fs/binfmt_elf.c| 2 +- fs/compat_binfmt_elf.c | 9 +++-- include/linux/elf.h| 5 + 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index

[PATCH v3 09/10] x86: Convert mmu context ia32_compat into a proper flags field

2020-10-03 Thread Gabriel Krisman Bertazi
cannot rely on other methods like user_64bit_mode() to decide how to patch, so it needs some specific flag like this. Signed-off-by: Gabriel Krisman Bertazi --- Changes since v2: - Rename MM_CONTEXT_GATE_PAGE -> MM_CONTEXT_HAS_VSYSCALL (andy) --- arch/x86/entry/vsyscall/vsyscall_64.c |

[PATCH v3 10/10] x86: Reclaim TIF_IA32 and TIF_X32

2020-10-03 Thread Gabriel Krisman Bertazi
Now that these flags are no longer used, reclaim those TI bits. Signed-off-by: Gabriel Krisman Bertazi --- arch/x86/include/asm/thread_info.h | 4 arch/x86/kernel/process_64.c | 6 -- 2 files changed, 10 deletions(-) diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86

[PATCH v5 5/9] kernel: Implement selective syscall userspace redirection

2020-08-10 Thread Gabriel Krisman Bertazi
values - Rename to syscall user dispatcher Cc: Matthew Wilcox Cc: Andy Lutomirski Cc: Paul Gofman Cc: Kees Cook Cc: linux-...@vger.kernel.org Signed-off-by: Gabriel Krisman Bertazi --- arch/Kconfig | 21 ++ fs/exec.c | 8 ++ include

[PATCH v5 4/9] signal: Expose SYS_USER_DISPATCH si_code type

2020-08-10 Thread Gabriel Krisman Bertazi
SYS_USER_DISPATCH will be triggered when a syscall is sent to userspace by the Syscall User Dispatch mechanism. This adjusts eventual BUILD_BUG_ON around the tree. Signed-off-by: Gabriel Krisman Bertazi --- arch/x86/kernel/signal_compat.c| 2 +- include/uapi/asm-generic/siginfo.h | 3

[PATCH v5 0/9] Syscall User Dispatch

2020-08-10 Thread Gabriel Krisman Bertazi
...@collabora.com/ Gabriel Krisman Bertazi (9): kernel: Support TIF_SYSCALL_INTERCEPT flag kernel: entry: Support TIF_SYSCAL_INTERCEPT on common entry code x86: vdso: Expose sigreturn address on vdso to the kernel signal: Expose SYS_USER_DISPATCH si_code type kernel: Implement selective

[PATCH v5 3/9] x86: vdso: Expose sigreturn address on vdso to the kernel

2020-08-10 Thread Gabriel Krisman Bertazi
avoid dispatching syscalls from that region to userspace. Suggested-by: Andy Lutomirski Signed-off-by: Gabriel Krisman Bertazi --- arch/x86/entry/vdso/vdso2c.c | 2 ++ arch/x86/entry/vdso/vdso32/sigreturn.S | 2 ++ arch/x86/entry/vdso/vma.c | 15 +++ arch/x86

[PATCH v5 1/9] kernel: Support TIF_SYSCALL_INTERCEPT flag

2020-08-10 Thread Gabriel Krisman Bertazi
code. This was tested by running the selftests for seccomp. No regressions were observed, even though I had 4 tests consistently failing (with and without this patch). Signed-off-by: Gabriel Krisman Bertazi --- include/linux/sched.h | 6 ++- include/linux/seccomp.h | 20

[PATCH v5 2/9] kernel: entry: Support TIF_SYSCAL_INTERCEPT on common entry code

2020-08-10 Thread Gabriel Krisman Bertazi
Syscalls that use common entry code (x86 at the moment of this writing) need to have their defines updated inside this commit. This added a measureable overhead of 1ns to seccomp_benchmark selftests on a bare-metal AMD system. Signed-off-by: Gabriel Krisman Bertazi --- arch/x86/include/asm

[PATCH v5 9/9] doc: Document Syscall User Dispatch

2020-08-10 Thread Gabriel Krisman Bertazi
Explain the interface, provide some background and security notes. Signed-off-by: Gabriel Krisman Bertazi --- .../admin-guide/syscall-user-dispatch.rst | 87 +++ 1 file changed, 87 insertions(+) create mode 100644 Documentation/admin-guide/syscall-user-dispatch.rst diff

[PATCH v5 8/9] selftests: Add kselftest for syscall user dispatch

2020-08-10 Thread Gabriel Krisman Bertazi
- Add SPDX header - Use __NR_syscalls if available Signed-off-by: Gabriel Krisman Bertazi --- tools/testing/selftests/Makefile | 1 + .../syscall_user_dispatch/.gitignore | 2 + .../selftests/syscall_user_dispatch/Makefile | 9 + .../selftests/syscall_user_dispatch

[PATCH v5 7/9] x86: Enable Syscall User Dispatch

2020-08-10 Thread Gabriel Krisman Bertazi
Syscall User Dispatch requirements are fully supported in x86. This patch flips the switch, marking it as supported. This was tested against Syscall User Dispatch selftest. Signed-off-by: Gabriel Krisman Bertazi --- arch/x86/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86

[PATCH v5 6/9] kernel: entry: Support Syscall User Dispatch for common syscall entry

2020-08-10 Thread Gabriel Krisman Bertazi
to userspace. In addition, doing it after ptrace makes the code in syscall_exit_work slightly simpler, since it doesn't require special handling for this feature. Signed-off-by: Gabriel Krisman Bertazi --- kernel/entry/common.c | 8 1 file changed, 8 insertions(+) diff --git a/kernel

[PATCH v2 4/9] x86: elf: Use e_machine to choose DLINFO in compat

2020-10-01 Thread Gabriel Krisman Bertazi
in compat mode. Signed-off-by: Gabriel Krisman Bertazi --- arch/x86/include/asm/elf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/elf.h b/arch/x86/include/asm/elf.h index b9a5d488f1a5..9220efc65d78 100644 --- a/arch/x86/include/asm/elf.h +++ b/arch/x86

[PATCH v2 3/9] x86: oprofile: Avoid TIF_IA32 when checking 64bit mode

2020-10-01 Thread Gabriel Krisman Bertazi
In preparation to remove TIF_IA32, stop using it in oprofile code. Signed-off-by: Gabriel Krisman Bertazi --- arch/x86/oprofile/backtrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/oprofile/backtrace.c b/arch/x86/oprofile/backtrace.c index a2488b6e27d6

[PATCH v2 0/9] Reclaim TIF_IA32 and TIF_X32

2020-10-01 Thread Gabriel Krisman Bertazi
remove the TI flags. Finally, the testing for this patchset was done exercising the code paths of each case where the flags were used with x32, ia32 and x64 applications. Finally, x86 selftests showed no regressions. Gabriel Krisman Bertazi (9): x86: events: Avoid TIF_IA32 when checking 64bit

[PATCH v2 5/9] x86: elf: Use e_machine to select start_thread for x32

2020-10-01 Thread Gabriel Krisman Bertazi
start_thread in compat mode. Signed-off-by: Gabriel Krisman Bertazi --- arch/x86/include/asm/elf.h | 11 +-- arch/x86/kernel/process_64.c | 11 +++ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/arch/x86/include/asm/elf.h b/arch/x86/include/asm/elf.h index

[PATCH v2 2/9] x86: Simplify compat syscall userspace allocation

2020-10-01 Thread Gabriel Krisman Bertazi
Lutomirski Cc: Christoph Hellwig Signed-off-by: Gabriel Krisman Bertazi --- arch/x86/include/asm/compat.h | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/arch/x86/include/asm/compat.h b/arch/x86/include/asm/compat.h index d4edf281fff4..a4b5126dff4e 100644

[PATCH v2 7/9] x86: Use current USER_CS to setup correct context on vmx entry

2020-10-01 Thread Gabriel Krisman Bertazi
. I tested this by running VMs with 64 and 32 bits payloads from 64/32 programs. Signed-off-by: Gabriel Krisman Bertazi --- arch/x86/kvm/vmx/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c index 7b2a068f08c1..b5aafd9e5f5d

[PATCH v2 1/9] x86: events: Avoid TIF_IA32 when checking 64bit mode

2020-10-01 Thread Gabriel Krisman Bertazi
In preparation to remove TIF_IA32, stop using it in perf events code. Tested by running perf on 32-bit, 64-bit and x32 applications. Suggested-by: Andy Lutomirski Signed-off-by: Gabriel Krisman Bertazi Acked-by: Peter Zijlstra (Intel) --- arch/x86/events/core.c | 2 +- arch/x86/events

[PATCH v2 6/9] x86: elf: Use e_machine to select setup_additional_pages for x32

2020-10-01 Thread Gabriel Krisman Bertazi
object when executing start_thread in compat mode. Signed-off-by: Gabriel Krisman Bertazi --- arch/x86/entry/vdso/vma.c | 21 - arch/x86/include/asm/elf.h | 11 --- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/arch/x86/entry/vdso/vma.c b/arch/x86

[PATCH v2 9/9] x86: Reclaim TIF_IA32 and TIF_X32

2020-10-01 Thread Gabriel Krisman Bertazi
Now that these flags are no longer used, reclaim those TI bits. Signed-off-by: Gabriel Krisman Bertazi --- arch/x86/include/asm/thread_info.h | 4 arch/x86/kernel/process_64.c | 6 -- 2 files changed, 10 deletions(-) diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86

[PATCH v2 8/9] x86: Convert mmu context ia32_compat into a proper flags field

2020-10-01 Thread Gabriel Krisman Bertazi
cannot rely on other methods like user_64bit_mode() to decide how to patch, so it needs some specific flag like this. Signed-off-by: Gabriel Krisman Bertazi --- arch/x86/entry/vsyscall/vsyscall_64.c | 2 +- arch/x86/include/asm/mmu.h| 6 -- arch/x86/include/asm/mmu_context.h

Re: [PATCH] f2fs: reject CASEFOLD inode flag without casefold feature

2020-10-08 Thread Gabriel Krisman Bertazi
ted-by: syzbot+05139c4039d0679e1...@syzkaller.appspotmail.com > Fixes: 2c2eb7a300cd ("f2fs: Support case-insensitive file name lookups") > Signed-off-by: Eric Biggers Looks good. For the record, this is fixed on ext4 already. Reviewed-by: Gabriel Krisman Bertazi -- Gabriel Krisman Bertazi

[PATCH 0/6] Prepare for removal of TIF_IA32 and TIF_X32

2020-09-12 Thread Gabriel Krisman Bertazi
came from Andy Lutomirski (Thank you!) These were tested by exercising these paths with x32 and ia32 binaries. Gabriel Krisman Bertazi (6): x86: events: Avoid TIF_IA32 when checking 64bit mode x86: Simplify compat syscall userspace allocation x86: oprofile: Avoid TIF_IA32 when checking

[PATCH 5/6] x86: elf: Use e_machine to select start_thread for x32

2020-09-12 Thread Gabriel Krisman Bertazi
start_thread in compat mode. Signed-off-by: Gabriel Krisman Bertazi --- arch/x86/include/asm/elf.h | 11 +-- arch/x86/kernel/process_64.c | 11 +++ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/arch/x86/include/asm/elf.h b/arch/x86/include/asm/elf.h index

[PATCH 1/6] x86: events: Avoid TIF_IA32 when checking 64bit mode

2020-09-12 Thread Gabriel Krisman Bertazi
In preparation to remove TIF_IA32, stop using it in perf events code. Tested by running perf on 32-bit, 64-bit and x32 applications. Suggested-by: Andy Lutomirski Signed-off-by: Gabriel Krisman Bertazi --- arch/x86/events/core.c | 2 +- arch/x86/events/intel/ds.c | 2 +- arch/x86/events

[PATCH 2/6] x86: Simplify compat syscall userspace allocation

2020-09-12 Thread Gabriel Krisman Bertazi
Lutomirski Cc: Christoph Hellwig Signed-off-by: Gabriel Krisman Bertazi --- arch/x86/include/asm/compat.h | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/arch/x86/include/asm/compat.h b/arch/x86/include/asm/compat.h index d4edf281fff4..a4b5126dff4e 100644

[PATCH 4/6] x86: elf: Use e_machine to choose DLINFO in compat

2020-09-12 Thread Gabriel Krisman Bertazi
in compat mode. Signed-off-by: Gabriel Krisman Bertazi --- arch/x86/include/asm/elf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/elf.h b/arch/x86/include/asm/elf.h index b9a5d488f1a5..9220efc65d78 100644 --- a/arch/x86/include/asm/elf.h +++ b/arch/x86

[PATCH 3/6] x86: oprofile: Avoid TIF_IA32 when checking 64bit mode

2020-09-12 Thread Gabriel Krisman Bertazi
In preparation to remove TIF_IA32, stop using it in oprofile code. Signed-off-by: Gabriel Krisman Bertazi --- arch/x86/oprofile/backtrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/oprofile/backtrace.c b/arch/x86/oprofile/backtrace.c index a2488b6e27d6

[PATCH 6/6] x86: elf: Use e_machine to select setup_additional_pages for x32

2020-09-12 Thread Gabriel Krisman Bertazi
object when executing start_thread in compat mode. Signed-off-by: Gabriel Krisman Bertazi --- arch/x86/entry/vdso/vma.c | 21 - arch/x86/include/asm/elf.h | 11 --- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/arch/x86/entry/vdso/vma.c b/arch/x86

Re: [PATCH 2/6] x86: Simplify compat syscall userspace allocation

2020-09-12 Thread Gabriel Krisman Bertazi
Christoph Hellwig writes: > On Sat, Sep 12, 2020 at 03:05:49AM -0400, Gabriel Krisman Bertazi wrote: >> When allocating user memory space for a compat system call, don't >> consider whether the originating code is IA32 or X32, just allocate from >> a safe region for bot

Re: [PATCH v12 4/4] ext4: Use generic casefolding support

2020-09-20 Thread Gabriel Krisman Bertazi
ncoding check here is superfluous, since the has_strict_mode() cannot be true if !s_encoding. Not related to this patch though. Daniel, are you still working on getting this upstream? The fscrypt support would be very useful for us. :) In the hope this will get upstream, as its been flying for a while and looks correct. Reviewed-by: Gabriel Krisman Bertazi -- Gabriel Krisman Bertazi

Re: [PATCH v6 1/9] kernel: Support TIF_SYSCALL_INTERCEPT flag

2020-09-11 Thread Gabriel Krisman Bertazi
pet...@infradead.org writes: > On Fri, Sep 04, 2020 at 04:31:39PM -0400, Gabriel Krisman Bertazi wrote: >> +static inline void __set_tsk_syscall_intercept(struct task_struct *tsk, >> + unsigned int type) >> +{ >> +tsk

Re: [PATCH v6 2/9] kernel: entry: Support TIF_SYSCAL_INTERCEPT on common entry code

2020-09-11 Thread Gabriel Krisman Bertazi
pet...@infradead.org writes: > On Fri, Sep 04, 2020 at 04:31:40PM -0400, Gabriel Krisman Bertazi wrote: >> diff --git a/include/linux/entry-common.h b/include/linux/entry-common.h >> index efebbffcd5cc..72ce9ca860c6 100644 >> --- a/include/linux/entry-common.h >>

[PATCH] entry: Use different define for selector variable in SUD

2021-01-01 Thread Gabriel Krisman Bertazi
Krisman Bertazi --- .../admin-guide/syscall-user-dispatch.rst | 4 ++-- include/uapi/linux/prctl.h | 2 ++ kernel/entry/syscall_user_dispatch.c | 4 ++-- .../syscall_user_dispatch/sud_benchmark.c | 8 +--- .../selftests

Kernel prctl feature for syscall interception and emulation

2020-11-18 Thread Gabriel Krisman Bertazi
provide some background and security notes. Signed-off-by: Gabriel Krisman Bertazi Reviewed-by: Kees Cook --- .../admin-guide/syscall-user-dispatch.rst | 87 +++ 1 file changed, 87 insertions(+) create mode 100644 Documentation/admin-guide/syscall-user-dispatch.rst diff --gi

Re: Kernel prctl feature for syscall interception and emulation

2020-11-19 Thread Gabriel Krisman Bertazi
Rich Felker writes: > On Wed, Nov 18, 2020 at 01:57:26PM -0500, Gabriel Krisman Bertazi via > Libc-alpha wrote: [...] > > SIGSYS (or signal handling in general) is not the right way to do > this. It has all the same problems that came up in seccomp filtering > with SIGS

Re: Kernel prctl feature for syscall interception and emulation

2020-11-19 Thread Gabriel Krisman Bertazi
Rich Felker writes: > On Thu, Nov 19, 2020 at 11:15:46AM -0500, Gabriel Krisman Bertazi wrote: >> Rich Felker writes: >> >> > On Wed, Nov 18, 2020 at 01:57:26PM -0500, Gabriel Krisman Bertazi via >> > Libc-alpha wrote: >> >> [...] >&g

Re: [PATCH v7 3/7] kernel: Implement selective syscall userspace redirection

2020-11-19 Thread Gabriel Krisman Bertazi
Gabriel Krisman Bertazi writes: > Introduce a mechanism to quickly disable/enable syscall handling for a > specific process and redirect to userspace via SIGSYS. This is useful > for processes with parts that require syscall redirection and parts that > don't, but who nee

[PATCH 03/10] kernel: entry: Wire up syscall_work in common entry code

2020-11-13 Thread Gabriel Krisman Bertazi
Prepares the common entry code to use the SYSCALL_WORK flags. They will be defined in subsequent patches for each type of syscall work. SYSCALL_WORK_ENTRY/EXIT are defined for the transition, as they will replace the TIF_ equivalent defines. Signed-off-by: Gabriel Krisman Bertazi --- include

[PATCH 06/10] ptrace: Migrate to use SYSCALL_TRACE flag

2020-11-13 Thread Gabriel Krisman Bertazi
on the accessor macros, such that the flag is still correctly resolved for architectures that don't use the generic entry code and still rely on TIF flags for system call work. Signed-off-by: Gabriel Krisman Bertazi --- include/asm-generic/syscall.h | 14 +++--- include/linux/entry-common.h | 10

[PATCH 00/10] Migrate syscall entry/exit work to SYSCALL_WORK flagset

2020-11-13 Thread Gabriel Krisman Bertazi
on the list for a while. Gabriel Krisman Bertazi (10): x86: Expose syscall_work field in thread_info kernel: entry: Expose helpers to migrate TIF to SYSCALL_WORK flags kernel: entry: Wire up syscall_work in common entry code seccomp: Migrate to use SYSCALL_WORK flag tracepoints: Migrate to use

[PATCH 07/10] ptrace: Migrate TIF_SYSCALL_EMU to use SYSCALL_WORK flag

2020-11-13 Thread Gabriel Krisman Bertazi
on the accessor macros, such that the flag is still correctly resolved for architectures that don't use the generic entry code and still rely on TIF flags for system call work. Signed-off-by: Gabriel Krisman Bertazi --- include/linux/entry-common.h | 8 ++-- include/linux/thread_info.h | 2 ++ include

[PATCH 10/10] x86: Reclaim unused x86 TI flags

2020-11-13 Thread Gabriel Krisman Bertazi
Reclaim TI flags that were migrated to syscall_work flags. Signed-off-by: Gabriel Krisman Bertazi --- arch/x86/include/asm/thread_info.h | 10 -- 1 file changed, 10 deletions(-) diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h index b217f63e73b7

[PATCH 01/10] x86: Expose syscall_work field in thread_info

2020-11-13 Thread Gabriel Krisman Bertazi
This field will be used by SYSCALL_WORK flags, migrated from TI flags. Signed-off-by: Gabriel Krisman Bertazi --- arch/x86/include/asm/thread_info.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h index 93277a8d2ef0

[PATCH 08/10] audit: Migrate to use SYSCALL_WORK flag

2020-11-13 Thread Gabriel Krisman Bertazi
on the accessor macros, such that the flag is still correctly resolved for architectures that don't use the generic entry code and still rely on TIF flags for system call work. Signed-off-by: Gabriel Krisman Bertazi --- include/asm-generic/syscall.h | 14 +++--- include/linux/entry-common.h | 18

[PATCH 05/10] tracepoints: Migrate to use SYSCALL_WORK flag

2020-11-13 Thread Gabriel Krisman Bertazi
on the accessor macros, such that the flag is still correctly resolved for architectures that don't use the generic entry code and still rely on TIF flags for system call work. Signed-off-by: Gabriel Krisman Bertazi --- include/linux/entry-common.h | 13 + include/linux/thread_info.h | 3

[PATCH 02/10] kernel: entry: Expose helpers to migrate TIF to SYSCALL_WORK flags

2020-11-13 Thread Gabriel Krisman Bertazi
syscall entry code. Signed-off-by: Gabriel Krisman Bertazi --- include/linux/thread_info.h | 42 + 1 file changed, 42 insertions(+) diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h index e93e249a4e9b..18755373dc4d 100644 --- a/include/linux

[PATCH 04/10] seccomp: Migrate to use SYSCALL_WORK flag

2020-11-13 Thread Gabriel Krisman Bertazi
macros, such that the flag is still correctly resolved for architectures that don't use the generic entry code and still rely on TIF flags for system call work. Signed-off-by: Gabriel Krisman Bertazi --- include/linux/entry-common.h | 8 ++-- include/linux/seccomp.h | 2 +- include/linux

  1   2   3   4   >