[patch V6 22/37] x86/entry: Use idtentry for interrupts

2020-05-15 Thread Thomas Gleixner
Replace the extra interrupt handling code and reuse the existing idtentry machinery. This moves the irq stack switching on 64 bit from ASM to C code; 32bit already does the stack switching in C. Signed-off-by: Thomas Gleixner diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S

[patch V6 31/37] x86/entry: Remove the apic/BUILD interrupt leftovers

2020-05-15 Thread Thomas Gleixner
Remove all the code which was there to emit the system vector stubs. All users are gone. Move the now unused GET_CR2_INTO macro muck to head_64.S where the last user is. Fixup the eye hurting comment there while at it. Signed-off-by: Thomas Gleixner diff --git a/arch/x86/entry/calling.h

[patch V6 27/37] x86/entry: Convert KVM vectors to IDTENTRY_SYSVEC

2020-05-15 Thread Thomas Gleixner
Convert KVM specific system vectors to IDTENTRY_SYSVEC*: The two empty stub handlers which only increment the stats counter do no need to run on the interrupt stack. Use IDTENTRY_SYSVEC_DIRECT for them. The wakeup handler does more work and runs on the interrupt stack. None of these handlers

[patch V6 09/37] x86/entry: Split idtentry_enter/exit()

2020-05-15 Thread Thomas Gleixner
Split the implementation of idtentry_enter/exit() out into inline functions so that variants of idtentry_enter/exit() can be implemented without duplicating code. Signed-off-by: Thomas Gleixner diff --git a/arch/x86/entry/common.c b/arch/x86/entry/common.c index a1950aa90223..882ada245bd5

[patch V6 37/37] x86/entry: Remove the TRACE_IRQS cruft

2020-05-15 Thread Thomas Gleixner
No more users. Signed-off-by: Thomas Gleixner diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S index dce3ede7207e..fcdb41ac5c2e 100644 --- a/arch/x86/entry/entry_64.S +++ b/arch/x86/entry/entry_64.S @@ -53,19 +53,6 @@ SYM_CODE_START(native_usergs_sysret64)

[patch V6 34/37] x86/entry/32: Remove redundant irq disable code

2020-05-15 Thread Thomas Gleixner
All exceptions/interrupts return with interrupts disabled now. No point in doing this in ASM again. Signed-off-by: Thomas Gleixner --- arch/x86/entry/entry_32.S | 76 -- 1 file changed, 76 deletions(-) --- a/arch/x86/entry/entry_32.S +++

[patch V6 36/37] x86/entry: Move paranoid irq tracing out of ASM code

2020-05-15 Thread Thomas Gleixner
Signed-off-by: Thomas Gleixner --- arch/x86/entry/entry_64.S | 13 - arch/x86/kernel/nmi.c |3 +++ 2 files changed, 3 insertions(+), 13 deletions(-) --- a/arch/x86/entry/entry_64.S +++ b/arch/x86/entry/entry_64.S @@ -16,7 +16,6 @@ * * Some macro usage: * -

[patch V6 20/37] x86/irq/64: Provide handle_irq()

2020-05-15 Thread Thomas Gleixner
To consolidate the interrupt entry/exit code vs. the other exceptions provide handle_irq() (similar to 32bit) to move the interrupt stack switching to C code. That allows to consolidate the entry exit handling by reusing the idtentry machinery both in ASM and C. Signed-off-by: Thomas Gleixner

[patch V6 32/37] x86/entry/64: Remove IRQ stack switching ASM

2020-05-15 Thread Thomas Gleixner
Signed-off-by: Thomas Gleixner diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S index 7292525e2557..f213d573038e 100644 --- a/arch/x86/entry/entry_64.S +++ b/arch/x86/entry/entry_64.S @@ -370,102 +370,6 @@ SYM_CODE_END(ret_from_fork) #endif .endm -/* - * Enters the IRQ

[patch V6 35/37] x86/entry/64: Remove TRACE_IRQS_*_DEBUG

2020-05-15 Thread Thomas Gleixner
Since INT3/#BP no longer runs on an IST, this workaround is no longer required. Tested by running lockdep+ftrace as described in the initial commit: 5963e317b1e9 ("ftrace/x86: Do not change stacks in DEBUG when calling lockdep") Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas

[patch V6 33/37] x86/entry: Make enter_from_user_mode() static

2020-05-15 Thread Thomas Gleixner
The ASM users are gone. All callers are local. Signed-off-by: Thomas Gleixner diff --git a/arch/x86/entry/common.c b/arch/x86/entry/common.c index 72588f1a45a2..a0772b0d6bc2 100644 --- a/arch/x86/entry/common.c +++ b/arch/x86/entry/common.c @@ -54,7 +54,7 @@ * 2) Invoke context tracking if

[patch V6 23/37] x86/entry: Provide IDTENTRY_SYSVEC

2020-05-15 Thread Thomas Gleixner
Provide a IDTENTRY variant for system vectors to consolidate the different mechanisms to emit the ASM stubs for 32 an 64 bit. On 64bit this also moves the stack switching from ASM to C code. 32bit will excute the system vectors w/o stack switching as before. As some of the system vector

[patch V6 14/37] x86/entry: Remove the transition leftovers

2020-05-15 Thread Thomas Gleixner
Now that all exceptions are converted over the sane flag is not longer needed. Also the vector argument of idtentry_body on 64 bit is pointless now. Signed-off-by: Thomas Gleixner diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S index 3c3ca6fbe58e..dd8064ffdf12 100644 ---

