[PATCH v9 08/10] dt-bindings: ufs: Add DT binding documentation for ufs

2020-05-13 Thread Alim Akhtar
This patch adds DT binding for samsung ufs hci Signed-off-by: Alim Akhtar --- .../bindings/ufs/samsung,exynos-ufs.yaml | 91 +++ 1 file changed, 91 insertions(+) create mode 100644 Documentation/devicetree/bindings/ufs/samsung,exynos-ufs.yaml diff --git a/Documentation/de

[PATCH v9 00/10] exynos-ufs: Add support for UFS HCI

2020-05-13 Thread Alim Akhtar
This patch-set introduces UFS (Universal Flash Storage) host controller support for Samsung family SoC. Mostly, it consists of UFS PHY and host specific driver. - Changes since v8 * fixed make dt_binding_check error as pointed by Rob * Addressed review comments from Randy Dunlap - Changes since v

[PATCH v9 09/10] scsi: ufs-exynos: add UFS host support for Exynos SoCs

2020-05-13 Thread Alim Akhtar
This patch introduces Exynos UFS host controller driver, which mainly handles vendor-specific operations including link startup, power mode change and hibernation/unhibernation. Reported-by: kbuild test robot Reported-by: Julia Lawall [robot: drivers/scsi/ufs/ufs-exynos.c:931:8-10: WARNING: pos

[PATCH v9 07/10] phy: samsung-ufs: add UFS PHY driver for samsung SoC

2020-05-13 Thread Alim Akhtar
This patch introduces Samsung UFS PHY driver. This driver supports to deal with phy calibration and power control according to UFS host driver's behavior. Reviewed-by: Kiwoong Kim Signed-off-by: Seungwon Jeon Signed-off-by: Alim Akhtar Cc: Kishon Vijay Abraham I Tested-by: Paweł Chmiel --- d

[PATCH v9 10/10] arm64: dts: Add node for ufs exynos7

2020-05-13 Thread Alim Akhtar
Adding dt node foe UFS and UFS-PHY for exynos7 SoC. Signed-off-by: Alim Akhtar Tested-by: Paweł Chmiel --- .../boot/dts/exynos/exynos7-espresso.dts | 4 ++ arch/arm64/boot/dts/exynos/exynos7.dtsi | 43 ++- 2 files changed, 45 insertions(+), 2 deletions(-) diff --git

[PATCH v9 05/10] scsi: ufs: add quirk to fix abnormal ocs fatal error

2020-05-13 Thread Alim Akhtar
From: Kiwoong Kim Some controller like Exynos determines if FATAL ERROR (0x7) in OCS field in UTRD occurs for values other than GOOD (0x0) in STATUS field in response upiu as well as errors that a host controller can't cover. This patch is to prevent from reporting command results in those cases.

Re: [patch V6 part 3 12/29] x86/entry/common: Provide idtentry_enter/exit()

2020-05-13 Thread Andy Lutomirski
On Tue, May 12, 2020 at 9:50 AM Thomas Gleixner wrote: > > Thomas Gleixner writes: > > Andy Lutomirski writes: > >> WARN_ON_ONCE(!on_thread_stack() && (regs->flags & X86_FLAGS_IF) && > >> preempt_count() == 0); > >> > >> IOW, the actual condition we want is that, if the idtenter_entry/exit > >>

Re: gcc-10: kernel stack is corrupted and fails to boot

2020-05-13 Thread Nick Desaulniers
On Wed, May 13, 2020 at 5:11 PM Linus Torvalds wrote: > > On Wed, May 13, 2020 at 4:36 PM Borislav Petkov wrote: > > > > > > Looking at them, they do have an mb() too so how about this then > > instead? > > > > #define prevent_tail_call_optimization()mb() > > Yeah, I think a full mb() is

Re: [patch V4 part 1 05/36] x86/entry: Flip _TIF_SIGPENDING and _TIF_NOTIFY_RESUME handling

2020-05-13 Thread Thomas Gleixner
Steven Rostedt writes: > On Thu, 14 May 2020 02:12:21 +0200 > Thomas Gleixner wrote: > >> I should have thought about this before, so thanks to both of you for >> making me look at it again for the very wrong reasons. >> >> Consider the patch dropped. > > I'm glad our incompetence could be of s

Re: [PATCH RESEND 3/4] Documentation/litmus-tests: Merge atomic's README into top-level one

2020-05-13 Thread Boqun Feng
On Wed, May 13, 2020 at 06:39:03AM +0900, Akira Yokosawa wrote: > From 96fa6680e3b990633ecbb6d11acf03a161b790bd Mon Sep 17 00:00:00 2001 > From: Akira Yokosawa > Date: Sun, 10 May 2020 15:12:57 +0900 > Subject: [PATCH RESEND 3/4] Documentation/litmus-tests: Merge atomic's README > into top-level

Re: [PATCH v2 bpf-next 4/7] printk: add type-printing %pT format specifier which uses BTF

2020-05-13 Thread Yonghong Song
On 5/11/20 10:56 PM, Alan Maguire wrote: printk supports multiple pointer object type specifiers (printing netdev features etc). Extend this support using BTF to cover arbitrary types. "%pT" specifies the typed format, and the pointer argument is a "struct btf_ptr *" where struct btf_ptr is

Re: [patch V4 part 3 01/29] x86/traps: Mark fixup_bad_iret() noinstr

2020-05-13 Thread Mathieu Desnoyers
- On May 12, 2020, at 9:51 PM, rostedt rost...@goodmis.org wrote: > On Fri, 8 May 2020 17:39:00 -0700 > Andy Lutomirski wrote: > >> On Tue, May 5, 2020 at 7:15 AM Thomas Gleixner wrote: >> > >> > This is called from deep entry ASM in a situation where instrumentation >> > will cause more ha

Re: [patch V4 part 1 05/36] x86/entry: Flip _TIF_SIGPENDING and _TIF_NOTIFY_RESUME handling

2020-05-13 Thread Steven Rostedt
On Thu, 14 May 2020 02:12:21 +0200 Thomas Gleixner wrote: > I should have thought about this before, so thanks to both of you for > making me look at it again for the very wrong reasons. > > Consider the patch dropped. I'm glad our incompetence could be of service to you :-/ -- Steve

Re: [PATCH 0/4] arm64: kgdb/kdb: Fix single-step debugging issues

2020-05-13 Thread Doug Anderson
Hi, On Sat, May 9, 2020 at 6:49 AM Wei Li wrote: > > This patch set is to fix several issues of single-step debugging > in kgdb/kdb on arm64. > > It seems that these issues have been shelved a very long time, > but i still hope to solve them, as the single-step debugging > is an useful feature. >

Re: [PATCH v4 4/4] MAINTAINERS: Add entry for TEE based Trusted Keys

2020-05-13 Thread Jarkko Sakkinen
On Wed, 2020-05-06 at 15:10 +0530, Sumit Garg wrote: > Add MAINTAINERS entry for TEE based Trusted Keys framework. > > Signed-off-by: Sumit Garg Acked-by: Jarkko Sakkinen /Jarkko

drivers/gpu/drm/rcar-du/rcar_du_crtc.c:515: undefined reference to `rcar_cmm_setup'

2020-05-13 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 24085f70a6e1b0cb647ec92623284641d8270637 commit: def2fbffe62c00c330c7f41584a356001179c59c kconfig: allow symbols implied by y to become m date: 9 weeks ago config: arm64-randconfig-r034-20200513 (attached

Re: [PATCH v4 3/4] doc: trusted-encrypted: updates with TEE as a new trust source

2020-05-13 Thread Jarkko Sakkinen
On Wed, 2020-05-06 at 15:10 +0530, Sumit Garg wrote: > Update documentation for Trusted and Encrypted Keys with TEE as a new > trust source. Following is brief description of updates: > > - Add a section to demostrate a list of supported devices along with > their security properties/guarantees.

Re: [PATCH v4 2/4] KEYS: trusted: Introduce TEE based Trusted Keys

2020-05-13 Thread Jarkko Sakkinen
On Wed, 2020-05-06 at 15:10 +0530, Sumit Garg wrote: > Add support for TEE based trusted keys where TEE provides the functionality > to seal and unseal trusted keys using hardware unique key. > > Refer to Documentation/tee.txt for detailed information about TEE. > > Signed-off-by: Sumit Garg Th

Re: linux-next: Signed-off-by missing for commit in the risc-v-fixes tree

2020-05-13 Thread Palmer Dabbelt
On Wed, 13 May 2020 04:19:25 PDT (-0700), Stephen Rothwell wrote: Hi all, Commit e2d8d84b18c3 ("riscv: pgtable: Fix __kernel_map_pages build error if NOMMU") is missing a Signed-off-by from its committer. Thanks. I had to manually apply this and must have forgotten -s, it's fixed now.

Re: [PATCH v4 1/4] KEYS: trusted: Add generic trusted keys framework

2020-05-13 Thread Jarkko Sakkinen
On Wed, 2020-05-06 at 15:10 +0530, Sumit Garg wrote: > Current trusted keys framework is tightly coupled to use TPM device as > an underlying implementation which makes it difficult for implementations > like Trusted Execution Environment (TEE) etc. to provide trusked keys > support in case platfor

Re: [PATCH 4/4] arm64: kgdb: Set PSTATE.SS to 1 to reenable single-step

2020-05-13 Thread Doug Anderson
Hi, On Sat, May 9, 2020 at 6:49 AM Wei Li wrote: > > After fixing wrongly single-stepping into the irq handler, when we execute > single-step in kdb/kgdb, we can see only the first step can work. > > Refer to the ARM Architecture Reference Manual (ARM DDI 0487E.a) D2.12, > i think PSTATE.SS=1 sho

Re: [PATCH 3/4] arm64: kgdb: Fix single-stepping into the irq handler wrongly

2020-05-13 Thread Doug Anderson
Hi, On Sat, May 9, 2020 at 6:49 AM Wei Li wrote: > > After the single-step exception handling oops is fixed, when we execute > single-step in kdb/kgdb, we may see it jumps to the irq_handler (where > PSTATE.D is cleared) instead of the next instruction. > > Add the prepare and cleanup work for si

Re: [PATCH 2/4] arm64: Extract kprobes_save_local_irqflag() and kprobes_restore_local_irqflag()

2020-05-13 Thread Doug Anderson
Hi, On Sat, May 9, 2020 at 6:49 AM Wei Li wrote: > > PSTATE.I and PSTATE.D are very important for single-step working. > > Without disabling interrupt on local CPU, there is a chance of > interrupt occurrence in the period of exception return and start of > out-of-line single-step, that result in

Re: [PATCH 1/4] arm64: kgdb: Fix single-step exception handling oops

2020-05-13 Thread Doug Anderson
Hi, On Sat, May 9, 2020 at 6:49 AM Wei Li wrote: > > After entering kdb due to breakpoint, when we execute 'ss' or 'go' (will > delay installing breakpoints, do single-step first), it won't work > correctly, and it will enter kdb due to oops. > > It's because the reason gotten in kdb_stub() is no

Re: [PATCH v2] tpm: eventlog: Replace zero-length array with flexible-array member

2020-05-13 Thread Gustavo A. R. Silva
On Thu, May 14, 2020 at 03:08:58AM +0300, Jarkko Sakkinen wrote: > > > > > > Signed-off-by: Gustavo A. R. Silva > > > > Reviewed-by: Kees Cook > > Thank you. > > I applied this patch, will include it to the next PR. > Awesome. :) Thanks, Jarkko. -- Gustavo

ld.lld: error: undefined symbol: kb_cs

2020-05-13 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 24085f70a6e1b0cb647ec92623284641d8270637 commit: 5990cdee689c6885b27c6d969a3d58b09002b0bc lib/mpi: Fix building for powerpc with clang date: 3 weeks ago config: powerpc-randconfig-r034-20200514 (attached a

Re: [patch V4 part 1 14/36] x86/entry: Get rid of ist_begin/end_non_atomic()

2020-05-13 Thread Steven Rostedt
On Wed, 13 May 2020 18:57:25 -0400 (EDT) Mathieu Desnoyers wrote: > - On May 5, 2020, at 9:16 AM, Thomas Gleixner t...@linutronix.de wrote: > > > This is completely overengineered and definitely not an interface which > > should be made available to anything else than this particular MCE cas

Re: [patch V4 part 1 05/36] x86/entry: Flip _TIF_SIGPENDING and _TIF_NOTIFY_RESUME handling

2020-05-13 Thread Thomas Gleixner
Steven, Mathieu (combo reply) Steven Rostedt writes: > On Wed, 13 May 2020 16:56:41 -0400 (EDT) >> > + /* deal with pending signal delivery */ >> > + if (cached_flags & _TIF_SIGPENDING) >> > + do_signal(regs); > > Looking deeper into this, it appears that do_si

Re: [patch V4 part 1 35/36] x86: Replace ist_enter() with nmi_enter()

2020-05-13 Thread Mathieu Desnoyers
- On May 5, 2020, at 9:16 AM, Thomas Gleixner t...@linutronix.de wrote: > From: Peter Zijlstra > > A few exceptions (like #DB and #BP) can happen at any location in the code, > this then means that tracers should treat events from these exceptions as > NMI-like. The interrupted context could

[PATCH v3] ACPI/IORT: Fix PMCG node always look for a single ID mapping.

2020-05-13 Thread Tuan Phan
PMCG node can have zero ID mapping if its overflow interrupt is wire based. The code to parse PMCG node can not assume it will have a single ID mapping. Fixes: 24e516049360 ("ACPI/IORT: Add support for PMCG") Reviewed-by: Hanjun Guo Signed-off-by: Tuan Phan --- v1 -> v2: - Use pmcg node to detec

Re: gcc-10: kernel stack is corrupted and fails to boot

2020-05-13 Thread Linus Torvalds
On Wed, May 13, 2020 at 4:36 PM Borislav Petkov wrote: > > > Looking at them, they do have an mb() too so how about this then > instead? > > #define prevent_tail_call_optimization()mb() Yeah, I think a full mb() is likely safe, because that's pretty much always going to be a real instruct

Re: [PATCH v2] tpm: eventlog: Replace zero-length array with flexible-array member

2020-05-13 Thread Jarkko Sakkinen
On Mon, 2020-05-11 at 22:24 -0700, Kees Cook wrote: > On Fri, May 08, 2020 at 11:38:26AM -0500, Gustavo A. R. Silva wrote: > > The current codebase makes use of the zero-length array language > > extension to the C90 standard, but the preferred mechanism to declare > > variable-length types such as

Re: [PATCH] selftests/tpm: Fix runtime error

2020-05-13 Thread Jarkko Sakkinen
On Sun, 2020-05-10 at 18:44 +, Nikita Sobolev wrote: > Hi, Jarkko Sakkinen, all! > > Thank you for your notes about commit and sorry for not copying the message > to you! It's not a biggie, no worries. > There is definitely unwanted line of code in the commit. > After deleting that one, intr

Re: [PATCH 11/18] maccess: remove strncpy_from_unsafe

2020-05-13 Thread Linus Torvalds
On Wed, May 13, 2020 at 4:21 PM Masami Hiramatsu wrote: > > > For trace_kprobe.c current order (kernel -> user fallback) is preferred > because it has another function dedicated for user memory. Well, then it should just use the "strict" kernel-only one for the non-user memory. But yes, if there

Re: [PATCH 11/18] maccess: remove strncpy_from_unsafe

2020-05-13 Thread Daniel Borkmann
On 5/14/20 1:28 AM, Al Viro wrote: On Thu, May 14, 2020 at 12:36:28AM +0200, Daniel Borkmann wrote: So on say s390 TASK_SIZE_USUALLy is (-PAGE_SIZE), which means we'd alway try the user copy first, which seems odd. I'd really like to here from the bpf folks what the expected use case is here,

Re: [PATCH v5 1/7] fs: introduce kernel_pread_file* support

2020-05-13 Thread Mimi Zohar
On Wed, 2020-05-13 at 16:34 -0700, Kees Cook wrote: > On Wed, May 13, 2020 at 07:00:43PM -0400, Mimi Zohar wrote: > > On Wed, 2020-05-13 at 15:48 -0700, Scott Branden wrote: > > > > > > On 2020-05-13 3:12 p.m., Mimi Zohar wrote: > > > > On Wed, 2020-05-13 at 21:28 +, Luis Chamberlain wrote: >

PLEASE WORK WITH ME.

2020-05-13 Thread Mr. Ted Sheppe
Dear friend, Please kindly work with me in this transaction for you will not regret it at all. First of all, I contacted you for us to work in this transaction because you are bearing the same last name identity with a deceased customer of our bank, therefore I can present you as the true n

[PATCH perf/core] perf intel-pt: Fix clang build failure in intel_pt_synth_pebs_sample

2020-05-13 Thread Gustavo A. R. Silva
Fix the following build failure generated with command $ make CC=clang HOSTCC=clang -C tools/ perf: util/intel-pt.c:1802:24: error: field 'br_stack' with variable sized type 'struct branch_stack' not at the end of a struct or class is a GNU extension [-Werror,-Wgnu-variable-sized-type-not-at-en

Re: [patch V4 part 1 29/36] x86/mce: Send #MC singal from task work

2020-05-13 Thread Mathieu Desnoyers
- On May 5, 2020, at 9:16 AM, Thomas Gleixner t...@linutronix.de wrote: > From: Peter Zijlstra > Patch title: singal -> signal. > Convert #MC over to using task_work_add(); it will run the same code > slightly later, on the return to user path of the same exception. So I suspect that swit

Re: [patch V4 part 1 30/36] lockdep: Always inline lockdep_{off,on}()

2020-05-13 Thread Mathieu Desnoyers
- On May 5, 2020, at 9:16 AM, Thomas Gleixner t...@linutronix.de wrote: [...] > + * Split the recrursion counter in two to readily detect 'off' vs recursion. recrursion -> recursion > + */ > +#define LOCKDEP_RECURSION_BITS 16 > +#define LOCKDEP_OFF (1U << LOCKDEP_RECURSION_BITS

Re: [PATCH] kdb: Make the internal env 'KDBFLAGS' undefinable

2020-05-13 Thread Doug Anderson
Hi, On Sun, May 10, 2020 at 7:18 PM Wei Li wrote: > > 'KDBFLAGS' is an internal variable of kdb, it is combined by 'KDBDEBUG' > and state flags. But the user can define an environment variable named > 'KDBFLAGS' too, so let's make it undefinable to avoid confusion. > > Signed-off-by: Wei Li > --

[PATCH 1/1] xen/manage: enable C_A_D to force reboot

2020-05-13 Thread Dongli Zhang
The systemd may be configured to mask ctrl-alt-del via "systemctl mask ctrl-alt-del.target". As a result, the pv reboot would not work as signal is ignored. This patch always enables C_A_D before the call of ctrl_alt_del() in order to force the reboot. Reported-by: Rose Wang Cc: Joe Jin Cc: Bor

Re: [PATCH v3 1/3] media: rkvdec: Fix .buf_prepare

2020-05-13 Thread Nicolas Dufresne
Le mardi 05 mai 2020 à 11:27 -0300, Ezequiel Garcia a écrit : > On Tue, 2020-05-05 at 16:05 +0200, Tomasz Figa wrote: > > On Tue, May 5, 2020 at 3:59 PM Ezequiel Garcia > > wrote: > > > On Tue, 2020-05-05 at 15:56 +0200, Tomasz Figa wrote: > > > > Hi Ezequiel, > > > > > > > > On Tue, May 5, 2020

Re: gcc-10: kernel stack is corrupted and fails to boot

2020-05-13 Thread Borislav Petkov
On Wed, May 13, 2020 at 04:13:53PM -0700, Linus Torvalds wrote: > The check itself doesn't seem worth it. If your worry is that an empty > asm() can be optimized away, then don't use an empty asm! gcc guys said we should use that since the first attempt using __attribute__((optimize("-fno-stack-p

Re: [PATCH v5 1/7] fs: introduce kernel_pread_file* support

2020-05-13 Thread Kees Cook
On Wed, May 13, 2020 at 07:00:43PM -0400, Mimi Zohar wrote: > On Wed, 2020-05-13 at 15:48 -0700, Scott Branden wrote: > > > > On 2020-05-13 3:12 p.m., Mimi Zohar wrote: > > > On Wed, 2020-05-13 at 21:28 +, Luis Chamberlain wrote: > > >> On Wed, May 13, 2020 at 05:20:14PM -0400, Mimi Zohar wrot

[PATCH v3 2/2] fs: avoid fdput() after failed fdget() in kernel_read_file_from_fd()

2020-05-13 Thread Shuah Khan
Fix kernel_read_file_from_fd() to avoid fdput() after a failed fdget(). fdput() doesn't do fput() on this file since FDPUT_FPUT isn't set in fd.flags. Fix it anyway since failed fdget() doesn't require a fdput(). This was introduced in a commit that added kernel_read_file_from_fd() as a wrapper fo

[PATCH v3 1/2] fs: avoid fdput() after failed fdget() in ksys_sync_file_range()

2020-05-13 Thread Shuah Khan
Fix ksys_sync_file_range() to avoid fdput() after a failed fdget(). fdput() doesn't do fput() on this file since FDPUT_FPUT isn't set in fd.flags. Change it anyway since failed fdget() doesn't require a fdput(). Refine the code path a bit for it to read more clearly. Reference: 22f96b3808c1 ("fs:

[PATCH v3 0/2] fs: avoid fdput() after failed fdget()

2020-05-13 Thread Shuah Khan
While debugging an unrelated problem, I noticed these two cases fdput() is called after failed fdget() while reviewing at all the fdget() and fdput() paths in the kernel. Changes since v2: Patches 1&2 changed to get rid of goto. Changes since v1: Patch 1: Changed to address review comments to r

Re: [patch V4 part 1 27/36] arm64: Prepare arch_nmi_enter() for recursion

2020-05-13 Thread Mathieu Desnoyers
- On May 5, 2020, at 9:16 AM, Thomas Gleixner t...@linutronix.de wrote: > +#define arch_nmi_enter() \ [...] \ > + ___hcr = read_sysreg(hcr_el2); \ > + if (!(__

Re: [PATCH v5 3/6] fs: Enable to enforce noexec mounts or file exec through O_MAYEXEC

2020-05-13 Thread Kees Cook
On Wed, May 13, 2020 at 11:37:16AM -0400, Stephen Smalley wrote: > On Tue, May 5, 2020 at 11:33 AM Mickaël Salaün wrote: > > > > Enable to forbid access to files open with O_MAYEXEC. Thanks to the > > noexec option from the underlying VFS mount, or to the file execute > > permission, userspace ca

Re: [PATCH 11/18] maccess: remove strncpy_from_unsafe

2020-05-13 Thread Al Viro
On Thu, May 14, 2020 at 12:36:28AM +0200, Daniel Borkmann wrote: > > So on say s390 TASK_SIZE_USUALLy is (-PAGE_SIZE), which means we'd alway > > try the user copy first, which seems odd. > > > > I'd really like to here from the bpf folks what the expected use case > > is here, and if the typical

Re: [PATCH] keys: Make the KEY_NEED_* perms an enum rather than a mask

2020-05-13 Thread David Howells
Casey Schaufler wrote: > > - if (perm & ~KEY_NEED_ALL) > > - return -EINVAL; > > + switch (need_perm) { > > + default: > > + return -EACCES; > ... > Is the change from -EINVAL to -EACCES a bug fix? > Does it introduce an incompatibility? It shouldn't happen. All the ac

Re: [PATCH v2 bpf-next 0/7] bpf, printk: add BTF-based type printing

2020-05-13 Thread Joe Perches
On Wed, 2020-05-13 at 15:50 -0700, Alexei Starovoitov wrote: > On Wed, May 13, 2020 at 3:48 PM Joe Perches wrote: > > On Wed, 2020-05-13 at 15:24 -0700, Alexei Starovoitov wrote: > > > On Tue, May 12, 2020 at 06:56:38AM +0100, Alan Maguire wrote: > > > > The printk family of functions support prin

Re: [PATCH 11/18] maccess: remove strncpy_from_unsafe

2020-05-13 Thread Daniel Borkmann
On 5/14/20 1:03 AM, Linus Torvalds wrote: On Wed, May 13, 2020 at 3:36 PM Daniel Borkmann wrote: It's used for both. Daniel, BPF real;ly needs to make up its mind about that. You *cannot* use ti for both. Yes, it happens to work on x86 and some other architectures. But on other architectu

Re: [PATCH 10/10] rcu: Nocb (de)activate through sysfs

2020-05-13 Thread Frederic Weisbecker
On Wed, May 13, 2020 at 11:42:29AM -0700, Paul E. McKenney wrote: > On Wed, May 13, 2020 at 06:47:14PM +0200, Frederic Weisbecker wrote: > > Not for merge. > > > > Make nocb toggable for a given CPU using: > > /sys/devices/system/cpu/cpu*/hotplug/nocb > > > > This is only intended for those w

Re: clean up and streamline probe_kernel_* and friends v2

2020-05-13 Thread Linus Torvalds
On Wed, May 13, 2020 at 4:04 PM Daniel Borkmann wrote: > > Aside from comments on list, the series looks reasonable to me. For BPF > the bpf_probe_read() helper would be slightly penalized for probing user > memory given we now test on copy_from_kernel_nofault() first and if that > fails only then

Re: [PATCH 11/18] maccess: remove strncpy_from_unsafe

2020-05-13 Thread Masami Hiramatsu
On Thu, 14 May 2020 00:36:28 +0200 Daniel Borkmann wrote: > On 5/13/20 9:28 PM, Christoph Hellwig wrote: > > On Wed, May 13, 2020 at 12:11:27PM -0700, Linus Torvalds wrote: > >> On Wed, May 13, 2020 at 9:01 AM Christoph Hellwig wrote: > >>> > >>> +static void bpf_strncpy(char *buf, long unsafe_a

Re: [PATCH v2 bpf-next 4/7] printk: add type-printing %pT format specifier which uses BTF

2020-05-13 Thread Joe Perches
On Wed, 2020-05-13 at 16:07 -0700, Alexei Starovoitov wrote: > On Wed, May 13, 2020 at 4:05 PM Joe Perches wrote: > > On Tue, 2020-05-12 at 06:56 +0100, Alan Maguire wrote: > > > printk supports multiple pointer object type specifiers (printing > > > netdev features etc). Extend this support usin

Re: [PATCH v4 05/12] arm64: Add call_break_hook() to early_brk64() for early kgdb

2020-05-13 Thread Doug Anderson
Hi, On Thu, May 7, 2020 at 1:09 PM Douglas Anderson wrote: > > In order to make early kgdb work properly we need early_brk64() to be > able to call into it. This is as easy as adding a call into > call_break_hook() just like we do later in the normal brk_handler(). > > Once we do this we can let

Re: net/sonic: Software evolution around the application of coding standards

2020-05-13 Thread Finn Thain
On Wed, 13 May 2020, Markus Elfring wrote: > some developers care to improve the compliance with the current > standard at various source code places, don't they? > This thread appears to be circular. Before I abandon it as folly, perhaps you would answer one more question. Out of all of the s

Re: [PATCH v2] tpm: eventlog: Replace zero-length array with flexible-array member

2020-05-13 Thread Jarkko Sakkinen
On Fri, 2020-05-08 at 11:38 -0500, Gustavo A. R. Silva wrote: > The current codebase makes use of the zero-length array language > extension to the C90 standard, but the preferred mechanism to declare > variable-length types such as these ones is a flexible array member[1][2], > introduced in C99:

Re: [PATCH] keys: Make the KEY_NEED_* perms an enum rather than a mask

2020-05-13 Thread David Howells
Paul Moore wrote: > > + case KEY_NEED_VIEW: perm = KEY__VIEW; break; > > + case KEY_NEED_READ: perm = KEY__READ; break; > > + case KEY_NEED_WRITE:perm = KEY__WRITE; break; > > + case KEY_NEED_SEARCH: perm = KEY__SEARCH; break; > > +

Re: [PATCH] kobject: Make sure the parent does not get released before its children

2020-05-13 Thread Randy Dunlap
On 5/13/20 2:30 PM, Brendan Higgins wrote: > On Wed, May 13, 2020 at 8:18 AM Heikki Krogerus > wrote: >> >> In the function kobject_cleanup(), kobject_del(kobj) is >> called before the kobj->release(). That makes it possible to >> release the parent of the kobject before the kobject itself. >> >>

Re: gcc-10: kernel stack is corrupted and fails to boot

2020-05-13 Thread Linus Torvalds
On Wed, May 13, 2020 at 3:20 PM Borislav Petkov wrote: > > Linus, shout if you'd prefer only the last three commits there: > > 950a37078aa0 x86/build: Use $(CONFIG_SHELL) > f670269a42bf x86: Fix early boot crash on gcc-10, next try > 73da86741e7f x86/build: Check whether the compiler is sane Do w

Re: [PATCH] keys: Make the KEY_NEED_* perms an enum rather than a mask

2020-05-13 Thread David Howells
Stephen Smalley wrote: > > (3) An override due to CAP_SYS_ADMIN. > > CAP_SYS_ADMIN should never skip SELinux checking. Even for Smack, > there is a separate capability (CAP_MAC_ADMIN) for that purpose. The LSM doesn't get consulted at the moment. With this patch, it will get consulted. > >

Re: [patch V4 part 1 23/36] bug: Annotate WARN/BUG/stackfail as noinstr safe

2020-05-13 Thread Mathieu Desnoyers
- On May 5, 2020, at 9:16 AM, Thomas Gleixner t...@linutronix.de wrote: > Warnings, bugs and stack protection fails from noinstr sections, e.g. low > level and early entry code, are likely to be fatal. > > Mark them as "safe" to be invoked from noinstr protected code to avoid > annotating all

Re: [PATCH v3 05/11] arm64: Add call_break_hook() to early_brk64() for early kgdb

2020-05-13 Thread Doug Anderson
Hi, On Tue, May 12, 2020 at 11:17 PM Will Deacon wrote: > > Hey Doug, > > On Tue, May 12, 2020 at 08:27:50AM -0700, Doug Anderson wrote: > > On Tue, May 12, 2020 at 12:36 AM Will Deacon wrote: > > > On Mon, May 11, 2020 at 03:45:02PM -0700, Doug Anderson wrote: > > > > On Mon, May 11, 2020 at 7:

Re: [PATCH v29 00/20] Intel SGX foundations

2020-05-13 Thread Jarkko Sakkinen
On Wed, 2020-05-06 at 09:39 -0700, Jordan Hand wrote: > On 4/21/20 2:52 PM, Jarkko Sakkinen wrote: > > Intel(R) SGX is a set of CPU instructions that can be used by applications > > to set aside private regions of code and data. The code outside the enclave > > is disallowed to access the memory in

Re: [PATCH RESEND] tpm: eventlog: Replace zero-length array with flexible-array member

2020-05-13 Thread Gustavo A. R. Silva
On Thu, May 14, 2020 at 12:39:05AM +0300, Jarkko Sakkinen wrote: > > > > [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html > > [2] https://github.com/KSPP/linux/issues/21 > > [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour") > > [4] https://github.com/KSPP/linux/issues/43 > > >

Re: [PATCH 07/10] rcu: Temporarily assume that nohz full CPUs might not be NOCB

2020-05-13 Thread Frederic Weisbecker
On Wed, May 13, 2020 at 11:25:27AM -0700, Paul E. McKenney wrote: > On Wed, May 13, 2020 at 06:47:11PM +0200, Frederic Weisbecker wrote: > > So far nohz_full CPUs had to be nocb. This requirement may change > > temporarily as we are working on preparing RCU to be able to toggle the > > nocb state o

Re: [PATCH v2 bpf-next 4/7] printk: add type-printing %pT format specifier which uses BTF

2020-05-13 Thread Alexei Starovoitov
On Wed, May 13, 2020 at 4:05 PM Joe Perches wrote: > > On Tue, 2020-05-12 at 06:56 +0100, Alan Maguire wrote: > > printk supports multiple pointer object type specifiers (printing > > netdev features etc). Extend this support using BTF to cover > > arbitrary types. "%pT" specifies the typed form

Re: gcc-10: kernel stack is corrupted and fails to boot

2020-05-13 Thread Linus Torvalds
On Wed, May 13, 2020 at 2:50 PM Arnd Bergmann wrote: > > Right, in particular since Linus started building with gcc-10 already and > would likely soon run into that problem if he hasn't already ;-) I don't happen to have stack canaries on the configs I actually boot, so I didn't notice. But yes,

Re: [PATCH v2 bpf-next 4/7] printk: add type-printing %pT format specifier which uses BTF

2020-05-13 Thread Joe Perches
On Tue, 2020-05-12 at 06:56 +0100, Alan Maguire wrote: > printk supports multiple pointer object type specifiers (printing > netdev features etc). Extend this support using BTF to cover > arbitrary types. "%pT" specifies the typed format, and the pointer > argument is a "struct btf_ptr *" where s

[PATCH] arm64: Call debug_traps_init() from trap_init() to help early kgdb

2020-05-13 Thread Douglas Anderson
A new kgdb feature will soon land (kgdb_earlycon) that lets us run kgdb much earlier. In order for everything to work properly it's important that the break hook is setup by the time we process "kgdbwait". Right now the break hook is setup in debug_traps_init() and that's called from arch_initcal

Re: [PATCH v2 bpf-next 2/7] bpf: move to generic BTF show support, apply it to seq files/strings

2020-05-13 Thread Yonghong Song
On 5/11/20 10:56 PM, Alan Maguire wrote: generalize the "seq_show" seq file support in btf.c to support a generic show callback of which we support two instances; the current seq file show, and a show with snprintf() behaviour which instead writes the type data to a supplied string. Both clas

Re: clean up and streamline probe_kernel_* and friends v2

2020-05-13 Thread Daniel Borkmann
On 5/13/20 6:00 PM, Christoph Hellwig wrote: Hi all, this series start cleaning up the safe kernel and user memory probing helpers in mm/maccess.c, and then allows architectures to implement the kernel probing without overriding the address space limit and temporarily allowing access to user mem

Re: [PATCH 11/18] maccess: remove strncpy_from_unsafe

2020-05-13 Thread Linus Torvalds
On Wed, May 13, 2020 at 3:36 PM Daniel Borkmann wrote: > > It's used for both. Daniel, BPF real;ly needs to make up its mind about that. You *cannot* use ti for both. Yes, it happens to work on x86 and some other architectures. But on other architectures, the exact same pointer value can be a

Re: [PATCH 04/10] rcu: Implement rcu_segcblist_is_offloaded() config dependent

2020-05-13 Thread Frederic Weisbecker
On Wed, May 13, 2020 at 11:20:29AM -0700, Paul E. McKenney wrote: > On Wed, May 13, 2020 at 06:47:08PM +0200, Frederic Weisbecker wrote: > > This simplify the usage of this API and avoid checking the kernel > > config from the callers. > > > > Signed-off-by: Frederic Weisbecker > > Cc: Paul E. Mc

Re: [PATCH 4.19 00/48] 4.19.123-rc1 review

2020-05-13 Thread shuah
On 5/13/20 3:44 AM, Greg Kroah-Hartman wrote: This is the start of the stable review cycle for the 4.19.123 release. There are 48 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know. Responses should be made

Re: [PATCH 5.4 00/90] 5.4.41-rc1 review

2020-05-13 Thread shuah
On 5/13/20 3:43 AM, Greg Kroah-Hartman wrote: This is the start of the stable review cycle for the 5.4.41 release. There are 90 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know. Responses should be made b

Re: [PATCH v5 1/7] fs: introduce kernel_pread_file* support

2020-05-13 Thread Mimi Zohar
On Wed, 2020-05-13 at 15:48 -0700, Scott Branden wrote: > > On 2020-05-13 3:12 p.m., Mimi Zohar wrote: > > On Wed, 2020-05-13 at 21:28 +, Luis Chamberlain wrote: > >> On Wed, May 13, 2020 at 05:20:14PM -0400, Mimi Zohar wrote: > >>> On Wed, 2020-05-13 at 12:41 -0700, Scott Branden wrote: > >>>

Re: [PATCH 5.6 000/118] 5.6.13-rc1 review

2020-05-13 Thread shuah
On 5/13/20 3:43 AM, Greg Kroah-Hartman wrote: This is the start of the stable review cycle for the 5.6.13 release. There are 118 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know. Responses should be made

Re: [patch V4 part 1 19/36] x86/entry: Exclude low level entry code from sanitizing

2020-05-13 Thread Mathieu Desnoyers
- On May 6, 2020, at 12:03 PM, Alexandre Chartre alexandre.char...@oracle.com wrote: > On 5/5/20 3:16 PM, Thomas Gleixner wrote: >> The sanitizers are not really applicable to the fragile low level entry >> code. code. Entry code needs to carefully setup a normal 'runtime' > > typo: code. co

[PATCH v13 3/8] iommu/vt-d: Add nested translation helper function

2020-05-13 Thread Jacob Pan
Nested translation mode is supported in VT-d 3.0 Spec.CH 3.8. With PASID granular translation type set to 0x11b, translation result from the first level(FL) also subject to a second level(SL) page table translation. This mode is used for SVA virtualization, where FL performs guest virtual to guest

Re: [patch V4 part 1 14/36] x86/entry: Get rid of ist_begin/end_non_atomic()

2020-05-13 Thread Mathieu Desnoyers
- On May 5, 2020, at 9:16 AM, Thomas Gleixner t...@linutronix.de wrote: > This is completely overengineered and definitely not an interface which > should be made available to anything else than this particular MCE case. This patch introduces a significant change under the radar (not explaine

[PATCH v13 6/8] iommu/vt-d: Add svm/sva invalidate function

2020-05-13 Thread Jacob Pan
When Shared Virtual Address (SVA) is enabled for a guest OS via vIOMMU, we need to provide invalidation support at IOMMU API and driver level. This patch adds Intel VT-d specific function to implement iommu passdown invalidate API for shared virtual address. The use case is for supporting caching

[PATCH v13 0/8] Nested Shared Virtual Address (SVA) VT-d support

2020-05-13 Thread Jacob Pan
Shared virtual address (SVA), a.k.a, Shared virtual memory (SVM) on Intel platforms allow address space sharing between device DMA and applications. SVA can reduce programming complexity and enhance security. This series is intended to enable SVA virtualization, i.e. enable use of SVA within a gues

[PATCH v13 5/8] iommu/vt-d: Support flushing more translation cache types

2020-05-13 Thread Jacob Pan
When Shared Virtual Memory is exposed to a guest via vIOMMU, scalable IOTLB invalidation may be passed down from outside IOMMU subsystems. This patch adds invalidation functions that can be used for additional translation cache types. Signed-off-by: Jacob Pan Reviewed-by: Eric Auger --- drivers

[PATCH v13 2/8] iommu/vt-d: Use a helper function to skip agaw for SL

2020-05-13 Thread Jacob Pan
An Intel iommu domain uses 5-level page table by default. If the iommu that the domain tries to attach supports less page levels, the top level page tables should be skipped. Add a helper to do this so that it could be used in other places. Signed-off-by: Jacob Pan Reviewed-by: Eric Auger Review

[PATCH v13 8/8] iommu/vt-d: Add custom allocator for IOASID

2020-05-13 Thread Jacob Pan
When VT-d driver runs in the guest, PASID allocation must be performed via virtual command interface. This patch registers a custom IOASID allocator which takes precedence over the default XArray based allocator. The resulting IOASID allocation will always come from the host. This ensures that PASI

[PATCH v13 4/8] iommu/vt-d: Add bind guest PASID support

2020-05-13 Thread Jacob Pan
When supporting guest SVA with emulated IOMMU, the guest PASID table is shadowed in VMM. Updates to guest vIOMMU PASID table will result in PASID cache flush which will be passed down to the host as bind guest PASID calls. For the SL page tables, it will be harvested from device's default domain (

[PATCH v13 1/8] iommu/vt-d: Move domain helper to header

2020-05-13 Thread Jacob Pan
Move domain helper to header to be used by SVA code. Signed-off-by: Jacob Pan Reviewed-by: Eric Auger Reviewed-by: Kevin Tian --- drivers/iommu/intel-iommu.c | 6 -- include/linux/intel-iommu.h | 6 ++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/iommu/intel-i

[PATCH v13 7/8] iommu/vt-d: Enlightened PASID allocation

2020-05-13 Thread Jacob Pan
From: Lu Baolu Enabling IOMMU in a guest requires communication with the host driver for certain aspects. Use of PASID ID to enable Shared Virtual Addressing (SVA) requires managing PASID's in the host. VT-d 3.0 spec provides a Virtual Command Register (VCMD) to facilitate this. Writes to this re

Re: gcc-10: kernel stack is corrupted and fails to boot

2020-05-13 Thread Arvind Sankar
On Thu, May 14, 2020 at 12:20:38AM +0200, Borislav Petkov wrote: > On Wed, May 13, 2020 at 11:49:49PM +0200, Arnd Bergmann wrote: > > Right, in particular since Linus started building with gcc-10 already and > > would likely soon run into that problem if he hasn't already ;-) > > Oh noo, we don't

Re: [PATCH v2 bpf-next 0/7] bpf, printk: add BTF-based type printing

2020-05-13 Thread Alexei Starovoitov
On Wed, May 13, 2020 at 3:48 PM Joe Perches wrote: > > On Wed, 2020-05-13 at 15:24 -0700, Alexei Starovoitov wrote: > > On Tue, May 12, 2020 at 06:56:38AM +0100, Alan Maguire wrote: > > > The printk family of functions support printing specific pointer types > > > using %p format specifiers (MAC a

Re: [patch V4 part 1 05/36] x86/entry: Flip _TIF_SIGPENDING and _TIF_NOTIFY_RESUME handling

2020-05-13 Thread Mathieu Desnoyers
- On May 13, 2020, at 5:10 PM, rostedt rost...@goodmis.org wrote: > On Wed, 13 May 2020 16:56:41 -0400 (EDT) > Mathieu Desnoyers wrote: > >> - On May 5, 2020, at 9:16 AM, Thomas Gleixner t...@linutronix.de wrote: >> >> > Make sure task_work runs before any kind of userspace -- very much

Re: [PATCH v5 1/7] fs: introduce kernel_pread_file* support

2020-05-13 Thread Scott Branden
On 2020-05-13 3:12 p.m., Mimi Zohar wrote: On Wed, 2020-05-13 at 21:28 +, Luis Chamberlain wrote: On Wed, May 13, 2020 at 05:20:14PM -0400, Mimi Zohar wrote: On Wed, 2020-05-13 at 12:41 -0700, Scott Branden wrote: On 2020-05-13 12:39 p.m., Mimi Zohar wrote: On Wed, 2020-05-13 at 12:18

Re: [PATCH v2 bpf-next 0/7] bpf, printk: add BTF-based type printing

2020-05-13 Thread Joe Perches
On Wed, 2020-05-13 at 15:24 -0700, Alexei Starovoitov wrote: > On Tue, May 12, 2020 at 06:56:38AM +0100, Alan Maguire wrote: > > The printk family of functions support printing specific pointer types > > using %p format specifiers (MAC addresses, IP addresses, etc). For > > full details see Docume

Re: [PATCH v1 1/1] PCI/ERR: Handle fatal error recovery for non-hotplug capable devices

2020-05-13 Thread Bjorn Helgaas
On Wed, May 06, 2020 at 08:32:59PM -0700, sathyanarayanan.kuppusw...@linux.intel.com wrote: > From: Kuppuswamy Sathyanarayanan > > If there are non-hotplug capable devices connected to a given > port, then during the fatal error recovery(triggered by DPC or > AER), after calling reset_link() fun

Re: [PATCH 08/10] rcu: Allow to deactivate nocb on a CPU

2020-05-13 Thread Frederic Weisbecker
On Wed, May 13, 2020 at 11:38:31AM -0700, Paul E. McKenney wrote: > On Wed, May 13, 2020 at 06:47:12PM +0200, Frederic Weisbecker wrote: > > +static void __rcu_nocb_rdp_deoffload(struct rcu_data *rdp) > > +{ > > + unsigned long flags; > > + struct rcu_node *rnp = rdp->mynode; > > + > > + prin

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