[PATCH RT 4/8] sched: migrate disable: Protect cpus_ptr with lock

2019-07-26 Thread Scott Wood
Various places assume that cpus_ptr is protected by rq/pi locks, so don't change it before grabbing those locks. Signed-off-by: Scott Wood --- kernel/sched/core.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index

[PATCH RT 1/8] sched: migrate_enable: Use sleeping_lock to indicate involuntary sleep

2019-07-26 Thread Scott Wood
Without this, rcu_note_context_switch() will complain if an RCU read lock is held when migrate_enable() calls stop_one_cpu(). Signed-off-by: Scott Wood --- include/linux/sched.h| 4 ++-- kernel/rcu/tree_plugin.h | 2 +- kernel/sched/core.c | 2 ++ 3 files changed, 5 insertions(+), 3

[PATCH RT 6/8] sched: migrate_enable: Set state to TASK_RUNNING

2019-07-26 Thread Scott Wood
If migrate_enable() is called while a task is preparing to sleep (state != TASK_RUNNING), that triggers a debug check in stop_one_cpu(). Explicitly reset state to acknowledge that we're accepting the spurious wakeup. Signed-off-by: Scott Wood --- kernel/sched/core.c | 8 1 file

[PATCH] raid1: factor out a common routine to handle the completion of sync write

2019-07-26 Thread Hou Tao
It's just code clean-up. Signed-off-by: Hou Tao --- drivers/md/raid1.c | 39 ++- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 1755d2233e4d..d73ed94764c1 100644 --- a/drivers/md/raid1.c +++

[PATCH RT 5/8] sched/deadline: Reclaim cpuset bandwidth in .migrate_task_rq()

2019-07-26 Thread Scott Wood
With the changes to migrate disabling, ->set_cpus_allowed() no longer gets deferred until migrate_enable(). To avoid releasing the bandwidth while the task may still be executing on the old CPU, move the subtraction to ->migrate_task_rq(). Signed-off-by: Scott Wood --- kernel/sched/deadline.c

[PATCH RT 2/8] sched: __set_cpus_allowed_ptr: Check cpus_mask, not cpus_ptr

2019-07-26 Thread Scott Wood
This function is concerned with the long-term cpu mask, not the transitory mask the task might have while migrate disabled. Before this patch, if a task was migrate disabled at the time __set_cpus_allowed_ptr() was called, and the new mask happened to be equal to the cpu that the task was running

[PATCH RT 7/8] sched: migrate_enable: Use select_fallback_rq()

2019-07-26 Thread Scott Wood
migrate_enable() currently open-codes a variant of select_fallback_rq(). However, it does not have the "No more Mr. Nice Guy" fallback and thus it will pass an invalid CPU to the migration thread if cpus_mask only contains a CPU that is !active. Signed-off-by: Scott Wood --- This scenario will

[PATCH RT 3/8] sched: Remove dead __migrate_disabled() check

2019-07-26 Thread Scott Wood
This code was unreachable given the __migrate_disabled() branch to "out" immediately beforehand. Signed-off-by: Scott Wood --- kernel/sched/core.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 6e643d656d71..99a3cfccf4d3 100644 ---

[PATCH RT 8/8] sched: Lazy migrate_disable processing

2019-07-26 Thread Scott Wood
Avoid overhead on the majority of migrate disable/enable sequences by only manipulating scheduler data (and grabbing the relevant locks) when the task actually schedules while migrate-disabled. Very large speedups were seen during a kernel build. Instead of cpuhp_pin_lock, CPU hotplug is handled

[RT PATCH 0/8] migrate disable fixes and performance

2019-07-26 Thread Scott Wood
With these patches, a kernel build on a 104-cpu machine took around 75% less wall time and 85% less system time. Note that there is a difference in v5.2-rt compared to v5.0-rt. The performance with these patches is similar in both cases, but without these patches v5.2-rt is substantially slower.

[RFC PATCH 00/21] x86/sgx: KVM: Add SGX virtualization

2019-07-26 Thread Sean Christopherson
This is an "early" RFC series for adding SGX virtualization to KVM. SGX virtualization (more specifically, EPC virtualization) is dependent on the not-yet-merged SGX enabling series and so cannot be considered for inclusion any time soon. The primary goal of this RFC is to get feedback on the

[RFC PATCH 02/21] x86/sgx: Move bus registration and device init to common code

2019-07-26 Thread Sean Christopherson
Move the SGX bus registration and initialization into common code in preparation for adding a virtual EPC device, which will reside outside of the native SGX userspace driver. Signed-off-by: Sean Christopherson --- arch/x86/kernel/cpu/sgx/driver/main.c | 48 +

[RFC PATCH 11/21] KVM: x86: Export kvm_propagate_fault (as kvm_propagate_page_fault)

2019-07-26 Thread Sean Christopherson
Support for SGX Launch Control requires KVM to trap and execute ENCLS[EINIT] on behalf of the guest. Interception of ENCLS leafs occurs immediately after CPL0 checks, i.e. before any processing of the leaf-specific operands. As such, it's possible that KVM could intercept an EINIT from L2 and

[RFC PATCH 13/21] x86/sgx: Move the intermediate EINIT helper into the driver

