[PATCH 13/15] KVM: VMX: Rename "vmx_set_guest_msr" to "vmx_set_guest_uret_msr"

2020-06-22 Thread Sean Christopherson
Add "uret" to vmx_set_guest_msr() to explicitly associate it with the guest_uret_msrs array, and to differentiate it from vmx_set_msr() as well as VMX's load/store MSRs. No functional change intended. Signed-off-by: Sean Christopherson --- arch/x86/kvm/vmx/vmx.c | 7 --- 1 file changed, 4

[PATCH 06/15] KVM: VMX: Rename vcpu_vmx's "save_nmsrs" to "nr_active_uret_msrs"

2020-06-22 Thread Sean Christopherson
Add "uret" into the name of "save_nmsrs" to explicitly associate it with the guest_uret_msrs array, and replace "save" with "active" (for lack of a better word) to better describe what is being tracked. While "save" is more or less accurate when viewed as a literal description of the field, e.g.

[PATCH 11/15] KVM: VMX: Add vmx_setup_uret_msr() to handle lookup and swap

2020-06-22 Thread Sean Christopherson
Add vmx_setup_uret_msr() to wrap the lookup and manipulation of the uret MSRs array during setup_msrs(). In addition to consolidating code, this eliminates move_msr_up(), which while being a very literally description of the function, isn't exacly helpful in understanding the net effect of the

[PATCH v3 09/14] tools/lib/lockdep: New stacktrace API

2020-06-22 Thread Sasha Levin
The kernel switched to using kernel/stacktrace.c, and the API slightly changed. Adjust it to make stack traces work again. Signed-off-by: Sasha Levin --- tools/include/linux/stacktrace.h | 8 1 file changed, 8 insertions(+) diff --git a/tools/include/linux/stacktrace.h

[PATCH 04/15] KVM: VMX: Rename the "shared_msr_entry" struct to "vmx_uret_msr"

2020-06-22 Thread Sean Christopherson
Rename struct "shared_msr_entry" to "vmx_uret_msr" to align with x86's rename of "shared_msrs" to "user_return_msrs", and to call out that the struct is specific to VMX, i.e. not part of the generic "shared_msrs" framework. Abbreviate "user_return" as "uret" to keep line lengths marginally sane

[PATCH v3 06/14] tools bitmap: add bitmap_clear definition

2020-06-22 Thread Sasha Levin
This is needed as a result of de4643a77356 ("locking/lockdep: Reuse lock chains that have been freed"). Signed-off-by: Sasha Levin --- tools/lib/bitmap.c | 20 1 file changed, 20 insertions(+) diff --git a/tools/lib/bitmap.c b/tools/lib/bitmap.c index

[PATCH v3 02/14] tools headers: Add rcupdate.h header

2020-06-22 Thread Sasha Levin
This is now needed by liblockdep as a result of a0b0fd53e1e6 ("locking/lockdep: Free lock classes that are no longer in use"). Signed-off-by: Sasha Levin --- tools/include/linux/rcupdate.h | 12 1 file changed, 12 insertions(+) create mode 100644 tools/include/linux/rcupdate.h

[PATCH v3 07/14] tools/lib/lockdep: Hook up vsprintf, find_bit, hweight libraries

2020-06-22 Thread Sasha Levin
They already exist in tools/lib/, and are now required by liblockdep, so just add them to the build manifest. Signed-off-by: Sasha Levin --- tools/lib/lockdep/Build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/lockdep/Build b/tools/lib/lockdep/Build index

[PATCH 14/15] KVM: VMX: Rename "vmx_msr_index" to "vmx_uret_msrs_list"

2020-06-22 Thread Sean Christopherson
Rename "vmx_msr_index" to "vmx_uret_msrs_list" to associate it with the uret MSRs array, and to avoid conflating "MSR's ECX index" with "MSR's index into an array". Similarly, don't use "slot" in the name as that terminology is claimed by the common x86 "user_return_msrs" mechanism. No

[PATCH v3 11/14] tools/lib/lockdep: switch to using lockdep_init_map_waits

2020-06-22 Thread Sasha Levin
As of de8f5e4f2dc1 ("lockdep: Introduce wait-type checks") lockdep exports lockdep_init_map_waits() instead of lockdep_init_map() for initialization. Signed-off-by: Sasha Levin --- tools/include/linux/kernel.h | 2 ++ tools/include/linux/lockdep.h | 1 +

[PATCH v3 10/14] tools/lib/lockdep: call lockdep_init_task on init

2020-06-22 Thread Sasha Levin
We now have to explicitly call lockdep_init_task() when starting up. Signed-off-by: Sasha Levin --- tools/lib/lockdep/preload.c | 4 1 file changed, 4 insertions(+) diff --git a/tools/lib/lockdep/preload.c b/tools/lib/lockdep/preload.c index 8f1adbe887b2f..578fdeda9422c 100644 ---

Re: [PATCH v2 3/3] x86/boot: Warn on orphan section placement

2020-06-22 Thread Kees Cook
On Mon, Jun 22, 2020 at 03:06:28PM -0700, Fangrui Song wrote: > LLD may report warnings for 3 synthetic sections if they are orphans: > > ld.lld: warning: :(.symtab) is being placed in '.symtab' > ld.lld: warning: :(.shstrtab) is being placed in '.shstrtab' > ld.lld: warning: :(.strtab) is being

Re: [PATCH][next] sparc64: viohs: Use struct_size() helper

2020-06-22 Thread David Miller
From: "Gustavo A. R. Silva" Date: Fri, 19 Jun 2020 20:14:06 -0500 > Make use of the struct_size() helper instead of an open-coded version > in order to avoid any potential type mistakes. Also, remove unnecessary > variable _len_. > > This code was detected with the help of Coccinelle and,