[patch V6 17/37] x86/entry/32: Remove common_exception

2020-05-15 Thread Thomas Gleixner
No more users. Signed-off-by: Thomas Gleixner diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S index 65fd41fe77d9..c6e146b71de5 100644 --- a/arch/x86/entry/entry_32.S +++ b/arch/x86/entry/entry_32.S @@ -1394,27 +1394,6 @@ BUILD_INTERRUPT3(hv_stimer0_callback_vector,

[patch V6 26/37] x86/entry: Convert various system vectors

2020-05-15 Thread Thomas Gleixner
Convert various system vectors to IDTENTRY_SYSVEC - Implement the C entry point with DEFINE_IDTENTRY_SYSVEC - Emit the ASM stub with DECLARE_IDTENTRY_SYSVEC - Remove the ASM idtentries in 64bit - Remove the BUILD_INTERRUPT entries in 32bit - Remove the old prototypes No functional

[patch V6 11/37] x86/entry/64: Simplify idtentry_body

2020-05-15 Thread Thomas Gleixner
All C functions which do not have an error code have been converted to the new IDTENTRY interface which does not expect an error code in the arguments. Spare the XORL. Signed-off-by: Thomas Gleixner diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S index

[patch V6 01/37] tracing/hwlat: Use ktime_get_mono_fast_ns()

2020-05-15 Thread Thomas Gleixner
Timestamping in the hardware latency detector uses sched_clock() underneath and depends on CONFIG_GENERIC_SCHED_CLOCK=n because sched clocks from that subsystem are not NMI safe. ktime_get_mono_fast_ns() is NMI safe and available on all architectures. Replace the time getter, get rid of the

[patch V6 29/37] x86/entry: Convert XEN hypercall vector to IDTENTRY_SYSVEC

2020-05-15 Thread Thomas Gleixner
Convert the last oldstyle defined vector to IDTENTRY_SYSVEC - Implement the C entry point with DEFINE_IDTENTRY_SYSVEC - Emit the ASM stub with DECLARE_IDTENTRY_SYSVEC - Remove the ASM idtentries in 64bit - Remove the BUILD_INTERRUPT entries in 32bit - Remove the old prototypes Fixup

[patch V6 10/37] x86/entry: Switch XEN/PV hypercall entry to IDTENTRY

2020-05-15 Thread Thomas Gleixner
Convert the XEN/PV hypercall to IDTENTRY: - Emit the ASM stub with DECLARE_IDTENTRY - Remove the ASM idtentry in 64bit - Remove the open coded ASM entry code in 32bit - Remove the old prototypes The handler stubs need to stay in ASM code as it needs corner case handling and adjustment

[patch V6 06/37] genirq: Provde __irq_enter/exit_raw()

2020-05-15 Thread Thomas Gleixner
Signed-off-by: Thomas Gleixner diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index f6f25fab34cb..adfd98b8a468 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h @@ -41,6 +41,17 @@ extern void rcu_nmi_exit(void); } while (0) /* + * Like __irq_enter()

[patch V6 19/37] x86/irq: Convey vector as argument and not in ptregs

2020-05-15 Thread Thomas Gleixner
Device interrupts which go through do_IRQ() or the spurious interrupt handler have their separate entry code on 64 bit for no good reason. Both 32 and 64 bit transport the vector number through ORIG_[RE]AX in pt_regs. Further the vector number is forced to fit into an u8 and is complemented and

[patch V6 12/37] x86/entry: Provide idtentry_entry/exit_cond_rcu()

2020-05-15 Thread Thomas Gleixner
The pagefault handler cannot use the regular idtentry_enter() because that invokes rcu_irq_enter() if the pagefault was caused in the kernel. Not a problem per se, but kernel side page faults can schedule which is not possible without invoking rcu_irq_exit(). Adding rcu_irq_exit() and a

[patch V6 03/37] nmi, tracing: Provide nmi_enter/exit_notrace()

2020-05-15 Thread Thomas Gleixner
To fully isolate #DB and #BP from instrumentable code it's necessary to avoid invoking the hardware latency tracer on nmi_enter/exit(). Provide nmi_enter/exit() variants which are not invoking the hardware latency tracer. That allows to put calls explicitely into the call sites outside of the

[patch V6 25/37] x86/entry: Convert SMP system vectors to IDTENTRY_SYSVEC

2020-05-15 Thread Thomas Gleixner
Convert SMP system vectors to IDTENTRY_SYSVEC - Implement the C entry point with DEFINE_IDTENTRY_SYSVEC - Emit the ASM stub with DECLARE_IDTENTRY_SYSVEC - Remove the ASM idtentries in 64bit - Remove the BUILD_INTERRUPT entries in 32bit - Remove the old prototypes No functional change.

[patch V6 16/37] x86/entry/64: Remove error_exit

2020-05-15 Thread Thomas Gleixner
No more users. Signed-off-by: Thomas Gleixner diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S index 55f612032793..e908f1440f36 100644 --- a/arch/x86/entry/entry_64.S +++ b/arch/x86/entry/entry_64.S @@ -1356,15 +1356,6 @@ SYM_CODE_START_LOCAL(error_entry) jmp

[patch V6 28/37] x86/entry: Convert various hypervisor vectors to IDTENTRY_SYSVEC

2020-05-15 Thread Thomas Gleixner
Convert various hypervisor vectors to IDTENTRY_SYSVEC - Implement the C entry point with DEFINE_IDTENTRY_SYSVEC - Emit the ASM stub with DECLARE_IDTENTRY_SYSVEC - Remove the ASM idtentries in 64bit - Remove the BUILD_INTERRUPT entries in 32bit - Remove the old prototypes No functional

Re: [PATCH] memcg: expose root cgroup's memory.stat

2020-05-15 Thread Shakeel Butt
On Fri, May 15, 2020 at 11:09 AM Roman Gushchin wrote: > > On Fri, May 15, 2020 at 10:49:22AM -0700, Shakeel Butt wrote: > > On Fri, May 15, 2020 at 8:00 AM Roman Gushchin wrote: > > > > > > On Fri, May 15, 2020 at 06:44:44AM -0700, Shakeel Butt wrote: > > > > On Fri, May 15, 2020 at 6:24 AM

Re: [PATCH v10 01/26] Documentation/x86: Add CET description

2020-05-15 Thread Dave Hansen
On 5/15/20 4:29 PM, Yu-cheng Yu wrote: > On Fri, 2020-05-15 at 15:43 -0700, Dave Hansen wrote: >> Basically, if there ends up being a bug in an app that violates the >> shadow stack rules, the app is broken, period. The only recourse is to >> have the kernel disable CET and reboot. >> >> Is that

Re: [PATCH] swap: Add percpu cluster_next to reduce lock contention on swap cache

2020-05-15 Thread Daniel Jordan
On Thu, May 14, 2020 at 03:04:24PM +0800, Huang Ying wrote: > And the pmbench score increases 15.9%. What metric is that, and how long did you run the benchmark for? Given that this thing is probabilistic, did you notice much variance from run to run? > diff --git a/mm/swapfile.c

Re: [PATCH target] target: Add initiatorname to NON_EXISTENT_LUN error

2020-05-15 Thread Mike Christie
On 5/13/20 11:01 PM, Lance Digby wrote: > The NON_EXISTENT_LUN error can be written without an error condition > on the initiator responsible. Adding the initiatorname to this message > will reduce the effort required to fix this when many initiators are > supported by a target. > >

[PATCH] seccomp: Add group_leader pid to seccomp_notif

2020-05-15 Thread Sargun Dhillon
This includes the thread group leader ID in the seccomp_notif. This is immediately useful for opening up a pidfd for the group leader, as pidfds only work on group leaders. Previously, it was considered to include an actual pidfd in the seccomp_notif structure[1], but it was suggested to avoid

Re: [PATCH 3/7] KVM: SVM: extract preparation of VMCB for nested run

2020-05-15 Thread Paolo Bonzini
On 15/05/20 19:41, Paolo Bonzini wrote: > Split out filling svm->vmcb.save and svm->vmcb.control before VMRUN. > Only the latter will be useful when restoring nested SVM state. More precisely: when restoring nested SVM state, svm->vmcb.save will only have to be filled if the nested_run_pending

RE: (a design open) RE: [PATCH v1 6/8] vfio/type1: Bind guest page tables to host

2020-05-15 Thread Tian, Kevin
> From: Raj, Ashok > Sent: Friday, May 15, 2020 11:20 PM > > On Fri, May 15, 2020 at 12:39:14AM -0700, Tian, Kevin wrote: > > Hi, Alex, > > > > When working on an updated version Yi and I found an design open > > which needs your guidance. > > > > In concept nested translation can be incarnated

Re: [PATCH 2/7] KVM: SVM: extract load_nested_vmcb_control

2020-05-15 Thread Paolo Bonzini
On 16/05/20 01:09, Krish Sadhukhan wrote: >> >>   } >>   +static void load_nested_vmcb_control(struct vcpu_svm *svm, struct >> vmcb *nested_vmcb) > > > This function only separates a subset of the controls. If the purpose of > the function is to separate only the controls that are related to >

Re: [PATCH] ethernet: ti: am65-cpts: Add missing inline qualifier to stub functions

2020-05-15 Thread David Miller
From: Nathan Chancellor Date: Fri, 15 May 2020 15:33:18 -0700 > When building with Clang: > > In file included from drivers/net/ethernet/ti/am65-cpsw-ethtool.c:15: > drivers/net/ethernet/ti/am65-cpts.h:58:12: warning: unused function > 'am65_cpts_ns_gettime' [-Wunused-function] > static s64

mmotm 2020-05-15-16-29 uploaded

2020-05-15 Thread Andrew Morton
The mm-of-the-moment snapshot 2020-05-15-16-29 has been uploaded to http://www.ozlabs.org/~akpm/mmotm/ mmotm-readme.txt says README for mm-of-the-moment: http://www.ozlabs.org/~akpm/mmotm/ This is a snapshot of my -mm patch queue. Uploaded at random hopefully more than once a week. You

Re: [PATCH v10 01/26] Documentation/x86: Add CET description

2020-05-15 Thread Yu-cheng Yu
On Fri, 2020-05-15 at 15:43 -0700, Dave Hansen wrote: > On 5/15/20 2:33 PM, Yu-cheng Yu wrote: > > On Fri, 2020-05-15 at 11:39 -0700, Dave Hansen wrote: > > > On 5/12/20 4:20 PM, Yu-cheng Yu wrote: > > > Can a binary compiled with CET run without CET? > > > > Yes, but a few details: > > > > -

RE: (a design open) RE: [PATCH v1 6/8] vfio/type1: Bind guest page tables to host

2020-05-15 Thread Tian, Kevin
> From: Alex Williamson > Sent: Saturday, May 16, 2020 1:59 AM > > On Fri, 15 May 2020 07:39:14 + > "Tian, Kevin" wrote: > > > Hi, Alex, > > > > When working on an updated version Yi and I found an design open > > which needs your guidance. > > > > In concept nested translation can be

Re: [PATCH] security: fix the default value of secid_to_secctx hook

2020-05-15 Thread Alexei Starovoitov
On Thu, May 14, 2020 at 12:47 PM Alexei Starovoitov wrote: > > On Thu, May 14, 2020 at 12:43 PM James Morris > wrote: > > > > On Wed, 13 May 2020, Alexei Starovoitov wrote: > > > > > James, > > > > > > since you took the previous similar patch are you going to pick this > > > one up as well? > >

Re: [PATCH v5 0/7] firmware: add partial read support in request_firmware_into_buf

2020-05-15 Thread Scott Branden
Hi Luis, On 2020-05-15 1:47 p.m., Luis Chamberlain wrote: On Wed, May 13, 2020 at 12:23:59PM -0400, Mimi Zohar wrote: Hi Scott, On Thu, 2020-05-07 at 17:27 -0700, Scott Branden wrote: Please consider this version series ready for upstream acceptance. This patch series adds partial read

Re: [PATCH][next] USB: EHCI: ehci-mv: fix less than zero comparisonof an unsigned int

2020-05-15 Thread Tang Bin
Hi Alan & Colin: On 2020/5/16 1:21, Alan Stern wrote: On Fri, May 15, 2020 at 05:54:53PM +0100, Colin King wrote: From: Colin Ian King The comparison of hcd->irq to less than zero for an error check will never be true because hcd->irq is an unsigned int. Fix this by assigning the int retval

Re: [PATCH 2/8] KVM: x86: extend struct kvm_vcpu_pv_apf_data with token info

2020-05-15 Thread Sean Christopherson
On Sat, May 16, 2020 at 12:23:31AM +0200, Paolo Bonzini wrote: > On 15/05/20 22:43, Sean Christopherson wrote: > > On Fri, May 15, 2020 at 09:18:07PM +0200, Paolo Bonzini wrote: > >> On 15/05/20 20:46, Sean Christopherson wrote: > >>> Why even bother using 'struct kvm_vcpu_pv_apf_data' for the #PF

Re: [PATCH] mm/hmm/test: destroy xa_array instead of looping

2020-05-15 Thread Jason Gunthorpe
On Wed, May 13, 2020 at 02:45:07PM -0700, Ralph Campbell wrote: > The test driver uses an xa_array to store virtual to physical address > translations for a simulated hardware device. The MMU notifier > invalidation callback is used to keep the table consistent with the CPU > page table and is

Re: [PATCH 2/7] KVM: SVM: extract load_nested_vmcb_control

2020-05-15 Thread Krish Sadhukhan
On 5/15/20 10:41 AM, Paolo Bonzini wrote: When restoring SVM nested state, the control state will be stored already in svm->nested by KVM_SET_NESTED_STATE. We will not need to fish it out of L1's VMCB. Pull everything into a separate function so that it is documented which fields are needed.

Re: [PATCH v2 0/7] Copy hashmap to tools/perf/util, use in perf expr

2020-05-15 Thread Daniel Borkmann
On 5/15/20 11:18 PM, arnaldo.m...@gmail.com wrote: [...] Andrii/Alexei/Daniel, what do you think about me merging these fixes in my perf-tools-next branch? I'm ok with the idea, but it's up to maintainers to coordinate this :) Good to know, do I'll take all patches except the ones touching

Re: [PATCH v12 00/18] Enable FSGSBASE instructions

2020-05-15 Thread Sasha Levin
On Fri, May 15, 2020 at 10:55:50AM -0700, Andi Kleen wrote: Indeed, we've seen a few hacks that basically just enable FSGSBASE: - https://github.com/oscarlab/graphene-sgx-driver - https://github.com/occlum/enable_rdfsbase And would very much like to get rid of them... These are insecure and

[PATCH v2] net/mlx5e: Use IS_ERR() to check and simplify code

2020-05-15 Thread Tang Bin
Use IS_ERR() and PTR_ERR() instead of PTR_ERR_OR_ZERO() to simplify code, avoid redundant judgements. Signed-off-by: Zhang Shengju Signed-off-by: Tang Bin Reviewed-by: Leon Romanovsky --- Changes from v1 - fix the commit message for typo. ---

Re: [PATCH v2 7/7] perf expr: Migrate expr ids table to a hashmap

2020-05-15 Thread Ian Rogers
On Fri, May 15, 2020 at 3:41 PM Jiri Olsa wrote: > > On Fri, May 15, 2020 at 09:50:07AM -0700, Ian Rogers wrote: > > SNIP > > > diff --git a/tools/perf/util/expr.c b/tools/perf/util/expr.c > > index 8b4ce704a68d..f64ab91c432b 100644 > > --- a/tools/perf/util/expr.c > > +++

Re: [PATCH] net/mlx5e: Use IS_ERR() to check and simplify code

2020-05-15 Thread Tang Bin
Hi Saeed: On 2020/5/16 6:28, Saeed Mahameed wrote: On Wed, 2020-05-13 at 17:48 +0800, Tang Bin wrote: Hi David: On 2020/5/8 4:18, David Miller wrote: From: Tang Bin Date: Thu, 7 May 2020 19:50:10 +0800 Use IS_ERR() and PTR_ERR() instead of PTR_ZRR_OR_ZERO()

Re: [PATCH v10 01/26] Documentation/x86: Add CET description

2020-05-15 Thread Dave Hansen
On 5/15/20 2:33 PM, Yu-cheng Yu wrote: > On Fri, 2020-05-15 at 11:39 -0700, Dave Hansen wrote: >> On 5/12/20 4:20 PM, Yu-cheng Yu wrote: >> Can a binary compiled with CET run without CET? > > Yes, but a few details: > > - The shadow stack is transparent to the application. A CET application

Re: [PATCH v2 7/7] perf expr: Migrate expr ids table to a hashmap

2020-05-15 Thread Jiri Olsa
On Fri, May 15, 2020 at 09:50:07AM -0700, Ian Rogers wrote: SNIP > diff --git a/tools/perf/util/expr.c b/tools/perf/util/expr.c > index 8b4ce704a68d..f64ab91c432b 100644 > --- a/tools/perf/util/expr.c > +++ b/tools/perf/util/expr.c > @@ -4,25 +4,76 @@ > #include "expr.h" > #include

Re: [PATCH v2 7/7] perf expr: Migrate expr ids table to a hashmap

2020-05-15 Thread Jiri Olsa
On Fri, May 15, 2020 at 02:35:43PM -0700, Ian Rogers wrote: > On Fri, May 15, 2020 at 12:41 PM Jiri Olsa wrote: > > > > On Fri, May 15, 2020 at 09:50:07AM -0700, Ian Rogers wrote: > > > > SNIP > > > > > diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c > > > index

[PATCH] ethernet: ti: am65-cpts: Add missing inline qualifier to stub functions

2020-05-15 Thread Nathan Chancellor
When building with Clang: In file included from drivers/net/ethernet/ti/am65-cpsw-ethtool.c:15: drivers/net/ethernet/ti/am65-cpts.h:58:12: warning: unused function 'am65_cpts_ns_gettime' [-Wunused-function] static s64 am65_cpts_ns_gettime(struct am65_cpts *cpts) ^

Urgent Reply,

2020-05-15 Thread Mr. Scott Donald
Dear Friend, I'm Mr. Scott Donald a Successful business Man. dealing with Exportation, I got your email contact through search to let you know my Ugly Situation Am a dying Man here in California Los Angeles Hospital Bed in (USA), I Lost my Wife and my only Daughter for Corona virus and my Doctor

Re: [PATCH] net/mlx5e: Use IS_ERR() to check and simplify code

2020-05-15 Thread Saeed Mahameed
On Wed, 2020-05-13 at 17:48 +0800, Tang Bin wrote: > Hi David: > > On 2020/5/8 4:18, David Miller wrote: > > From: Tang Bin > > Date: Thu, 7 May 2020 19:50:10 +0800 > > > > > Use IS_ERR() and PTR_ERR() instead of PTR_ZRR_OR_ZERO() ^^^ typo > > >

Re: [RFC PATCH 2/2] PCI: Add basic Compute eXpress Link DVSEC decode

2020-05-15 Thread Sean V Kelley
Hi, On 15 May 2020, at 14:04, Bjorn Helgaas wrote: On Fri, May 15, 2020 at 10:55:28AM -0700, Sean V Kelley wrote: Compute eXpress Link is a new CPU interconnect created with workload accelerators in mind. The interconnect relies on PCIe Electrical and Physical interconnect for communication.

Re: [PATCH] keys: Move permissions checking decisions into the checking code

2020-05-15 Thread David Howells
Stephen Smalley wrote: > > I can go back to the enum patch for the moment if you and Casey can put up > > with that for the moment? > > Yes, let's do that. Okay. I'll use the attached. I've added a note into the commit message to indicate what should be done in future. I won't put the other

Re: [PATCH 2/8] KVM: x86: extend struct kvm_vcpu_pv_apf_data with token info

2020-05-15 Thread Paolo Bonzini
On 15/05/20 22:43, Sean Christopherson wrote: > On Fri, May 15, 2020 at 09:18:07PM +0200, Paolo Bonzini wrote: >> On 15/05/20 20:46, Sean Christopherson wrote: >>> Why even bother using 'struct kvm_vcpu_pv_apf_data' for the #PF case? VMX >>> only requires error_code[31:16]==0 and SVM doesn't vet

[PATCH] arm64: Fix PTRACE_SYSEMU semantics

2020-05-15 Thread Keno Fischer
Quoth the man page: ``` If the tracee was restarted by PTRACE_SYSCALL or PTRACE_SYSEMU, the tracee enters syscall-enter-stop just prior to entering any system call (which will not be executed if the restart was using PTRACE_SYSEMU, regardless of any change made to

Urgent Reply,

2020-05-15 Thread Mr. Scott Donald
Dear Friend, I'm Mr. Scott Donald a Successful business Man. dealing with Exportation, I got your email contact through search to let you know my Ugly Situation Am a dying Man here in California Los Angeles Hospital Bed in (USA), I Lost my Wife and my only Daughter for Corona virus and my Doctor

Re: [PATCH] swap: Add percpu cluster_next to reduce lock contention on swap cache

2020-05-15 Thread Andrew Morton
On Thu, 14 May 2020 15:04:24 +0800 Huang Ying wrote: > In some swap scalability test, it is found that there are heavy lock > contention on swap cache even if we have split one swap cache radix > tree per swap device to one swap cache radix tree every 64 MB trunk in > commit 4b3ef9daa4fc

[PATCH v3 4/7] tools lib/api: Copy libbpf hashmap to tools/perf/util

2020-05-15 Thread Ian Rogers
Allow use of hashmap in perf. Modify perf's check-headers.sh script to check that the files are kept in sync, in the same way kernel headers are checked. This will warn if they are out of sync at the start of a perf build. Acked-by: Andrii Nakryiko Signed-off-by: Ian Rogers ---

[PATCH v3 1/7] libbpf: Fix memory leak and possible double-free in hashmap__clear

2020-05-15 Thread Ian Rogers
From: Andrii Nakryiko Fix memory leak in hashmap_clear() not freeing hashmap_entry structs for each of the remaining entries. Also NULL-out bucket list to prevent possible double-free between hashmap__clear() and hashmap__free(). Running test_progs-asan flavor clearly showed this problem.

[PATCH v3 0/7] Copy hashmap to tools/perf/util, use in perf expr

2020-05-15 Thread Ian Rogers
Perf's expr code currently builds an array of strings then removes duplicates. The array is larger than necessary and has recently been increased in size. When this was done it was commented that a hashmap would be preferable. libbpf has a hashmap but libbpf isn't currently required to build

[PATCH v3 5/7] perf test: Provide a subtest callback to ask for the reason for skipping a subtest

2020-05-15 Thread Ian Rogers
Now subtests can inform why a test was skipped. The upcoming patch improvint PMU event metric testing will use it. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Mark

[PATCH v3 3/7] libbpf hashmap: Fix signedness warnings

2020-05-15 Thread Ian Rogers
Fixes the following warnings: hashmap.c: In function ‘hashmap__clear’: hashmap.h:150:20: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare] 150 | for (bkt = 0; bkt < map->cap; bkt++)\ hashmap.c: In

[PATCH v3 2/7] libbpf hashmap: Remove unused #include

2020-05-15 Thread Ian Rogers
Remove #include of libbpf_internal.h that is unused. Discussed in this thread: https://lore.kernel.org/lkml/caef4bzzrmieds_8r8g4vaaewvjzpb4xylnpf0x2vny8otzk...@mail.gmail.com/ Acked-by: Andrii Nakryiko Signed-off-by: Ian Rogers --- tools/lib/bpf/hashmap.h | 1 - 1 file changed, 1 deletion(-)

[PATCH v3 6/7] perf test: Improve pmu event metric testing

2020-05-15 Thread Ian Rogers
Break pmu-events test into 2 and add a test to verify that all pmu metric expressions simply parse. Try to parse all metric ids/events, skip/warn if metrics for the current architecture fail to parse. To support warning for a skip, and an ability for a subtest to describe why it skips. Tested on

[PATCH v3 7/7] perf expr: Migrate expr ids table to a hashmap

2020-05-15 Thread Ian Rogers
Use a hashmap between a char* string and a double* value. While bpf's hashmap entries are size_t in size, we can't guarantee sizeof(size_t) >= sizeof(double). Avoid a memory allocation when gathering ids by making 0.0 a special value encoded as NULL. Original map suggestion by Andi Kleen:

Re: kernel BUG at mm/hugetlb.c:LINE!

2020-05-15 Thread Mike Kravetz
On 5/12/20 11:11 AM, Mike Kravetz wrote: > On 5/12/20 8:04 AM, Miklos Szeredi wrote: >> On Tue, Apr 7, 2020 at 12:06 AM Mike Kravetz wrote: >>> On 4/5/20 8:06 PM, syzbot wrote: >>> >>> The routine is_file_hugepages() is just comparing the file ops to huegtlbfs: >>> >>> if (file->f_op ==

Re: [PATCH v3 04/19] mm: slub: implement SLUB version of obj_to_index()

2020-05-15 Thread Roman Gushchin
On Fri, May 15, 2020 at 09:45:30PM +, Christoph Lameter wrote: > On Tue, 12 May 2020, Roman Gushchin wrote: > > > > Add it to the metadata at the end of the object. Like the debugging > > > information or the pointer for RCU freeing. > > > > Enabling debugging metadata currently disables the

Re: [PATCH v2 7/7] perf expr: Migrate expr ids table to a hashmap

2020-05-15 Thread Ian Rogers
On Fri, May 15, 2020 at 12:39 PM Andrii Nakryiko wrote: > > On Fri, May 15, 2020 at 9:51 AM Ian Rogers wrote: > > > > Use a hashmap between a char* string and a double* value. While bpf's > > hashmap entries are size_t in size, we can't guarantee sizeof(size_t) >= > > sizeof(double). Avoid a

Re: [PATCH v3 06/19] mm: memcg/slab: obj_cgroup API

2020-05-15 Thread Roman Gushchin
On Tue, May 12, 2020 at 06:56:45PM -0400, Johannes Weiner wrote: > On Thu, May 07, 2020 at 03:26:31PM -0700, Roman Gushchin wrote: > > On Thu, May 07, 2020 at 05:03:14PM -0400, Johannes Weiner wrote: > > > On Wed, Apr 22, 2020 at 01:46:55PM -0700, Roman Gushchin wrote: > > > > ---

[PATCH 2/3] perf/x86/rapl: refactor code for Intel/AMD sharing

2020-05-15 Thread Stephane Eranian
This patch modifies the rapl_model struct to include architecture specific knowledge to Intel specific structure, and in particular the MSR for POWER_UNIT and the rapl_msrs array. No functional changes. Signed-off-by: Stephane Eranian --- arch/x86/events/rapl.c | 29

[PATCH 3/3] perf/x86/rapl: add AMD Fam17h RAPL support

2020-05-15 Thread Stephane Eranian
This patch enables AMD Fam17h RAPL support for the Package level metric. The support is as per AMD Fam17h Model31h (Zen2) and model 00-ffh (Zen1) PPR. The same output is available via the energy-pkg pseudo event: $ perf stat -a -I 1000 --per-socket -e power/energy-pkg/ Signed-off-by: Stephane

[PATCH 1/3] perf/x86/rapl: move RAPL support to common x86 code

2020-05-15 Thread Stephane Eranian
To prepare for support of both Intel and AMD RAPL. Move rapl.c to arch/x86/events. Rename config option. Fixup header paths. Signed-off-by: Stephane Eranian --- arch/x86/events/Kconfig| 8 arch/x86/events/Makefile | 1 + arch/x86/events/intel/Makefile | 2 --

[PATCH 0/3] perf/x86/rapl: Enable RAPL for AMD Fam17h

2020-05-15 Thread Stephane Eranian
This patch series adds support for AMD Fam17h RAPL counters. As per AMD PPR, Fam17h support Package RAPL counters to monitor power usage. The RAPL counter operates as with Intel RAPL. As such, it is beneficial to share the code. The series first moves the rapl.c file to common perf_events x86 and

[RFC, WIP, v5 09/10] media: vidtv: Implement a SMPTE 302M encoder

2020-05-15 Thread Daniel W. S. Almeida
From: "Daniel W. S. Almeida" Implement a S302M encoder to make it possible to insert PCM audio data in the generated MPEG Transport Stream. This shall enable passing an audio signal into userspace so it can be decoded and played by media software. Signed-off-by: Daniel W. S. Almeida ---

Re: [PATCH] drm/bridge: ti-sn65dsi86: Fix off-by-one error in clock choice

2020-05-15 Thread Rob Clark
On Mon, May 4, 2020 at 9:32 PM Douglas Anderson wrote: > > If the rate in our table is _equal_ to the rate we want then it's OK > to pick it. It doesn't need to be greater than the one we want. > > Fixes: a095f15c00e2 ("drm/bridge: add support for sn65dsi86 bridge driver") > Signed-off-by:

[RFC, WIP, v5 10/10] media: vidtv: Add a MPEG Transport Stream Multiplexer

2020-05-15 Thread Daniel W. S. Almeida
From: "Daniel W. S. Almeida" Add a MPEG Transport Stream multiplexer responsible for polling encoders, interleaving packets, padding the resulting stream with NULL packets if necessary and then delivering the resulting TS packets to the bridge driver so it can feed the demux. This patch

[RFC, WIP, v5 08/10] media: vidtv: implement a PES packetizer

2020-05-15 Thread Daniel W. S. Almeida
From: "Daniel W. S. Almeida" Implement the PES logic to convert encoder data into MPEG TS packets. These TS packets can then be fed into a TS multiplexer and eventually into userspace. Signed-off-by: Daniel W. S. Almeida --- .../media/test-drivers/vidtv/vidtv_common.h | 2 +

[RFC, WIP, v5 07/10] media: vidtv: implement a PSI generator

2020-05-15 Thread Daniel W. S. Almeida
From: "Daniel W. S. Almeida" PSI packets contain general information about a MPEG Transport Stream. A PSI generator is needed so userspace apps can retrieve information about the Transport Stream and eventually tune into a (dummy) channel. Because the generator is implemented in a separate

[RFC, WIP, v5 02/10] media: vidtv: implement a tuner driver

2020-05-15 Thread Daniel W. S. Almeida
From: "Daniel W. S. Almeida" The virtual DVB test driver serves as a reference DVB driver and helps validate the existing APIs in the media subsystem. It can also aid developers working on userspace applications. This dummy tuner should support common TV standards such as DVB-T/T2/S/S2, ISDB-T

[RFC, WIP, v5 06/10] media: vidtv: add MPEG TS common code

2020-05-15 Thread Daniel W. S. Almeida
From: "Daniel W. S. Almeida" Add code to work with MPEG TS packets, such as TS headers, adaptation fields, PCR packets and NULL packets. Signed-off-by: Daniel W. S. Almeida --- drivers/media/test-drivers/vidtv/vidtv_ts.c | 157 drivers/media/test-drivers/vidtv/vidtv_ts.h

[RFC, WIP, v5 00/10] media: vidtv: implement a virtual DVB driver

2020-05-15 Thread Daniel W. S. Almeida
From: "Daniel W. S. Almeida" This series is work in progress. It represents the current work done on a virtual DVB driver for the Linux media subsystem. I am new to the media subsystem and to kernel development in general. This driver aims to: - Serve as template for new DVB driver

[RFC, WIP, v5 04/10] media: vidtv: add a bridge driver

2020-05-15 Thread Daniel W. S. Almeida
From: "Daniel W. S. Almeida" Digital TV devices consist of several independent hardware components which are controlled by different drivers. Each media device is controlled by a group of cooperating drivers with the bridge driver as the main driver. This patch adds a bridge driver for the

[RFC, WIP, v5 01/10] media: vidtv: add Kconfig entry

2020-05-15 Thread Daniel W. S. Almeida
From: "Daniel W. S. Almeida" Add the necessary Kconfig entries and a dummy Makefile to compile the new virtual DVB test driver (vidtv). Signed-off-by: Daniel W. S. Almeida --- drivers/media/test-drivers/Kconfig| 10 ++ drivers/media/test-drivers/Makefile | 1 +

[RFC, WIP, v5 03/10] media: vidtv: implement a demodulator driver

2020-05-15 Thread Daniel W. S. Almeida
From: "Daniel W. S. Almeida" Implement a I2C demodulator driver, simulating support for DVB-T, DVB-C and DVB-S. This demodulator will periodically check the signal quality against a table and drop the TS lock if it drops below a threshold value, regaining it in the event that the signal

[RFC, WIP, v5 05/10] media: vidtv: add wrappers for memcpy and memset

2020-05-15 Thread Daniel W. S. Almeida
From: "Daniel W. S. Almeida" A lot of code in this driver is for serializing structures. This is error prone. Therefore, prevent buffer overflows by wrapping memcpy and memset, comparing the requested length against the buffer size. Signed-off-by: Daniel W. S. Almeida ---

Re: [PATCH v2 0/7] Copy hashmap to tools/perf/util, use in perf expr

2020-05-15 Thread Ian Rogers
On Fri, May 15, 2020 at 2:19 PM wrote: > > ,Stephane Eranian > From: Arnaldo Carvalho de Melo > Message-ID: <79bcbaf7-bf5f-4556-a923-56e9d82fb...@gmail.com> > > > > On May 15, 2020 4:42:46 PM GMT-03:00, Andrii Nakryiko > wrote: > >On Fri, May 15, 2020 at 10:01 AM Arnaldo Carvalho de Melo > >

Re: [PATCH] drm/bridge: ti-sn65dsi86: Clear old error bits before AUX transfers

2020-05-15 Thread Rob Clark
On Fri, May 8, 2020 at 4:33 PM Douglas Anderson wrote: > > The AUX channel transfer error bits in the status register are latched > and need to be cleared. Clear them before doing our transfer so we > don't see old bits and get confused. > > Without this patch having a single failure would mean

Re: [PATCH v3 04/19] mm: slub: implement SLUB version of obj_to_index()

2020-05-15 Thread Christopher Lameter
On Tue, 12 May 2020, Roman Gushchin wrote: > > Add it to the metadata at the end of the object. Like the debugging > > information or the pointer for RCU freeing. > > Enabling debugging metadata currently disables the cache merging. > I doubt that it's acceptable to sacrifice the cache merging in

Re: [PATCH v2 1/2] drm/bridge: ti-sn65dsi86: Implement lane reordering + polarity

2020-05-15 Thread Rob Clark
On Wed, May 6, 2020 at 2:03 PM Douglas Anderson wrote: > > The ti-sn65dsi86 MIPI DSI to eDP bridge chip supports arbitrary > remapping of eDP lanes and also polarity inversion. Both of these > features have been described in the device tree bindings for the > device since the beginning but were

Re: [PATCH] docs: sysctl/kernel: document unaligned controls

2020-05-15 Thread Stephen Kitt
On Fri, 15 May 2020 20:36:01 +0200, Stephen Kitt wrote: > On Fri, 15 May 2020 11:27:35 -0600, Jonathan Corbet wrote: > > On Fri, 15 May 2020 18:04:06 +0200 > > Stephen Kitt wrote: > > > > > diff --git a/Documentation/index.rst b/Documentation/index.rst > > > index 9599c0f3eea8..17c38d899572

Re: [PATCH v2 7/7] perf expr: Migrate expr ids table to a hashmap

2020-05-15 Thread Ian Rogers
On Fri, May 15, 2020 at 12:41 PM Jiri Olsa wrote: > > On Fri, May 15, 2020 at 09:50:07AM -0700, Ian Rogers wrote: > > SNIP > > > diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c > > index b071df373f8b..37be5a368d6e 100644 > > --- a/tools/perf/util/metricgroup.c > > +++

[PATCH v2] docs: sysctl/kernel: document unaligned controls

2020-05-15 Thread Stephen Kitt
This documents ignore-unaligned-usertrap, unaligned-dump-stack, and unaligned-trap, based on arch/arc/kernel/unaligned.c, arch/ia64/kernel/unaligned.c, and arch/parisc/kernel/unaligned.c. While we're at it, integrate unaligned-memory-access.txt into the docs tree. Signed-off-by: Stephen Kitt

Re: [PATCH v10 01/26] Documentation/x86: Add CET description

2020-05-15 Thread Yu-cheng Yu
On Fri, 2020-05-15 at 11:39 -0700, Dave Hansen wrote: > On 5/12/20 4:20 PM, Yu-cheng Yu wrote: > > On Wed, 2020-04-29 at 16:02 -0700, Yu-cheng Yu wrote: > > > On Wed, 2020-04-29 at 15:53 -0700, Dave Hansen wrote: > > > > On 4/29/20 3:07 PM, Yu-cheng Yu wrote: > > > > > +Note: > > > > > + There is

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

2020-05-15 Thread Frederic Weisbecker
On Fri, May 15, 2020 at 11:29:13PM +0200, Thomas Gleixner wrote: > Thomas Gleixner writes: > > > From: Frederic Weisbecker > > This changelog was very empty. Here is what Peter provided: > > When using nmi_enter() recursively, arch_nmi_enter() must also be recursion > safe. In particular,

[PATCH v2 05/15] bna: use new module_firmware_crashed()

2020-05-15 Thread Luis Chamberlain
This makes use of the new module_firmware_crashed() to help annotate when firmware for device drivers crash. When firmware crashes devices can sometimes become unresponsive, and recovery sometimes requires a driver unload / reload and in the worst cases a reboot. Using a taint flag allows us to

[PATCH v2 01/15] taint: add module firmware crash taint support

2020-05-15 Thread Luis Chamberlain
Device driver firmware can crash, and sometimes, this can leave your system in a state which makes the device or subsystem completely useless. Detecting this by inspecting /proc/sys/kernel/tainted instead of scraping some magical words from the kernel log, which is driver specific, is much easier.

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