2019-07-26 Thread Sean Christopherson
Providing sgx_einit() in the common SGX code was a bit premature. The thought was that the native SGX driver and KVM would be able to use a common EINIT helper, but that may or may not hold true depending on how KVM's implementation shakes out. For example, KVM may want to pass user pointers

[RFC PATCH 12/21] KVM: x86: Define new #PF SGX error code bit

2019-07-26 Thread Sean Christopherson
Page faults that are signaled by the SGX Enclave Page Cache Map (EPCM), as opposed to the traditional IA32/EPT page tables, set an SGX bit in the error code to indicate that the #PF was induced by SGX. KVM will need to emulate this behavior as part of its trap-and-execute-EINIT scheme needed to

[RFC PATCH 01/21] x86/sgx: Add defines for SGX device minor numbers

2019-07-26 Thread Sean Christopherson
Add defines to track the minor numbers for each SGX device in preparation for moving the helper code and provisioning device to the common subsystem, and in preparation for adding a third device, i.e. a virtual EPC device. Signed-off-by: Sean Christopherson ---

[RFC PATCH 09/21] KVM: VMX: Add basic handling of VM-Exit from SGX enclave

2019-07-26 Thread Sean Christopherson
Intel SGX adds a new CPL3-only execution environment referred to as an "enclave". To protect the secrets of an enclave, the CPU's state is loaded with synthetic data when exiting the enclave (the enclave's state is saved/restored via protected memory), and the RIP is set to a defined exit value.

[RFC PATCH 04/21] x86/sgx: Add /dev/sgx/virt_epc device to allocate "raw" EPC for VMs

2019-07-26 Thread Sean Christopherson
Add an SGX device to enable userspace to allocate EPC without an associated enclave. The intended and only known use case for direct EPC allocation is to expose EPC to a KVM guest, hence the virt_epc moniker, virt.{c,h} files and INTEL_SGX_VIRTUALIZATION Kconfig. Although KVM is the end consumer

[RFC PATCH 08/21] KVM: x86: Add kvm_x86_ops hook to short circuit emulation

2019-07-26 Thread Sean Christopherson
Similar to the existing AMD #NPF case where emulation of the current instruction is not possible due to lack of information, virtualization of Intel SGX will introduce a scenario where emulation is not possible due to the VMExit occurring in an SGX enclave. And again similar to the AMD case,

[RFC PATCH 10/21] KVM: x86: Export kvm_mmu_gva_to_gpa_{read,write}() for VMX/SGX

2019-07-26 Thread Sean Christopherson
Support for SGX Launch Control requires KVM to trap and execute ENCLS[ECREATE] and ENCLS[EINIT] on behalf of the guest, which requires requires obtaining the GPA of a Secure Enclave Control Structure (SECS) in order to get its corresponding HVA. Because the SECS must reside in the Enclave Page

[RFC PATCH 16/21] KVM: VMX: Edd emulation of SGX Launch Control LE hash MSRs

2019-07-26 Thread Sean Christopherson
SGX Launch Control (LC) modifies the behavior of ENCLS[EINIT] to query a set of user-controllable MSRs (Launch Enclave, a.k.a. LE, Hash MSRs) when verifying the key used to sign an enclave. On CPUs without LC support, the public key hash of allowed LEs is hardwired into the CPU to an Intel

[RFC PATCH 17/21] KVM: VMX: Add handler for ENCLS[EINIT] to support SGX Launch Control

2019-07-26 Thread Sean Christopherson
SGX Launch Control (LC) modifies the behavior of ENCLS[EINIT] to query a set of user-controllable MSRs (Launch Enclave, a.k.a. LE, Hash MSRs) when verifying the key used to sign an enclave. On CPUs without LC support, the public key hash of allowed LEs is hardwired into the CPU to an Intel

[RFC PATCH 05/21] x86/sgx: Expose SGX architectural definitions to the kernel

2019-07-26 Thread Sean Christopherson
KVM will use many of the architectural constants and structs to virtualize SGX. Signed-off-by: Sean Christopherson --- arch/x86/{kernel/cpu/sgx/arch.h => include/asm/sgx_arch.h} | 0 arch/x86/kernel/cpu/sgx/driver/driver.h| 2 +- arch/x86/kernel/cpu/sgx/encl.c

[RFC PATCH 21/21] KVM: x86: Add capability to grant VM access to privileged SGX attribute

2019-07-26 Thread Sean Christopherson
The SGX subsystem restricts access to a subset of enclave attributes to provide additional security for an uncompromised kernel, e.g. to prevent malware from using the PROVISIONKEY to ensure its nodes are running inside a geniune SGX enclave and/or to obtain a stable fingerprint. To prevent

[RFC PATCH 20/21] x86/sgx: Export sgx_set_attribute() for use by KVM

2019-07-26 Thread Sean Christopherson
To prevent userspace from circumventing access to the PROVISIONKEY by running an enclave in a VM, KVM will deny access to the PROVISIONKEY unless userspace proves to KVM that it is allowed to access the key. Export sgx_set_attribute() so that it may be used by KVM to verify an SGX attribute file.

[RFC PATCH 19/21] KVM: VMX: Enable SGX virtualization for SGX1, SGX2 and LC