[PATCH v3 04/14] tools bitmap: add bitmap_andnot definition

2020-06-22 Thread Sasha Levin
Add definition of bitmap_andnot() and wire tools/lib/bitmap.c into liblockdep. This is needed as a result of de4643a77356 ("locking/lockdep: Reuse lock chains that have been freed"). Signed-off-by: Sasha Levin --- tools/include/linux/bitmap.h | 10 ++ tools/lib/bitmap.c | 15

[PATCH v3 05/14] tools/lib/lockdep: add definition required for IRQ flag tracing

2020-06-22 Thread Sasha Levin
We are going to start building with CONFIG_TRACE_IRQFLAGS defined, so let's wire up a few dummy variables in our task_struct. This isn't needed in userspace, but due to some refactoring in kernel-side lockdep it's easier to just wire it up and enable CONFIG_TRACE_IRQFLAGS. Signed-off-by: Sasha

[PATCH v3 00/14] Fix up liblockdep for 5.8-rc

2020-06-22 Thread Sasha Levin
Hi Peter, This series fixes up most of liblockdep to work with the current kernel tree. Change in v3: - Rebase on top of the 5.8 merge window work. Sasha Levin (14): tools headers: Add kprobes.h header tools headers: Add rcupdate.h header tools/kernel.h: extend with dummy RCU functions

[PATCH v3 12/14] tools/kernel.h: hide noinstr

2020-06-22 Thread Sasha Levin
After 65538943 ("vmlinux.lds.h: Create section for protection against instrumentation") we need to ignore "noinstr" in userspace. Signed-off-by: Sasha Levin --- tools/include/linux/kernel.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/include/linux/kernel.h

[PATCH v3 08/14] tools/lib/lockdep: Enable building with CONFIG_TRACE_IRQFLAGS

2020-06-22 Thread Sasha Levin
At this point it's always enabled with CONFIG_PROVE_LOCKING, so it's easier to enable it in liblockdep as well rather than try and fix up the lockdep code. Signed-off-by: Sasha Levin --- tools/lib/lockdep/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v3 13/14] tools/lib/lockdep: explicitly declare lockdep_init_task()

2020-06-22 Thread Sasha Levin
Avoid a warning as we can't pull the decleration for lockdep's header. Signed-off-by: Sasha Levin --- tools/lib/lockdep/preload.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/lib/lockdep/preload.c b/tools/lib/lockdep/preload.c index 5bd58c51066c4..2928c712f87f8 100644 ---

[PATCH v3 14/14] tools/kernel.h: hide task_struct.hardirq_chain_key

2020-06-22 Thread Sasha Levin
As a result of c86e9b987cea ("lockdep: Prepare for noinstr sections") we need to hide hardirq_chain_key from userspace to avoid a build error. Signed-off-by: Sasha Levin --- tools/include/linux/lockdep.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/include/linux/lockdep.h

[PATCH 07/15] KVM: VMX: Rename vcpu_vmx's "guest_msrs_ready" to "guest_uret_msrs_loaded"

2020-06-22 Thread Sean Christopherson
Add "uret" to "guest_msrs_ready" to explicitly associate it with the "guest_uret_msrs" array, and replace "ready" with "loaded" to more precisely reflect what it tracks, e.g. "ready" could be interpreted as meaning ready for processing (setup_msrs() has run), which is wrong. "loaded" also aligns

[PATCH 00/15] KVM: x86: VMX: Fix MSR namespacing

2020-06-22 Thread Sean Christopherson
This series attempts to clean up VMX's MSR namespacing, which is in unimitigated disaster (keeping things PG). There are a variety of ways VMX saves and restores guest MSRs, all with unique properties and mechanisms, but with haphazard namespacing (assuming there is any namespacing at all). Some

[PATCH v3 03/14] tools/kernel.h: extend with dummy RCU functions

2020-06-22 Thread Sasha Levin
These calls were added by 108c14858b9e ("locking/lockdep: Add support for dynamic keys") and require no special handling in userspace, so just add empty function definitions. Signed-off-by: Sasha Levin --- tools/include/linux/kernel.h | 7 +++ 1 file changed, 7 insertions(+) diff --git

[PATCH 15/15] KVM: VMX: Rename vmx_uret_msr's "index" to "slot"

2020-06-22 Thread Sean Christopherson
Rename "index" to "slot" in struct vmx_uret_msr to align with the terminology used by common x86's kvm_user_return_msrs, and to avoid conflating "MSR's ECX index" with "MSR's index into an array". No functional change intended. Signed-off-by: Sean Christopherson --- arch/x86/kvm/vmx/vmx.c | 8

[PATCH 03/15] KVM: VMX: Rename "vmx_find_msr_index" to "vmx_find_loadstore_msr_slot"

2020-06-22 Thread Sean Christopherson
Add "loadstore" to vmx_find_msr_index() to differentiate it from the so called shared MSRs helpers (which will soon be renamed), and replace "index" with "slot" to better convey that the helper returns slot in the array, not the MSR index (the value that gets stuffed into ECX). No functional

Re: [PATCH net-next v9 1/5] dt-bindings: net: Add tx and rx internal delays

2020-06-22 Thread David Miller
From: Dan Murphy Date: Fri, 19 Jun 2020 11:18:09 -0500 > @@ -162,6 +162,19 @@ properties: > description: >Specifies a reference to a node representing a SFP cage. > > + > + rx-internal-delay-ps: Do you really want two empty lines between these two sections?

Re: [PATCH net-next v9 2/5] net: phy: Add a helper to return the index for of the internal delay