2019-07-26 Thread Sean Christopherson
SGX adds a basic support bit to CPUID(7, 0), and enumerates SGX capabilities, e.g. EPC info, ENCLS leafs, etc..., in CPUID(0x12, *). All SGX1 and SGX2 ENCLS leafs (supported in hardware) can be exposed to the guest unconditionally. All other ENCLS leafs (currently the ENCLS_C leafs) and all ENCLV

[RFC PATCH 15/21] KVM: VMX: Add SGX ENCLS[ECREATE] handler to enforce CPUID restrictions

2019-07-26 Thread Sean Christopherson
Userspace can restrict what bits can be set in MISCSELECT, ATTRIBUTES and XFRM via CPUID. Intercept ECREATE when any of the aforementioned masks diverges from hardware in order to enforce the desired CPUID model, i.e. inject #GP if the guest attempts to set a bit that hasn't been enumerated as

[RFC PATCH 18/21] KVM: x86: Invoke kvm_x86_ops->cpuid_update() after kvm_update_cpuid()

2019-07-26 Thread Sean Christopherson
VMX's virtualization of SGX adds a lovely dependency on the guest's supported xcr0, which is calculated in kvm_update_cpuid(). VMX must toggled its interception of SGX instructions based on the supported xcr0, i.e. kvm_x86_ops->cpuid_update() is certainly the correct location for the dependent

[RFC PATCH 07/21] KVM: x86: Add WARN_ON_ONCE(index!=0) in __do_cpuid_ent

2019-07-26 Thread Sean Christopherson
Except for one outlier, function 7, all cases in __do_cpuid_ent and its children assume that the index passed in is zero. Furthermore, the index is fully under KVM's control and all callers pass an index of zero. In other words, a non-zero index would indicate either a bug in the caller or a new

[RFC PATCH 14/21] x86/sgx: Add helpers to expose ECREATE and EINIT to KVM

2019-07-26 Thread Sean Christopherson
Provide wrappers around __ecreate() and __einit() to export their functionality for use by KVM without having to export a large amount of SGX boilerplate code. Intermediate helpers also shelter KVM from the ugliness of overloading the ENCLS return value to encode multiple error formats in a

[RFC PATCH 06/21] KVM: x86: Add SGX sub-features leaf to reverse CPUID table

2019-07-26 Thread Sean Christopherson
CPUID_12_EAX is an Intel-defined feature bits leaf dedicated for SGX that enumerates the SGX instruction sets that are supported by the CPU, e.g. SGX1, SGX2, etc... Since Linux only cares about two bits at this time (SGX1 and SGX2), the SGX bits were relocated to to Linux-defined word 8, i.e.

[RFC PATCH 03/21] x86/sgx: Move provisioning device to common code

2019-07-26 Thread Sean Christopherson
Move the provisioning device to common code in preparation for adding support for SGX virtualization. The provisioning device will need to be instantiated if the native SGX driver *or* the virtual EPC "driver" is loaded. Signed-off-by: Sean Christopherson ---

[PATCH V3 net-next 10/10] net: hns3: use dev_info() instead of pr_info()

2019-07-26 Thread Huazhong Tan
dev_info() is more appropriate for printing messages when driver initialization done, so switch to dev_info(). Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 4 +++- drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 3 ++- 2 files changed,

[PATCH V3 net-next 07/10] net: hns3: make hclge_service use delayed workqueue

2019-07-26 Thread Huazhong Tan
From: Yunsheng Lin Use delayed work instead of using timers to trigger the hclge_serive. Simplify the code with one less middle function and in order to support misc irq affinity. Signed-off-by: Yunsheng Lin Reviewed-by: Peng Li Signed-off-by: Huazhong Tan ---

[PATCH V3 net-next 08/10] net: hns3: add interrupt affinity support for misc interrupt

2019-07-26 Thread Huazhong Tan
From: Yunsheng Lin The misc interrupt is used to schedule the reset and mailbox subtask, and service_task delayed_work is used to do periodic management work each second. This patch sets the above three subtask's affinity using the misc interrupt' affinity. Also this patch setups a affinity

[PATCH V3 net-next 02/10] net: hns3: add a check for get_reset_level

2019-07-26 Thread Huazhong Tan
From: Guangbin Huang For some cases, ops->get_reset_level may not be implemented, so we should check whether it is NULL before calling get_reset_level. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 2 +- 1 file changed, 1

[PATCH V3 net-next 00/10] net: hns3: some code optimizations & bugfixes & features

2019-07-26 Thread Huazhong Tan
This patch-set includes code optimizations, bugfixes and features for the HNS3 ethernet controller driver. [patch 1/10] checks reset status before setting channel. [patch 2/10] adds a NULL pointer checking. [patch 3/10] removes reset level upgrading when current reset fails. [patch 4/10] fixes

[PATCH V3 net-next 04/10] net: hns3: change GFP flag during lock period