2020-06-22 Thread David Miller
From: Dan Murphy Date: Fri, 19 Jun 2020 11:18:10 -0500 > +s32 phy_get_internal_delay(struct phy_device *phydev, struct device *dev, > +const int *delay_values, int size, bool is_rx) > +{ > + int i; > + s32 delay; Please use reverse christmas tree ordering for

Re: [PATCH net-next v3 0/4] bonding: initial support for hardware crypto offload

2020-06-22 Thread David Miller
From: Jarod Wilson Date: Fri, 19 Jun 2020 10:31:51 -0400 > This is an initial functional implementation for doing pass-through of > hardware encryption from bonding device to capable slaves, in active-backup > bond setups. This was developed and tested using ixgbe-driven Intel x520 > interfaces

Re: [PATCH v2 3/3] x86/boot: Warn on orphan section placement

2020-06-22 Thread Kees Cook
On Mon, Jun 22, 2020 at 03:06:28PM -0700, Fangrui Song wrote: > On 2020-06-22, Kees Cook wrote: > > We don't want to depend on the linker's orphan section placement > > heuristics as these can vary between linkers, and may change between > > versions. All sections need to be explicitly named in

Re: [PATCH 13/16] mm: support THP migration to device private memory

2020-06-22 Thread Yang Shi
On Mon, Jun 22, 2020 at 3:30 PM Yang Shi wrote: > > On Mon, Jun 22, 2020 at 2:53 PM Zi Yan wrote: > > > > On 22 Jun 2020, at 17:31, Ralph Campbell wrote: > > > > > On 6/22/20 1:10 PM, Zi Yan wrote: > > >> On 22 Jun 2020, at 15:36, Ralph Campbell wrote: > > >> > > >>> On 6/21/20 4:20 PM, Zi Yan

Re: [PATCH 13/16] mm: support THP migration to device private memory

2020-06-22 Thread Yang Shi
On Mon, Jun 22, 2020 at 2:53 PM Zi Yan wrote: > > On 22 Jun 2020, at 17:31, Ralph Campbell wrote: > > > On 6/22/20 1:10 PM, Zi Yan wrote: > >> On 22 Jun 2020, at 15:36, Ralph Campbell wrote: > >> > >>> On 6/21/20 4:20 PM, Zi Yan wrote: > On 19 Jun 2020, at 17:56, Ralph Campbell wrote: >

[PATCH 6/6] arm64: defconfig: Enable Qualcomm IPCC driver

2020-06-22 Thread Bjorn Andersson
The IPCC hardware block provides a mechanism for triggering interrupts between co-processors in recent Qualcomm SoCs. This is used as basis for most form of communication between co-processors, so enable this support. Signed-off-by: Bjorn Andersson --- arch/arm64/configs/defconfig | 1 + 1 file

[PATCH 4/6] arm64: dts: qcom: sm8250: Add SMP2P nodes

2020-06-22 Thread Bjorn Andersson
SMP2P is used for interrupting and being interrupted about remoteproc state changes related to the audio, compute and sensor subsystems. Signed-off-by: Bjorn Andersson --- arch/arm64/boot/dts/qcom/sm8250.dtsi | 72 1 file changed, 72 insertions(+) diff --git

Re: [PATCH v3 1/2] integrity: Add errno field in audit message

2020-06-22 Thread Mimi Zohar
On Thu, 2020-06-18 at 14:10 -0700, Lakshmi Ramasubramanian wrote: > Error code is not included in the audit messages logged by > the integrity subsystem. > > Define a new function integrity_audit_message() that takes error code > in the "errno" parameter. Add "errno" field in the audit messages

[PATCH 3/6] arm64: dts: qcom: sm8250: Add QMP AOSS node

2020-06-22 Thread Bjorn Andersson
Add a node for the QMP AOSS. Signed-off-by: Bjorn Andersson --- arch/arm64/boot/dts/qcom/sm8250.dtsi | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi index 74a7ca96177e..246e6f279aa8 100644 ---

[PATCH 1/6] arm64: dts: qcom: sm8250-mtp: Drop PM8150 ldo11

2020-06-22 Thread Bjorn Andersson
PM8150 ldo11 on the MTP is wired to VDD_SSC_CX and controlled in levels, rather than as a regulator. As such it's available from the rpmhpd as the SM8250_LCX power domain. Fixes: ec13d5c23a33 ("arm64: dts: qcom: sm8250-mtp: Add pm8150, pm8150l and pm8009") Signed-off-by: Bjorn Andersson ---

[PATCH 5/6] arm64: dts: qcom: sm8250: Add remoteprocs

2020-06-22 Thread Bjorn Andersson
Add remoteproc nodes for the audio, compute and sensor cores, define glink for each one and enable them on the MTP with appropriate firmware defined. Signed-off-by: Bjorn Andersson --- arch/arm64/boot/dts/qcom/sm8250-mtp.dts | 15 +++ arch/arm64/boot/dts/qcom/sm8250.dtsi| 116

Re: [PATCH v2 1/3] vmlinux.lds.h: Add .gnu.version* to DISCARDS

2020-06-22 Thread Kees Cook
On Mon, Jun 22, 2020 at 03:00:43PM -0700, Fangrui Song wrote: > On 2020-06-22, Kees Cook wrote: > > For vmlinux linking, no architecture uses the .gnu.version* section, > > so remove it via the common DISCARDS macro in preparation for adding > > --orphan-handling=warn more widely. > > > >

[PATCH 2/6] arm64: dts: qcom: sm8250: Add IPCC

2020-06-22 Thread Bjorn Andersson
Add the IPCC node, used to send and receive IPC signals with remoteprocs. Signed-off-by: Bjorn Andersson --- arch/arm64/boot/dts/qcom/sm8250.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi index

[PATCH 0/6] arm64: dts: qcom: Enable SM8250 remoteprocs

2020-06-22 Thread Bjorn Andersson
With the driver code in place, add the necessary dts nodes to enable three of the remoteprocs found on Qualcomm SM8250 and finally enable the missing QCOM_IPCC driver in defconfig. Bjorn Andersson (6): arm64: dts: qcom: sm8250-mtp: Drop PM8150 ldo11 arm64: dts: qcom: sm8250: Add IPCC arm64:

Re: [PATCH 4/4] KVM: x86/mmu: Make .write_log_dirty a nested operation

2020-06-22 Thread Paolo Bonzini
On 22/06/20 23:58, Sean Christopherson wrote: > Move .write_log_dirty() into kvm_x86_nested_ops to help differentiate it > from the non-nested dirty log hooks. And because it's a nested-only > operation. > > Signed-off-by: Sean Christopherson > --- > arch/x86/include/asm/kvm_host.h | 2 +- >

Re: [v4 PATCH 0/3] Extend coredump functionality

2020-06-22 Thread Bjorn Andersson
On Wed 27 May 13:26 PDT 2020, Rishabh Bhatnagar wrote: > This patch series moves the coredump functionality to a separate > file and adds "inline" coredump feature. Inline coredump directly > copies segments from device memory during coredump to userspace. > This avoids extra memory usage at the

Re: [PATCH v7 2/3] serial: 8250_dw: Simplify the ref clock rate setting procedure

2020-06-22 Thread Serge Semin
Hello Russell, Thanks for your comments. My response is below. On Sat, Jun 20, 2020 at 09:12:01AM +0100, Russell King - ARM Linux admin wrote: > On Fri, Jun 19, 2020 at 11:02:50PM +0300, Serge Semin wrote: > > Really instead of twice checking the clk_round_rate() return value > > we could do it

Re: [PATCH v2 1/3] mfd: core: Make a best effort attempt to match devices with the correct of_nodes

2020-06-22 Thread Frank Rowand
On 2020-06-22 14:11, Lee Jones wrote: > On Mon, 22 Jun 2020, Frank Rowand wrote: > >> On 2020-06-22 10:10, Lee Jones wrote: >>> On Mon, 22 Jun 2020, Frank Rowand wrote: >>> On 2020-06-22 03:50, Lee Jones wrote: > On Thu, 18 Jun 2020, Frank Rowand wrote: > >> On 2020-06-15 04:26,

Re: [PATCH net-next v3 2/7] dt-bindings: net: add backplane dt bindings

2020-06-22 Thread Florian Fainelli
On 6/22/20 6:35 AM, Florinel Iordache wrote: > Add ethernet backplane device tree bindings > > Signed-off-by: Florinel Iordache > --- [snip] > +properties: > + $nodename: > +pattern: "^serdes(@[a-f0-9]+)?$" > + > + compatible: > +oneOf: > + - const: serdes-10g > +

[RESEND PATCH] mm: fix migrate_vma_setup() src_owner and normal pages

2020-06-22 Thread Ralph Campbell
The caller of migrate_vma_setup() does not know what type of page is stored in the CPU's page tables. Pages within the specified range are free to be swapped out, migrated, or freed until after migrate_vma_setup() returns. The caller needs to set struct migrate_vma.src_owner in case a page is a

Re: [PATCH v2 00/11] KVM: Support guest MAXPHYADDR < host MAXPHYADDR

2020-06-22 Thread Paolo Bonzini
On 22/06/20 21:14, Tom Lendacky wrote: >>> I guess I'm trying to understand why RSVD has to be reported to the guest >>> on a #PF (vs an NPF) when there's no guarantee that it can receive that >>> error code today even when guest MAXPHYADDR == host MAXPHYADDR. That would >>> eliminate the need to

[PATCH 2/4] io_uring: handle EAGAIN iopoll

2020-06-22 Thread Pavel Begunkov
req->iopoll() is not necessarily called by a task that submitted a request. Because of that, it's dangerous to grab_env() and punt async on -EGAIN, potentially grabbinf another task's mm and corrupting its memory. Do resubmit from the submitter task context. Signed-off-by: Pavel Begunkov ---

[PATCH 4/4] io-wq: return next work from ->do_work() directly

2020-06-22 Thread Pavel Begunkov
It's easier to return next work from ->do_work() than having an in-out argument. Looks nicer and easier to compile. Also, merge io_wq_assign_next() into its only user. Signed-off-by: Pavel Begunkov --- fs/io-wq.c| 8 +++- fs/io-wq.h| 2 +- fs/io_uring.c | 53

[PATCH 1/4] io_uring: fix hanging iopoll in case of -EAGAIN

2020-06-22 Thread Pavel Begunkov
io_do_iopoll() won't do anything with a request unless req->iopoll_completed is set. So io_complete_rw_iopoll() has to set it, otherwise io_do_iopoll() will poll a file again and again even though the request of interest was completed long ago. Fixes: bbde017a32b3 ("io_uring: add memory barrier

[PATCH 3/4] io-wq: compact io-wq flags numbers

2020-06-22 Thread Pavel Begunkov
Renumerate IO_WQ flags, so they take adjacent bits Signed-off-by: Pavel Begunkov --- fs/io-wq.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/io-wq.h b/fs/io-wq.h index 071f1a997800..04239dfb12b0 100644 --- a/fs/io-wq.h +++ b/fs/io-wq.h @@ -5,10 +5,10 @@ struct

[PATCH 0/4] iopoll fixes + cleanups

2020-06-22 Thread Pavel Begunkov
[1] fixes a recent for-stable patch, should be for stable as well. [2] fixes getting mm from a wrong task in iopoll path. [3,4] are unrelated cleanups. I don't send them separately because they may conflict. Pavel Begunkov (4): io_uring: fix hanging iopoll in case of -EAGAIN io_uring: handle

Re: [PATCH net-next v1 5/5] hinic: add support to get eeprom information

2020-06-22 Thread Jakub Kicinski
On Sat, 20 Jun 2020 17:42:58 +0800 Luo bin wrote: > diff --git a/drivers/net/ethernet/huawei/hinic/hinic_port.h > b/drivers/net/ethernet/huawei/hinic/hinic_port.h > index 5c916875f295..0d0354241345 100644 > --- a/drivers/net/ethernet/huawei/hinic/hinic_port.h > +++

Re: [PATCH] checkpatch: use $root/.git when seeding camel case

2020-06-22 Thread Joe Perches
On Mon, 2020-06-22 at 14:58 -0700, Jacob Keller wrote: > When seeding the camel case file, checkpatch.pl uses the $root directory > in order to find the acceptable list of allowed camel case words. > > However, if the current directory is a git repository, checkpatch.pl > attempts to seed using

[PATCH v4] coccinelle: misc: add array_size_dup script to detect missed overflow checks

2020-06-22 Thread Denis Efremov
Detect an opencoded expression that is used before or after array_size()/array3_size()/struct_size() to compute the same size. Signed-off-by: Denis Efremov --- Changes in v2: - python rules moved next to SmPL patterns - assignment operator used - struct_size patterns fixed to check only E3,

Re: [PATCH net 3/3] net: ethtool: sync netdev_features_strings order with enum netdev_features

2020-06-22 Thread Michal Kubecek
On Fri, Jun 19, 2020 at 06:39:59PM +, Alexander Lobakin wrote: > The ordering of netdev_features_strings[] makes no sense when it comes > to user interaction, as list of features in `ethtool -k` input is sorted > according to the corresponding bit's position. > Instead, it *does* make sense

Re: [PATCH v2 1/3] vmlinux.lds.h: Add .gnu.version* to DISCARDS

2020-06-22 Thread Kees Cook
On Mon, Jun 22, 2020 at 03:00:43PM -0700, Fangrui Song wrote: > On 2020-06-22, Kees Cook wrote: > > For vmlinux linking, no architecture uses the .gnu.version* section, > > so remove it via the common DISCARDS macro in preparation for adding > > --orphan-handling=warn more widely. > > > >

Re: [PATCH net-next v1 2/5] hinic: add support to set and get irq coalesce

2020-06-22 Thread Jakub Kicinski
On Sat, 20 Jun 2020 17:42:55 +0800 Luo bin wrote: > +static int is_coalesce_exceed_limit(struct net_device *netdev, > + const struct ethtool_coalesce *coal) > +{ > + struct hinic_dev *nic_dev = netdev_priv(netdev); > + > + if (coal->rx_coalesce_usecs >

Re: [PATCH net-next v1 2/5] hinic: add support to set and get irq coalesce

2020-06-22 Thread Jakub Kicinski
On Sat, 20 Jun 2020 17:42:55 +0800 Luo bin wrote: > @@ -1144,8 +1190,16 @@ static int nic_dev_init(struct pci_dev *pdev) > goto err_reg_netdev; > } > > + err = hinic_init_intr_coalesce(nic_dev); > + if (err) { > + netif_err(nic_dev, drv, netdev, "Failed to

Re: [PATCH v2 3/3] x86/boot: Warn on orphan section placement

2020-06-22 Thread Fangrui Song
On 2020-06-22, Kees Cook wrote: We don't want to depend on the linker's orphan section placement heuristics as these can vary between linkers, and may change between versions. All sections need to be explicitly named in the linker script. Add the common debugging sections. Discard the unused

Re: [PATCH v6 17/19] mm: memcg/slab: use a single set of kmem_caches for all allocations

2020-06-22 Thread Shakeel Butt
On Mon, Jun 22, 2020 at 2:58 PM Roman Gushchin wrote: > > On Mon, Jun 22, 2020 at 02:28:54PM -0700, Shakeel Butt wrote: > > On Mon, Jun 22, 2020 at 2:15 PM Roman Gushchin wrote: > > > > > > On Mon, Jun 22, 2020 at 02:04:29PM -0700, Shakeel Butt wrote: > > > > On Mon, Jun 22, 2020 at 1:37 PM

[PATCH 2/2] KVM: X86: Do the same ignore_msrs check for feature msrs

2020-06-22 Thread Peter Xu
Logically the ignore_msrs and report_ignored_msrs should also apply to feature MSRs. Add them in. Signed-off-by: Peter Xu --- arch/x86/kvm/svm/svm.c | 2 +- arch/x86/kvm/vmx/vmx.c | 2 +- arch/x86/kvm/x86.c | 10 -- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git

[PATCH 1/2] KVM: X86: Move ignore_msrs handling upper the stack

2020-06-22 Thread Peter Xu
MSR accesses can be one of: (1) KVM internal access, (2) userspace access (e.g., via KVM_SET_MSRS ioctl), (3) guest access. The ignore_msrs was previously handled by kvm_get_msr_common() and kvm_set_msr_common(), which is the bottom of the msr access stack. It's working in most cases,

[PATCH 0/2] KVM: X86: A few fixes around ignore_msrs

2020-06-22 Thread Peter Xu
Currently ignore_msrs and report_ignored_msrs have a few issues: - Errors could be dumped to dmesg even if the msr access is triggered inside kvm itself (e.g., kvm_cpuid), while what we really want to trap should be either guest msr accesses, or KVM_SET_MSRS. - These two parameters

Re: [PATCH v4 3/5] stack: Optionally randomize kernel stack offset each syscall

2020-06-22 Thread Kees Cook
On Mon, Jun 22, 2020 at 11:42:29PM +0200, Jann Horn wrote: > No, at least on x86-64 and x86 Linux overrides the normal ABI. From > arch/x86/Makefile: Ah! Thanks for the pointer. > > # For gcc stack alignment is specified with -mpreferred-stack-boundary, > # clang has the option

Re: [PATCH net 2/3] net: ethtool: fix indentation of netdev_features_strings

2020-06-22 Thread Michal Kubecek
On Fri, Jun 19, 2020 at 06:50:06PM +, Alexander Lobakin wrote: > The current indentation is an absolute mess of tabs, spaces and their > mixes in different proportions. Convert it all to plain tabs and move > assignment operation char to the right, which is the most commonly > used style in

Re: [PATCH v11 3/8] tpm: tpm_tis: Add retry in case of protocol failure or data integrity (on I2C only) failure.

2020-06-22 Thread Jarkko Sakkinen
On Tue, Jun 23, 2020 at 12:59:33AM +0300, Jarkko Sakkinen wrote: > On Thu, Jun 18, 2020 at 04:43:38PM +0300, amirmi...@gmail.com wrote: > > From: Amir Mizinski > > > > Added a retry mechanism on any protocol error. In addition, a retry is > > added in case of a data integrity issue in the I2C

Re: [hugetlbfs] c0d0381ade: vm-scalability.throughput -33.4% regression

2020-06-22 Thread Mike Kravetz
On 6/21/20 5:55 PM, kernel test robot wrote: > Greeting, > > FYI, we noticed a -33.4% regression of vm-scalability.throughput due to > commit: > > > commit: c0d0381ade79885c04a04c303284b040616b116e ("hugetlbfs: use > i_mmap_rwsem for more pmd sharing synchronization") >

Re: mmotm 2020-06-20-21-36 uploaded (lkdtm/bugs.c)

2020-06-22 Thread Richard Weinberger
On Mon, Jun 22, 2020 at 11:51 PM Kees Cook wrote: > > On Mon, Jun 22, 2020 at 08:37:17AM -0700, Randy Dunlap wrote: > > On 6/20/20 9:37 PM, a...@linux-foundation.org wrote: > > > The mm-of-the-moment snapshot 2020-06-20-21-36 has been uploaded to > > > > > >http://www.ozlabs.org/~akpm/mmotm/

Re: [PATCH v2 1/3] vmlinux.lds.h: Add .gnu.version* to DISCARDS

2020-06-22 Thread Fangrui Song
On 2020-06-22, Kees Cook wrote: For vmlinux linking, no architecture uses the .gnu.version* section, so remove it via the common DISCARDS macro in preparation for adding --orphan-handling=warn more widely. Signed-off-by: Kees Cook --- include/asm-generic/vmlinux.lds.h | 1 + 1 file changed, 1

[PATCH] arm64: defconfig: Enable Qualcomm SM8250 pinctrl driver

2020-06-22 Thread Bjorn Andersson
The SM8250 pinctrl driver provides pin configuration, pin muxing and GPIO pin control for many pins on the SM8250 SoC. Signed-off-by: Bjorn Andersson --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig

Re: [PATCH net 1/3] net: ethtool: add missing string for NETIF_F_GSO_TUNNEL_REMCSUM

2020-06-22 Thread Michal Kubecek
On Fri, Jun 19, 2020 at 06:49:46PM +, Alexander Lobakin wrote: > Commit e585f2363637 ("udp: Changes to udp_offload to support remote > checksum offload") added new GSO type and a corresponding netdev > feature, but missed Ethtool's 'netdev_features_strings' table. > Give it a name so it will

[PATCH 2/4] KVM: x86/mmu: Drop kvm_arch_write_log_dirty() wrapper

2020-06-22 Thread Sean Christopherson
Drop kvm_arch_write_log_dirty() in favor of invoking .write_log_dirty() directly from FNAME(update_accessed_dirty_bits). "kvm_arch" is usually used for x86 functions that are invoked from generic KVM, and implies that there are external callers, neither of which is true. Remove the check for a

Re: [PATCH v11 3/8] tpm: tpm_tis: Add retry in case of protocol failure or data integrity (on I2C only) failure.

2020-06-22 Thread Jarkko Sakkinen
On Thu, Jun 18, 2020 at 04:43:38PM +0300, amirmi...@gmail.com wrote: > From: Amir Mizinski > > Added a retry mechanism on any protocol error. In addition, a retry is > added in case of a data integrity issue in the I2C bus protocol. The check > is performed after sending a command to the TPM and

[PATCH 3/4] KVM: nVMX: WARN if PML emulation helper is invoked outside of nested guest

2020-06-22 Thread Sean Christopherson
WARN if vmx_write_pml_buffer() is called outside of guest mode instead of silently ignoring the condition. The only caller is nested EPT's ept_update_accessed_dirty_bits(), which should only be reachable when L2 is active. Signed-off-by: Sean Christopherson --- arch/x86/kvm/vmx/vmx.c | 45

[PATCH 4/4] KVM: x86/mmu: Make .write_log_dirty a nested operation

2020-06-22 Thread Sean Christopherson
Move .write_log_dirty() into kvm_x86_nested_ops to help differentiate it from the non-nested dirty log hooks. And because it's a nested-only operation. Signed-off-by: Sean Christopherson --- arch/x86/include/asm/kvm_host.h | 2 +- arch/x86/kvm/mmu/paging_tmpl.h | 2 +-

[PATCH] checkpatch: use $root/.git when seeding camel case

2020-06-22 Thread Jacob Keller
When seeding the camel case file, checkpatch.pl uses the $root directory in order to find the acceptable list of allowed camel case words. However, if the current directory is a git repository, checkpatch.pl attempts to seed using the local git directory. This is problematic if checkpatch.pl is

[PATCH 1/4] KVM: nVMX: Plumb L2 GPA through to PML emulation

2020-06-22 Thread Sean Christopherson
Explicitly pass the L2 GPA to kvm_arch_write_log_dirty(), which for all intents and purposes is vmx_write_pml_buffer(), instead of having the latter pull the GPA from vmcs.GUEST_PHYSICAL_ADDRESS. If the dirty bit update is the result of KVM emulation (rare for L2), then the GPA in the VMCS may be

[PATCH 0/4] KVM: x86: nVMX: Nested PML bug fix and cleanup

2020-06-22 Thread Sean Christopherson
Fix for a theoretical bug in nested PML emulation, and additional clean up of the related code. Tested by doing a few rounds of intra-VM migration (same L1) of an L2 guest with PML confirmed enabled in L1. This has a trivial conflict with patch 3 of the MMU files series[*], both remove function

Re: [PATCH v6 17/19] mm: memcg/slab: use a single set of kmem_caches for all allocations

2020-06-22 Thread Roman Gushchin
On Mon, Jun 22, 2020 at 02:28:54PM -0700, Shakeel Butt wrote: > On Mon, Jun 22, 2020 at 2:15 PM Roman Gushchin wrote: > > > > On Mon, Jun 22, 2020 at 02:04:29PM -0700, Shakeel Butt wrote: > > > On Mon, Jun 22, 2020 at 1:37 PM Roman Gushchin wrote: > > > > > > > > On Mon, Jun 22, 2020 at

Re: kernel BUG at mm/huge_memory.c:2613!

2020-06-22 Thread Andrea Arcangeli
Hello, On Mon, Jun 22, 2020 at 04:30:41PM +0100, Robin Murphy wrote: > On 2020-06-22 13:46, Joerg Roedel wrote: > > + Robin > > > > Robin, any idea on this? > > After a bit of archaeology, this dates back to the original review: > >

Re: arch/arm64/kernel/acpi.c:99:30: sparse: sparse: incorrect type in return expression (different address spaces)

2020-06-22 Thread Andy Shevchenko
0d48ea9dfc06894c3e5 > > commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to > > define address spaces > > date: 4 days ago > > config: arm64-randconfig-s031-20200622 (attached as .config) > > compiler: aarch64-linux-gcc (GCC) 9.3.0 > > reproduce: > &g

Re: [PATCH v2 1/3] mm/shuffle: don't move pages between zones and don't read garbage memmaps

2020-06-22 Thread Wei Yang
On Mon, Jun 22, 2020 at 04:06:15PM +0200, David Hildenbrand wrote: >On 22.06.20 15:10, Wei Yang wrote: >> On Mon, Jun 22, 2020 at 11:51:34AM +0200, David Hildenbrand wrote: >>> On 22.06.20 11:22, Wei Yang wrote: On Mon, Jun 22, 2020 at 10:43:11AM +0200, David Hildenbrand wrote: > On

Re: [PATCH v11 2/8] tpm: tpm_tis: Fix expected bit handling and send all bytes in one shot without last byte in exception

2020-06-22 Thread Jarkko Sakkinen
On Thu, Jun 18, 2020 at 04:43:37PM +0300, amirmi...@gmail.com wrote: > From: Amir Mizinski > > Detected the following incorrect implementation of the send command: > polling on the TPM_STS.stsValid field followed by checking the > TPM_STS.expect field only once. Since TPM_STS.stsValid represents

Re: [PATCH 13/16] mm: support THP migration to device private memory

2020-06-22 Thread Zi Yan
On 22 Jun 2020, at 17:31, Ralph Campbell wrote: > On 6/22/20 1:10 PM, Zi Yan wrote: >> On 22 Jun 2020, at 15:36, Ralph Campbell wrote: >> >>> On 6/21/20 4:20 PM, Zi Yan wrote: On 19 Jun 2020, at 17:56, Ralph Campbell wrote: > Support transparent huge page migration to ZONE_DEVICE

Re: [PATCH v11 0/8] Add tpm i2c ptp driver

2020-06-22 Thread Jarkko Sakkinen
On Thu, Jun 18, 2020 at 04:43:35PM +0300, amirmi...@gmail.com wrote: > - Jarkko Sakkinen: > https://lore.kernel.org/patchwork/patch/1252428/ > https://lore.kernel.org/patchwork/patch/1252422/ > https://lore.kernel.org/patchwork/patch/1252424/ Thanks for linking these,

Re: mmotm 2020-06-20-21-36 uploaded (lkdtm/bugs.c)

2020-06-22 Thread Kees Cook
On Mon, Jun 22, 2020 at 08:37:17AM -0700, Randy Dunlap wrote: > On 6/20/20 9:37 PM, a...@linux-foundation.org wrote: > > The mm-of-the-moment snapshot 2020-06-20-21-36 has been uploaded to > > > >http://www.ozlabs.org/~akpm/mmotm/ > > > > mmotm-readme.txt says > > > > README for

Re: [PATCH v2] clk: at91: add sama5d3 pmc driver

2020-06-22 Thread Alexandre Belloni
Hi, On 22/06/2020 23:24:45+0200, Ahmad Fatoum wrote: > > + regmap = syscon_node_to_regmap(np); > > Shouldn't this be device_node_to_regmap for the same reasons outlined in your > 6956eb33 ("clk: at91: fix possible deadlock") commit? > > Same question for at91sam9g45.c, sam9x60.c and

Re: [PATCH v2] Kernel selftests: TPM2: upgrade TPM2 tests from Python 2 to Python 3

2020-06-22 Thread Jarkko Sakkinen
On Tue, Jun 23, 2020 at 12:46:18AM +0300, Jarkko Sakkinen wrote: > On Thu, Jun 18, 2020 at 04:15:02PM +0800, Pengfei Xu wrote: > > Python 2 is no longer supported by the Python upstream project, so > > upgrade TPM2 tests to Python 3. > > > > Signed-off-by: Pengfei Xu > > Use "selftests: tpm: ".

Re: [PATCH v2] Kernel selftests: TPM2: upgrade TPM2 tests from Python 2 to Python 3

2020-06-22 Thread Jarkko Sakkinen
On Thu, Jun 18, 2020 at 04:15:02PM +0800, Pengfei Xu wrote: > Python 2 is no longer supported by the Python upstream project, so > upgrade TPM2 tests to Python 3. > > Signed-off-by: Pengfei Xu Use "selftests: tpm: ". > --- > tools/testing/selftests/tpm2/test_smoke.sh | 4 +- >

Re: [PATCH net-next v3 4/7] net: phy: add backplane kr driver support

2020-06-22 Thread Jakub Kicinski
On Mon, 22 Jun 2020 16:35:21 +0300 Florinel Iordache wrote: > Add support for backplane kr generic driver including link training > (ieee802.3ap/ba) and fixed equalization algorithm > > Signed-off-by: Florinel Iordache drivers/net/phy/backplane/backplane.c:60:11: warning: symbol

[PATCH 2/2] pinctrl: ingenic: Properly detect GPIO direction when configured for IRQ

2020-06-22 Thread Paul Cercueil
The PAT1 register contains information about the IRQ type (edge/level) for input GPIOs with IRQ enabled, and the direction for non-IRQ GPIOs. So it makes sense to read it only if the GPIO has no interrupt configured, otherwise input GPIOs configured for level IRQs are misdetected as output GPIOs.

[PATCH 1/2] pinctrl: ingenic: Enhance support for IRQ_TYPE_EDGE_BOTH

2020-06-22 Thread Paul Cercueil
Ingenic SoCs don't natively support registering an interrupt for both rising and falling edges. This has to be emulated in software. Until now, this was emulated by switching back and forth between IRQ_TYPE_EDGE_RISING and IRQ_TYPE_EDGE_FALLING according to the level of the GPIO. While this

Re: [PATCH net 9/9] net: qed: fix "maybe uninitialized" warning

2020-06-22 Thread Jakub Kicinski
On Mon, 22 Jun 2020 14:14:13 +0300 Alexander Lobakin wrote: > Variable 'abs_ppfid' in qed_dev.c:qed_llh_add_mac_filter() always gets > printed, but is initialized only under 'ref_cnt == 1' condition. This > results in: > > In file included from ./include/linux/kernel.h:15:0, >

Re: [PATCH v4 3/5] stack: Optionally randomize kernel stack offset each syscall

2020-06-22 Thread Jann Horn
On Mon, Jun 22, 2020 at 11:30 PM Kees Cook wrote: > On Mon, Jun 22, 2020 at 10:07:37PM +0200, Jann Horn wrote: > > On Mon, Jun 22, 2020 at 9:31 PM Kees Cook wrote: > > > This provides the ability for architectures to enable kernel stack base > > > address offset randomization. This feature is

Re: arch/arm64/kernel/acpi.c:99:30: sparse: sparse: incorrect type in return expression (different address spaces)

2020-06-22 Thread Andy Shevchenko
gt; define address spaces > date: 4 days ago > config: arm64-randconfig-s031-20200622 (attached as .config) > compiler: aarch64-linux-gcc (GCC) 9.3.0 > reproduce: > # apt-get install sparse > # sparse version: v0.6.2-rc1-18-g27caae40-dirty > git checkout 6

Re: [PATCH] Documentation: kunit: Add naming guidelines

2020-06-22 Thread Kees Cook
On Fri, Jun 19, 2020 at 10:49:44PM -0700, David Gow wrote: > As discussed in [1], KUnit tests have hitherto not had a particularly > consistent naming scheme. This adds documentation outlining how tests > and test suites should be named, including how those names should be > used in Kconfig

Re: [PATCH 14/16] mm/thp: add THP allocation helper

2020-06-22 Thread Ralph Campbell
On 6/21/20 5:15 PM, Zi Yan wrote: On 19 Jun 2020, at 17:56, Ralph Campbell wrote: Transparent huge page allocation policy is controlled by several sysfs variables. Rather than expose these to each device driver that needs to allocate THPs, provide a helper function. Signed-off-by: Ralph

Re: [PATCH] Documentation: kunit: Add naming guidelines

2020-06-22 Thread Brendan Higgins
I imagine +Theodore Ts'o might have some thoughts on this. +Bird, Timothy - Figured you might be interested since I think this might pertain to the KTAP discussion. On Fri, Jun 19, 2020 at 10:50 PM David Gow wrote: > > As discussed in [1], KUnit tests have hitherto not had a particularly >

Re: [PATCH 13/16] mm: support THP migration to device private memory

2020-06-22 Thread Ralph Campbell
On 6/22/20 1:10 PM, Zi Yan wrote: On 22 Jun 2020, at 15:36, Ralph Campbell wrote: On 6/21/20 4:20 PM, Zi Yan wrote: On 19 Jun 2020, at 17:56, Ralph Campbell wrote: Support transparent huge page migration to ZONE_DEVICE private memory. A new flag (MIGRATE_PFN_COMPOUND) is added to the

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