2019-07-26 Thread Huazhong Tan
From: Yufeng Mo When allocating memory, the GFP_KERNEL cannot be used during the spin_lock period. This is because it may cause scheduling when holding spin_lock. This patch changes GFP flag to GFP_ATOMIC in this case. Fixes: dd74f815dd41 ("net: hns3: Add support for rule add/delete for flow

[PATCH V3 net-next 06/10] net: hns3: add debug messages to identify eth down cause

2019-07-26 Thread Huazhong Tan
From: Yonglong Liu Some times just see the eth interface have been down/up via dmesg, but can not know why the eth down. So adds some debug messages to identify the cause for this. Signed-off-by: Yonglong Liu Signed-off-by: Peng Li Signed-off-by: Huazhong Tan ---

[PATCH V3 net-next 01/10] net: hns3: add reset checking before set channels

2019-07-26 Thread Huazhong Tan
From: Jian Shen hns3_set_channels() should check the resetting status firstly, since the device will reinitialize when resetting. If the reset has not completed, the hns3_set_channels() may access invalid memory. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan ---

[PATCH V3 net-next 03/10] net: hns3: remove upgrade reset level when reset fail

2019-07-26 Thread Huazhong Tan
Currently, hclge_reset_err_handle() will assert a global reset when the failing count is smaller than MAX_RESET_FAIL_CNT, which will affect other running functions. So this patch removes this upgrading, and uses re-scheduling reset task to do it. Signed-off-by: Huazhong Tan Reviewed-by:

[PATCH V3 net-next 05/10] net: hns3: modify firmware version display format

2019-07-26 Thread Huazhong Tan
From: Yufeng Mo This patch modifies firmware version display format in hclge(vf)_cmd_init() and hns3_get_drvinfo(). Also, adds some optimizations for firmware version display format. Signed-off-by: Yufeng Mo Signed-off-by: Peng Li Signed-off-by: Huazhong Tan ---

[PATCH V3 net-next 09/10] net: hns3: Add support for using order 1 pages with a 4K buffer

2019-07-26 Thread Huazhong Tan
From: Yunsheng Lin Hardware supports 0.5K, 1K, 2K, 4K RX buffer size, the RX buffer can not be reused because the hns3_page_order return 0 when page size and RX buffer size are both 4096. So this patch changes the hns3_page_order to return 1 when RX buffer is greater than half of the page size

Re: [PATCH 5.2 00/66] 5.2.4-stable review

2019-07-26 Thread Naresh Kamboju
On Fri, 26 Jul 2019 at 20:55, Greg Kroah-Hartman wrote: > > This is the start of the stable review cycle for the 5.2.4 release. > There are 66 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. > >

Re: [PATCH 5.1 00/62] 5.1.21-stable review

2019-07-26 Thread Naresh Kamboju
On Fri, 26 Jul 2019 at 20:59, Greg Kroah-Hartman wrote: > > Note, this will be the LAST 5.1.y kernel release. Everyone should move > to the 5.2.y series at this point in time. > > This is the start of the stable review cycle for the 5.1.21 release. > There are 62 patches in this series, all will

Re: [PATCH] hv_sock: use HV_HYP_PAGE_SIZE instead of PAGE_SIZE_4K

2019-07-26 Thread kbuild test robot
Hi Himadri, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [cannot apply to v5.3-rc1 next-20190726] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits

linux-next: Fixes tag needs some work in the usb tree

2019-07-26 Thread Stephen Rothwell
Hi all, In commit 6269e4c76eac ("usb: host: xhci-hub: fix extra endianness conversion") Fixes tag Fixes: 395f540 "xhci: support new USB 3.1 hub request to get extended port status" has these problem(s): - SHA1 should be at least 12 digits long Can be fixed by setting core.abbrev

[PATCH] clocksource/drivers: hyperv_timer: Fix CPU offlining by unbinding the timer

2019-07-26 Thread Dexuan Cui
The commit fd1fea6834d0 says "No behavior is changed", but actually it removes the clockevents_unbind_device() call from hv_synic_cleanup(). In the discussion earlier this month, I thought the unbind call is unnecessary (see https://www.spinics.net/lists/arm-kernel/msg739888.html), however, after

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

2019-07-26 Thread Stephen Rothwell
Hi all, Commit 53a5d5192803 ("crypto: ccp - Log an error message when ccp-crypto fails to load") is missing a Signed-off-by from its author. -- Cheers, Stephen Rothwell pgp8CGxhoQd5K.pgp Description: OpenPGP digital signature

Re: [PATCH 4.19 00/50] 4.19.62-stable review

2019-07-26 Thread Naresh Kamboju
On Fri, 26 Jul 2019 at 21:03, Greg Kroah-Hartman wrote: > > This is the start of the stable review cycle for the 4.19.62 release. > There are 50 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. > >

Re: mmotm 2019-07-24-21-39 uploaded (mm/memcontrol)

2019-07-26 Thread Nathan Chancellor
On Fri, Jul 26, 2019 at 09:19:52PM -0700, Andrew Morton wrote: > On Fri, 26 Jul 2019 20:42:05 -0700 Nathan Chancellor > wrote: > > > > @@ -2414,8 +2414,9 @@ void mem_cgroup_handle_over_high(void) > > >*/ > > > clamped_high = max(high, 1UL); > > > > > > - overage = ((u64)(usage - high)

Re: [PATCH 5.1 00/62] 5.1.21-stable review

2019-07-26 Thread kernelci.org bot
stable-rc/linux-5.1.y boot: 127 boots: 2 failed, 81 passed with 44 offline (v5.1.20-63-gf878628d8f1e) Full Boot Summary: https://kernelci.org/boot/all/job/stable-rc/branch/linux-5.1.y/kernel/v5.1.20-63-gf878628d8f1e/ Full Build Summary:

Re: mmotm 2019-07-24-21-39 uploaded (mm/memcontrol)

2019-07-26 Thread Andrew Morton
On Fri, 26 Jul 2019 20:42:05 -0700 Nathan Chancellor wrote: > > @@ -2414,8 +2414,9 @@ void mem_cgroup_handle_over_high(void) > > */ > > clamped_high = max(high, 1UL); > > > > - overage = ((u64)(usage - high) << MEMCG_DELAY_PRECISION_SHIFT) > > - / clamped_high; > > +

Re: mmotm 2019-07-24-21-39 uploaded (mm/memcontrol)

2019-07-26 Thread Nathan Chancellor
On Thu, Jul 25, 2019 at 04:39:59PM -0700, Andrew Morton wrote: > On Thu, 25 Jul 2019 15:02:59 -0700 Randy Dunlap wrote: > > > On 7/24/19 9:40 PM, a...@linux-foundation.org wrote: > > > The mm-of-the-moment snapshot 2019-07-24-21-39 has been uploaded to > > > > > >

[PATCH v7] driver core: Fix use-after-free and double free on glue directory

2019-07-26 Thread Muchun Song
There is a race condition between removing glue directory and adding a new device under the glue dir. It can be reproduced in following test: CPU1: CPU2: device_add() get_device_parent() class_dir_create_and_add() kobject_add_internal()

Re: [PATCH V2 net-next 07/11] net: hns3: adds debug messages to identify eth down cause

2019-07-26 Thread Joe Perches
On Sat, 2019-07-27 at 10:28 +0800, liuyonglong wrote: > On 2019/7/27 6:18, Joe Perches wrote: > > On Fri, 2019-07-26 at 22:00 +, Saeed Mahameed wrote: > > > On Fri, 2019-07-26 at 11:24 +0800, Huazhong Tan wrote: > > > > From: Yonglong Liu > > > > > > > > Some times just see the eth interface

Re: [GIT PULL] SELinux fixes for v5.3 (#1)

2019-07-26 Thread pr-tracker-bot
The pull request you sent on Fri, 26 Jul 2019 18:13:53 -0400: > git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux.git > tags/selinux-pr-20190726 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/40233e7c447367ffc615b524187970732848d5e3 Thank you! --

Re: [PATCH v2] .gitignore: Add compilation database file

2019-07-26 Thread Masahiro Yamada
On Wed, Jul 24, 2019 at 9:22 AM Toru Komatsu wrote: > > This file is used by clangd to use language server protocol. > It can be generated at each compile using scripts/gen_compile_commands.py. > Therefore it is different depending on the environment and should be > ignored. > > Signed-off-by:

[PATCH] gen_compile_commands: lower the entry count threshold

2019-07-26 Thread Masahiro Yamada
Running gen_compile_commands.py after building with allnoconfig gave this: $ ./scripts/gen_compile_commands.py WARNING: Found 449 entries. Have you compiled the kernel? Signed-off-by: Masahiro Yamada --- scripts/gen_compile_commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

Re: [PATCH] ext4: Fix deadlock on page reclaim

2019-07-26 Thread Damien Le Moal
On 2019/07/27 7:55, Theodore Y. Ts'o wrote: > On Sat, Jul 27, 2019 at 08:44:23AM +1000, Dave Chinner wrote: >>> >>> This looks like something that could hit every file systems, so >>> shouldn't we fix this in common code? We could also look into >>> just using memalloc_nofs_save for the page

Re: memory leak in kobject_set_name_vargs (2)

2019-07-26 Thread Qian Cai
> On Jul 26, 2019, at 10:29 PM, Linus Torvalds > wrote: > > On Fri, Jul 26, 2019 at 4:26 PM syzbot > wrote: >> >> syzbot has bisected this bug to: >> >> commit 0e034f5c4bc408c943f9c4a06244415d75d7108c >> Author: Linus Torvalds >> Date: Wed May 18 18:51:25 2016 + >> >> iwlwifi:

Re: WARNING in ovl_real_fdget_meta

2019-07-26 Thread syzbot
Hello, syzbot tried to test the proposed patch but build/boot failed: vmalloc) [6.623186][T1] TCP established hash table entries: 65536 (order: 7, 524288 bytes, vmalloc) [6.629001][T1] TCP bind hash table entries: 65536 (order: 10, 4194304 bytes, vmalloc) [6.633571][

Re: [PATCH 4.19 00/50] 4.19.62-stable review

2019-07-26 Thread shuah
On 7/26/19 9:24 AM, Greg Kroah-Hartman wrote: This is the start of the stable review cycle for the 4.19.62 release. There are 50 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 02/10] mm/page_alloc: use unsigned int for "order" in __rmqueue_fallback()

2019-07-26 Thread Pengfei Li
On Fri, Jul 26, 2019 at 5:36 PM Rasmus Villemoes wrote: > > On 25/07/2019 20.42, Pengfei Li wrote: > > Because "order" will never be negative in __rmqueue_fallback(), > > so just make "order" unsigned int. > > And modify trace_mm_page_alloc_extfrag() accordingly. > > > > > diff --git

Re: [PATCH 5.1 00/62] 5.1.21-stable review

2019-07-26 Thread shuah
On 7/26/19 9:24 AM, Greg Kroah-Hartman wrote: Note, this will be the LAST 5.1.y kernel release. Everyone should move to the 5.2.y series at this point in time. This is the start of the stable review cycle for the 5.1.21 release. There are 62 patches in this series, all will be posted as a

Re: [PATCH 5.2 00/66] 5.2.4-stable review

2019-07-26 Thread shuah
On 7/26/19 9:23 AM, Greg Kroah-Hartman wrote: This is the start of the stable review cycle for the 5.2.4 release. There are 66 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: memory leak in kobject_set_name_vargs (2)

2019-07-26 Thread Linus Torvalds
On Fri, Jul 26, 2019 at 4:26 PM syzbot wrote: > > syzbot has bisected this bug to: > > commit 0e034f5c4bc408c943f9c4a06244415d75d7108c > Author: Linus Torvalds > Date: Wed May 18 18:51:25 2016 + > > iwlwifi: fix mis-merge that breaks the driver While this bisection looks more likely

Re: Regression in 5.3 for some FS_USERNS_MOUNT (aka user-namespace-mountable) filesystems

2019-07-26 Thread Al Viro
On Fri, Jul 26, 2019 at 07:46:18PM -0500, Eric W. Biederman wrote: > If someone had bothered to actually look at how I was proposing to clean > things up before the new mount api we would already have that. Sigh. > > You should be able to get away with something like this which moves the >

Re: [PATCH V2 net-next 07/11] net: hns3: adds debug messages to identify eth down cause

2019-07-26 Thread liuyonglong
On 2019/7/27 6:18, Joe Perches wrote: > On Fri, 2019-07-26 at 22:00 +, Saeed Mahameed wrote: >> On Fri, 2019-07-26 at 11:24 +0800, Huazhong Tan wrote: >>> From: Yonglong Liu >>> >>> Some times just see the eth interface have been down/up via >>> dmesg, but can not know why the eth down. So

Re: Regression in 5.3 for some FS_USERNS_MOUNT (aka user-namespace-mountable) filesystems

2019-07-26 Thread Al Viro
On Sat, Jul 27, 2019 at 12:22:20AM +0100, Al Viro wrote: > On Fri, Jul 26, 2019 at 03:47:02PM -0700, Linus Torvalds wrote: > > > Of course, then later on, commit 20284ab7427f ("switch mount_capable() > > to fs_context") drops that argument entirely, and hardcodes the > > decision to look at

RE: [PATCH 3/4] RISC-V: Support case insensitive ISA string parsing.

2019-07-26 Thread Anup Patel
> -Original Message- > From: Paul Walmsley > Sent: Saturday, July 27, 2019 5:00 AM > To: Atish Patra > Cc: linux-kernel@vger.kernel.org; Alan Kao ; > Albert Ou ; Allison Randal ; > Anup Patel ; Daniel Lezcano > ; Greg Kroah-Hartman > ; Johan Hovold ; linux- >

Re: [PATCH v3 2/3] augmented rbtree: add new RB_DECLARE_CALLBACKS_MAX macro

2019-07-26 Thread Michel Lespinasse
On Fri, Jul 26, 2019 at 06:44:19PM -0700, Andrew Morton wrote: > On Mon, 8 Jul 2019 05:24:09 -0700 Michel Lespinasse wrote: > > > Syncing up with v5.2, I see that there is a new use for augmented > > rbtrees in mm/vmalloc.c which does not compile after applying my > > patchset. > > > > It's an

Re: [PATCH 4.19 00/50] 4.19.62-stable review

2019-07-26 Thread kernelci.org bot
stable-rc/linux-4.19.y boot: 118 boots: 1 failed, 77 passed with 40 offline (v4.19.61-51-g213a5f3ac1f5) Full Boot Summary: https://kernelci.org/boot/all/job/stable-rc/branch/linux-4.19.y/kernel/v4.19.61-51-g213a5f3ac1f5/ Full Build Summary:

Re: [PATCH 5.2 00/66] 5.2.4-stable review

2019-07-26 Thread kernelci.org bot
stable-rc/linux-5.2.y boot: 129 boots: 1 failed, 83 passed with 45 offline (v5.2.3-67-gd61e440a1852) Full Boot Summary: https://kernelci.org/boot/all/job/stable-rc/branch/linux-5.2.y/kernel/v5.2.3-67-gd61e440a1852/ Full Build Summary:

mmotm 2019-07-26-19-00 uploaded

2019-07-26 Thread akpm
The mm-of-the-moment snapshot 2019-07-26-19-00 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] sched/core: Don't use dying mm as active_mm for kernel threads

2019-07-26 Thread Waiman Long
On 7/26/19 7:45 PM, Waiman Long wrote: > It was found that a dying mm_struct where the owning task has exited can > stay on as active_mm of kernel threads as long as no other user tasks > run on those CPUs that use it as active_mm. This prolongs the life time > of dying mm holding up memory and

Re: [PATCH] isdn/gigaset: check endpoint null in gigaset_probe

2019-07-26 Thread Phong Tran
On 7/26/19 9:22 PM, Paul Bolle wrote: Phong Tran schreef op vr 26-07-2019 om 20:35 [+0700]: This fixed the potential reference NULL pointer while using variable endpoint. Reported-by: syzbot+35b1c403a14f5c89e...@syzkaller.appspotmail.com Tested by syzbot:

Re: [PATCH v3 2/3] augmented rbtree: add new RB_DECLARE_CALLBACKS_MAX macro

2019-07-26 Thread Andrew Morton
On Mon, 8 Jul 2019 05:24:09 -0700 Michel Lespinasse wrote: > Syncing up with v5.2, I see that there is a new use for augmented > rbtrees in mm/vmalloc.c which does not compile after applying my > patchset. > > It's an easy fix though: It still doesn't build. lib/rbtree_test.c: In function

Re: [PATCH bpf-next v10 06/10] bpf,landlock: Add a new map type: inode

2019-07-26 Thread Alexei Starovoitov
On Sun, Jul 21, 2019 at 11:31:12PM +0200, Mickaël Salaün wrote: > FIXME: 64-bits in the doc > > This new map store arbitrary values referenced by inode keys. The map > can be updated from user space with file descriptor pointing to inodes > tied to a file system. From an eBPF (Landlock) program

[PATCH v3 -next] staging: vc04_services: fix unused-but-set-variable warning

2019-07-26 Thread YueHaibing
Fix gcc used-but-set-variable warning: drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c: In function vchiq_release_internal: drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:2827:16: warning: variable local_entity_uc set but not used [-Wunused-but-set-variable]

[RFC PATCH v3 2/2] printk-rb: add test module

2019-07-26 Thread John Ogness
This module does some heavy write stress testing on the ringbuffer with a reader that is checking for integrity. Signed-off-by: John Ogness --- kernel/printk/Makefile | 2 + kernel/printk/test_prb.c | 256 +++ 2 files changed, 258 insertions(+)

[RFC PATCH v3 0/2] printk: new ringbuffer implementation

2019-07-26 Thread John Ogness
Hello, This is a follow-up RFC on the work to re-implement much of the core of printk. The threads for the previous RFC versions are here: v1[0], v2[1]. As was planned[2], this is only the first piece: a new lockless ringbuffer. Changes from v2: - Moved all code into kernel/printk/. Let's keep

[RFC PATCH v3 1/2] printk-rb: add a new printk ringbuffer implementation

2019-07-26 Thread John Ogness
See documentation for details. For the real patch the "prb overview" documentation section in kernel/printk/ringbuffer.c will be included in the commit message. Signed-off-by: John Ogness --- kernel/printk/Makefile | 3 + kernel/printk/dataring.c | 761

Re: [PATCH v2 -next] staging: vc04_services: fix used-but-set-variable warning

2019-07-26 Thread Yuehaibing
On 2019/7/26 23:57, Stefan Wahren wrote: > Hi Yue, > > Am 26.07.19 um 11:26 schrieb YueHaibing: >> Fix gcc used-but-set-variable warning: > > just a nit. It is call "unused-but-set-variable" Oh, yes, thanks! > > Acked-by: Stefan Wahren > >> >>

Re: [patch 0/8] core, x86: Preparatory steps for RT

2019-07-26 Thread Steven Rostedt
On Fri, 26 Jul 2019 23:19:36 +0200 Thomas Gleixner wrote: > CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by > CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same > functionality which today depends on CONFIG_PREEMPT. > > The following series adjusts the core and x86 code to

Re: [PATCH v3 1/2] dt-bindings: i3c: Document MediaTek I3C master bindings

2019-07-26 Thread Qii Wang
On Wed, 2019-07-24 at 14:21 -0600, Rob Herring wrote: > On Tue, Jul 09, 2019 at 09:09:21PM +0800, Qii Wang wrote: > > Document MediaTek I3C master DT bindings. > > > > Signed-off-by: Qii Wang > > --- > > .../devicetree/bindings/i3c/mtk,i3c-master.txt | 48 > > > > 1

[PATCH] PM / wakeup: Avoid dev_name collisions in wakeup class

2019-07-26 Thread Stephen Boyd
If a device is wakeup capable and the driver calls device_wakeup_init() on it during probe and then userspace writes 'enabled' to that device's power/wakeup file in sysfs we'll try to create the same named wakeup device in sysfs. The kernel will complain about duplicate file names. sysfs: cannot

Re: [PATCH 1/3 v2] fs: ocfs2: Fix possible null-pointer dereferences in ocfs2_xa_prepare_entry()

2019-07-26 Thread Joseph Qi
On 19/7/26 18:14, Jia-Ju Bai wrote: > In ocfs2_xa_prepare_entry(), there is an if statement on line 2136 to > check whether loc->xl_entry is NULL: > if (loc->xl_entry) > > When loc->xl_entry is NULL, it is used on line 2158: > ocfs2_xa_add_entry(loc, name_hash); >

Re: Regression in 5.3 for some FS_USERNS_MOUNT (aka user-namespace-mountable) filesystems

2019-07-26 Thread Eric W. Biederman
Al Viro writes: > On Fri, Jul 26, 2019 at 03:47:02PM -0700, Linus Torvalds wrote: > >> Of course, then later on, commit 20284ab7427f ("switch mount_capable() >> to fs_context") drops that argument entirely, and hardcodes the >> decision to look at fc->global. >> >> But that fc->global decision

Re: [PATCH v6 0/9] Add Error Disconnect Recover (EDR) support

2019-07-26 Thread Austin.Bolen
On 7/26/2019 6:33 PM, sathyanarayanan kuppuswamy wrote: > +Austin , Huong > > On 7/26/19 2:53 PM, Keith Busch wrote: >> On Fri, Jul 26, 2019 at 02:43:10PM -0700, >> sathyanarayanan.kuppusw...@linux.intel.com wrote: >>> From: Kuppuswamy Sathyanarayanan >>> >>> >>> This patchset adds support for

Re: [PATCH] mm: Make kvfree safe to call

2019-07-26 Thread Matthew Wilcox
On Fri, Jul 26, 2019 at 05:25:03PM -0400, Jeff Layton wrote: > On Fri, 2019-07-26 at 14:10 -0700, Alexander Duyck wrote: > > On Fri, Jul 26, 2019 at 2:01 PM Matthew Wilcox wrote: > > > From: "Matthew Wilcox (Oracle)" > > > > > > Since vfree() can sleep, calling kvfree() from contexts where

Re: [PATCH v9 4/4] uprobe: use FOLL_SPLIT_PMD instead of FOLL_SPLIT

2019-07-26 Thread Song Liu
> On Jul 26, 2019, at 4:52 PM, Andrew Morton wrote: > > On Fri, 26 Jul 2019 23:44:34 + Song Liu wrote: > >> >> >>> On Jul 26, 2019, at 4:02 PM, Andrew Morton >>> wrote: >>> >>> On Thu, 25 Jul 2019 22:46:54 -0700 Song Liu wrote: >>> This patches uses newly added

[GIT PULL] Devicetree fixes for 5.3-rc, take 2

2019-07-26 Thread Rob Herring
Hi Linus, Please pull some more DT fixes for 5.3. The nvmem changes would typically go thru Greg's tree, but they were missed in the merge window and I've been unable to get a response (partly because Srinivas is out on vacation it appears). Rob The following changes since commit

[PATCH v3] mm: memcontrol: fix use after free in mem_cgroup_iter()

2019-07-26 Thread Miles Chen
This patch is sent to report an use after free in mem_cgroup_iter() after merging commit: be2657752e9e "mm: memcg: fix use after free in mem_cgroup_iter()". I work with android kernel tree (4.9 & 4.14), and the commit: be2657752e9e "mm: memcg: fix use after free in mem_cgroup_iter()" has been

Re: [PATCH 3/3] Fix sched-messaging.c use of uninitialized value errors

2019-07-26 Thread Ian Rogers
On Fri, Jul 26, 2019 at 12:32 PM Arnaldo Carvalho de Melo wrote: > > Em Wed, Jul 24, 2019 at 04:45:00PM -0700, Numfor Mbiziwo-Tiapo escreveu: > > Our local MSAN (Memory Sanitizer) build of perf throws use of > > uninitialized value warnings in "tools/perf/bench/sched-messaging.c" > > when running

Re: [PATCH v9 4/4] uprobe: use FOLL_SPLIT_PMD instead of FOLL_SPLIT

2019-07-26 Thread Andrew Morton
On Fri, 26 Jul 2019 23:44:34 + Song Liu wrote: > > > > On Jul 26, 2019, at 4:02 PM, Andrew Morton > > wrote: > > > > On Thu, 25 Jul 2019 22:46:54 -0700 Song Liu wrote: > > > >> This patches uses newly added FOLL_SPLIT_PMD in uprobe. This enables easy > >> regroup of huge pmd after the

Re: [PATCH v2] mm: memcontrol: fix use after free in mem_cgroup_iter()

2019-07-26 Thread Miles Chen
On Fri, 2019-07-26 at 14:55 +0200, Michal Hocko wrote: > On Fri 26-07-19 14:49:33, Michal Hocko wrote: > > On Fri 26-07-19 10:12:47, Miles Chen wrote: > > > This patch is sent to report an use after free in mem_cgroup_iter() > > > after merging commit: be2657752e9e "mm: memcg: fix use after free

[PATCH] sched/core: Don't use dying mm as active_mm for kernel threads

2019-07-26 Thread Waiman Long
It was found that a dying mm_struct where the owning task has exited can stay on as active_mm of kernel threads as long as no other user tasks run on those CPUs that use it as active_mm. This prolongs the life time of dying mm holding up memory and other resources that cannot be freed. Fix that

Re: [PATCH v9 4/4] uprobe: use FOLL_SPLIT_PMD instead of FOLL_SPLIT

2019-07-26 Thread Song Liu
> On Jul 26, 2019, at 4:02 PM, Andrew Morton wrote: > > On Thu, 25 Jul 2019 22:46:54 -0700 Song Liu wrote: > >> This patches uses newly added FOLL_SPLIT_PMD in uprobe. This enables easy >> regroup of huge pmd after the uprobe is disabled (in next patch). > > Confused. There is no "next

[PATCH] dt-bindings: Fix more $id value mismatches filenames

2019-07-26 Thread Rob Herring
The path in the schema '$id' values are wrong. Fix them. Signed-off-by: Rob Herring --- Documentation/devicetree/bindings/arm/renesas.yaml | 2 +- Documentation/devicetree/bindings/arm/socionext/milbeaut.yaml | 2 +- Documentation/devicetree/bindings/arm/ti/ti,davinci.yaml

  1   2   3   4   5   6   7   8   9   10   >