[PATCH v4 00/16] Secure Virtual Machine Enablement

2019-08-19 Thread Thiago Jung Bauermann
Hello, This is a minor update of this patch series. It addresses review comments made to v3. Details are in the changelog. The sysfs patch is updated and included here but as I mentioned earlier can be postponed. It is marked RFC for that reason. As with the previous version, the patch

[PATCH v4 04/16] powerpc/prom_init: Add the ESM call to prom_init

2019-08-19 Thread Thiago Jung Bauermann
From: Ram Pai Make the Enter-Secure-Mode (ESM) ultravisor call to switch the VM to secure mode. Pass kernel base address and FDT address so that the Ultravisor is able to verify the integrity of the VM using information from the ESM blob. Add "svm=" command line option to turn on switching to

[PATCH v4 02/16] powerpc/pseries: Introduce option to build secure virtual machines

2019-08-19 Thread Thiago Jung Bauermann
Introduce CONFIG_PPC_SVM to control support for secure guests and include Ultravisor-related helpers when it is selected Signed-off-by: Thiago Jung Bauermann --- arch/powerpc/include/asm/asm-prototypes.h | 2 +- arch/powerpc/kernel/Makefile | 4 +++-

[PATCH v4 03/16] powerpc: Add support for adding an ESM blob to the zImage wrapper

2019-08-19 Thread Thiago Jung Bauermann
From: Benjamin Herrenschmidt For secure VMs, the signing tool will create a ticket called the "ESM blob" for the Enter Secure Mode ultravisor call with the signatures of the kernel and initrd among other things. This adds support to the wrapper script for adding that blob via the "-e" option to

[PATCH v4 07/16] powerpc/pseries: Add and use LPPACA_SIZE constant

2019-08-19 Thread Thiago Jung Bauermann
Helps document what the hard-coded number means. Also take the opportunity to fix an #endif comment. Suggested-by: Alexey Kardashevskiy Signed-off-by: Thiago Jung Bauermann --- arch/powerpc/kernel/paca.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git

[PATCH v4 10/16] powerpc/pseries/svm: Unshare all pages before kexecing a new kernel

2019-08-19 Thread Thiago Jung Bauermann
From: Ram Pai A new kernel deserves a clean slate. Any pages shared with the hypervisor is unshared before invoking the new kernel. However there are exceptions. If the new kernel is invoked to dump the current kernel, or if there is a explicit request to preserve the state of the current

[PATCH v4 06/16] powerpc: Introduce the MSR_S bit

2019-08-19 Thread Thiago Jung Bauermann
From: Sukadev Bhattiprolu Protected Execution Facility (PEF) is an architectural change for POWER 9 that enables Secure Virtual Machines (SVMs). When enabled, PEF adds a new higher privileged mode, called Ultravisor mode, to POWER architecture. The hardware changes include the following: *

[PATCH v4 05/16] powerpc/pseries/svm: Add helpers for UV_SHARE_PAGE and UV_UNSHARE_PAGE

2019-08-19 Thread Thiago Jung Bauermann
From: Ram Pai These functions are used when the guest wants to grant the hypervisor access to certain pages. Signed-off-by: Ram Pai Signed-off-by: Thiago Jung Bauermann --- arch/powerpc/include/asm/ultravisor-api.h | 2 ++ arch/powerpc/include/asm/ultravisor.h | 24

RE: [PATCH v5 2/6] vfio: Introduce vGPU display irq type

2019-08-19 Thread Zhang, Tina
> -Original Message- > From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Saturday, August 17, 2019 4:52 AM > To: Zhang, Tina > Cc: intel-gvt-...@lists.freedesktop.org; kra...@redhat.com; > k...@vger.kernel.org; linux-kernel@vger.kernel.org; Yuan, Hang > ; Lv, Zhiyuan >

RE: [PATCH net-next 1/1] fec: add C45 MDIO read/write support

2019-08-19 Thread Andy Duan
From: Marco Hartmann Sent: Tuesday, August 20, 2019 1:11 AM > IEEE 802.3ae clause 45 defines a modified MDIO protocol that uses a two > staged access model in order to increase the address space. > > This patch adds support for C45 MDIO read and write accesses, which are > used whenever the

[PATCH V5 4/4] mmc: host: sdhci-pci: Add Genesys Logic GL975x support

2019-08-19 Thread Ben Chuang
From: Ben Chuang Add support for the GL9750 and GL9755 chipsets. The patches enable v4 mode and wait 5ms after set 1.8V signal enable for GL9750/GL9755. It fixed the value of SDHCI_MAX_CURRENT register and uses the vendor tuning flow for GL9750. Signed-off-by: Ben Chuang Co-developed-by:

[PATCH V5 3/4] PCI: Add Genesys Logic, Inc. Vendor ID

2019-08-19 Thread Ben Chuang
From: Ben Chuang Add the Genesys Logic, Inc. vendor ID to pci_ids.h. Signed-off-by: Ben Chuang Co-developed-by: Michael K Johnson Signed-off-by: Michael K Johnson --- include/linux/pci_ids.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/pci_ids.h

[PATCH V5 2/4] mmc: sdhci: Add PLL Enable support to internal clock setup

2019-08-19 Thread Ben Chuang
From: Ben Chuang The GL9750 and GL9755 chipsets, and possibly others, require PLL Enable setup as part of the internal clock setup as described in 3.2.1 Internal Clock Setup Sequence of SD Host Controller Simplified Specification Version 4.20. Signed-off-by: Ben Chuang Co-developed-by: Michael

Re: [PATCH v3 bpf-next 1/4] tracing/probe: Add PERF_EVENT_IOC_QUERY_PROBE ioctl

2019-08-19 Thread kbuild test robot
Hi Daniel, Thank you for the patch! Yet something to improve: [auto build test ERROR on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Daniel-Xu/tracing-probe-Add-PERF_EVENT_IOC_QUERY_PROBE-ioctl/20190820-003910 base:

[PATCH V5 1/4] mmc: sdhci: Change timeout of loop for checking internal clock stable

2019-08-19 Thread Ben Chuang
From: Ben Chuang According to section 3.2.1 internal clock setup in SD Host Controller Simplified Specifications 4.20, the timeout of loop for checking internal clock stable is defined as 150ms. Signed-off-by: Ben Chuang Co-developed-by: Michael K Johnson Signed-off-by: Michael K Johnson ---

[PATCH V5 0/4] Add Genesys Logic GL975x support

2019-08-19 Thread Ben Chuang
From: Ben Chuang The patches modify internal clock setup to match SD Host Controller Simplified Specifications 4.20 and support Genesys Logic GL9750/ GL9755 support. V5: - add "change timeout of loop .." to a patch - fix typo "verndor" to "vendor" V4: - change name from sdhci_gli_reset to

Re: [PATCH 1/4] kprobes: adjust kprobe addr for KPROBES_ON_FTRACE

2019-08-19 Thread Jisheng Zhang
On Tue, 20 Aug 2019 09:01:30 +0900 Masami Hiramatsu wrote: > > Hi Jisheng, Hi, > > On Mon, 19 Aug 2019 11:36:09 + > Jisheng Zhang wrote: > > > For KPROBES_ON_FTRACE case, we need to adjust the kprobe's addr > > correspondingly. > > No, I think you have misunderstood what the

Re: [PATCH 3/4] kprobes: move kprobe_ftrace_handler() from x86 and make it weak

2019-08-19 Thread Jisheng Zhang
On Tue, 20 Aug 2019 09:07:35 +0900 Masami Hiramatsu wrote: > > > Hi Jisheng, Hi, > > On Mon, 19 Aug 2019 11:37:32 + > Jisheng Zhang wrote: > > > This code could be reused. So move it from x86 to common code. > > Yes, it can be among some arch, but at first, please make your >

Re: linux-next: Tree for Aug 19 (amdgpu #2)

2019-08-19 Thread Randy Dunlap
On 8/19/19 2:18 AM, Stephen Rothwell wrote: > Hi all, > > Changes since 20190816: > on x86_64: ERROR: "dm_ip_block" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! Full randconfig file is attached. -- ~Randy # # Automatically generated file; DO NOT EDIT. # Linux/x86_64 5.3.0-rc5 Kernel

[PATCH] clk: imx: imx8mn: fix audio pll setting

2019-08-19 Thread Peng Fan
From: Peng Fan The AUDIO PLL max support 650M, so the original clk settings violate spec. This patch makes the output 786432000 -> 393216000, and 722534400 -> 361267200 to aligned with NXP vendor kernel without any impact on audio functionality and go within 650MHz PLL limit. Signed-off-by:

[PATCH v3 02/12] x86/hyper-v: Implement hv_is_hibernation_supported()

2019-08-19 Thread Dexuan Cui
When a Linux VM runs on Hyper-V and hibernates, it must disable the memory hot-add/remove and balloon up/down capabilities in the hv_balloon driver. By default, Hyper-V does not enable the virtual ACPI S4 state for a VM; on recent Hyper-V hosts, the administrator is able to enable the virtual

[PATCH v3 04/12] Drivers: hv: vmbus: Break out synic enable and disable operations

2019-08-19 Thread Dexuan Cui
Break out synic enable and disable operations into separate hv_synic_disable_regs() and hv_synic_enable_regs() functions for use by a later patch to support hibernation. There is no functional change except the unnecessary check "if (sctrl.enable != 1) return -EFAULT;" which is removed, because

[PATCH v3 01/12] x86/hyper-v: Suspend/resume the hypercall page for hibernation

2019-08-19 Thread Dexuan Cui
This is needed for hibernation, e.g. when we resume the old kernel, we need to disable the "current" kernel's hypercall page and then resume the old kernel's. Signed-off-by: Dexuan Cui Reviewed-by: Michael Kelley --- arch/x86/hyperv/hv_init.c | 34 ++ 1 file

[PATCH v3 08/12] Drivers: hv: vmbus: Ignore the offers when resuming from hibernation

2019-08-19 Thread Dexuan Cui
When the VM resumes, the host re-sends the offers. We should not add the offers to the global vmbus_connection.chn_list again. This patch assumes the RELIDs of the channels don't change across hibernation. Actually this is not always true, especially in the case of NIC SR-IOV the VF vmbus

Re: linux-next: Fixes tag needs some work in the scsi-mkp tree

2019-08-19 Thread Martin K. Petersen
Stephen, > In commit > > cff1191553d9 ("scsi: qla2xxx: cleanup trace buffer initialization") > > Fixes tag > > Fixes: ad0a0b01f088 ("scsi: qla2xxx: Fix Firmware dump size for Extended > > has these problem(s): > > - Subject has leading but no trailing parentheses > - Subject has leading

[PATCH v3 05/12] Drivers: hv: vmbus: Suspend/resume the synic for hibernation

2019-08-19 Thread Dexuan Cui
This is needed when we resume the old kernel from the "current" kernel. Note: when hv_synic_suspend() and hv_synic_resume() run, all the non-boot CPUs have been offlined, and interrupts are disabled on CPU0. Signed-off-by: Dexuan Cui Reviewed-by: Michael Kelley --- drivers/hv/vmbus_drv.c | 46

[PATCH v3 11/12] Drivers: hv: vmbus: Suspend after cleaning up hv_sock and sub channels

2019-08-19 Thread Dexuan Cui
Before suspend, Linux must make sure all the hv_sock channels have been properly cleaned up, because a hv_sock connection can not persist across hibernation, and the user-space app must be properly notified of the state change of the connection. Before suspend, Linux also must make sure all the

[PATCH v3 06/12] Drivers: hv: vmbus: Add a helper function is_sub_channel()

2019-08-19 Thread Dexuan Cui
The existing method of telling if a channel is sub-channel in vmbus_process_offer() is cumbersome. This new simple helper function is preferred in future. Signed-off-by: Dexuan Cui --- include/linux/hyperv.h | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git

[PATCH v3 12/12] Drivers: hv: vmbus: Resume after fixing up old primary channels

2019-08-19 Thread Dexuan Cui
When the host re-offers the primary channels upon resume, the host only guarantees the Instance GUID doesn't change, so vmbus_bus_suspend() should invalidate channel->offermsg.child_relid and figure out the number of primary channels that need to be fixed up upon resume. Upon resume,

[PATCH v3 07/12] Drivers: hv: vmbus: Implement suspend/resume for VSC drivers for hibernation

2019-08-19 Thread Dexuan Cui
The high-level VSC drivers will implement device-specific callbacks. Signed-off-by: Dexuan Cui Reviewed-by: Michael Kelley --- drivers/hv/vmbus_drv.c | 46 ++ include/linux/hyperv.h | 3 +++ 2 files changed, 49 insertions(+) diff --git

[PATCH v3 10/12] Drivers: hv: vmbus: Clean up hv_sock channels by force upon suspend

2019-08-19 Thread Dexuan Cui
Fake RESCIND_CHANNEL messages to clean up hv_sock channels by force for hibernation. There is no better method to clean up the channels since some of the channels may still be referenced by the userspace apps when hiberantin is triggered: in this case, the "rescind" fields of the channels are set,

[PATCH v3 09/12] Drivers: hv: vmbus: Suspend/resume the vmbus itself for hibernation

2019-08-19 Thread Dexuan Cui
Before Linux enters hibernation, it sends the CHANNELMSG_UNLOAD message to the host so all the offers are gone. After hibernation, Linux needs to re-negotiate with the host using the same vmbus protocol version (which was in use before hibernation), and ask the host to re-offer the vmbus devices.

[PATCH v3 03/12] clocksource/drivers: Suspend/resume Hyper-V clocksource for hibernation

2019-08-19 Thread Dexuan Cui
This is needed for hibernation, e.g. when we resume the old kernel, we need to disable the "current" kernel's TSC page and then resume the old kernel's. Signed-off-by: Dexuan Cui Reviewed-by: Michael Kelley --- drivers/clocksource/hyperv_timer.c | 25 + 1 file changed,

Re: [PATCH 1/4] kprobes: adjust kprobe addr for KPROBES_ON_FTRACE

2019-08-19 Thread Jisheng Zhang
On Mon, 19 Aug 2019 22:13:02 +0530 "Naveen N. Rao" wrote: > CAUTION: Email originated externally, do not click links or open attachments > unless you recognize the sender and know the content is safe. > > > Jisheng Zhang wrote: > > For KPROBES_ON_FTRACE case, we need to adjust the kprobe's

[PATCH v3 00/12] Enhance the hv_vmbus driver to support hibernation

2019-08-19 Thread Dexuan Cui
Hi all, The patchset is to enhance hv_vmbus to support hibernation when Linux VM runs on Hyper-V. A second patchset to enhance the high-level VSC drivers (hv_netvsc, hv_storvsc, etc.) for hibernation will be posted after this patchset is acceped. If you want to test this hibernation feaure, all

Re: [PATCH v10 2/7] powerpc/mce: Fix MCE handling for huge pages

2019-08-19 Thread Santosh Sivaraj
Hi Nick, Nicholas Piggin writes: > Santosh Sivaraj's on August 15, 2019 10:39 am: >> From: Balbir Singh >> >> The current code would fail on huge pages addresses, since the shift would >> be incorrect. Use the correct page shift value returned by >> __find_linux_pte() to get the correct

Re: [PATCH 2/4] memremap: remove the dev field in struct dev_pagemap

2019-08-19 Thread Dan Williams
On Sun, Aug 18, 2019 at 2:12 AM Christoph Hellwig wrote: > > The dev field in struct dev_pagemap is only used to print dev_name in > two places, which are at best nice to have. Just remove the field > and thus the name in those two messages. > > Signed-off-by: Christoph Hellwig > Reviewed-by:

[PATCH v4 7/10] arm64: dts: mt7622: add a property "num-pwms" for PWM node

2019-08-19 Thread Sam Shih
From: Ryder Lee This adds a property "num-pwms" for PWM controller. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih --- arch/arm64/boot/dts/mediatek/mt7622.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi

[PATCH v4 8/10] arm: dts: mt7623: add a property "num-pwms" for PWM node

2019-08-19 Thread Sam Shih
From: Ryder Lee This adds a property "num-pwms" for PWM controller. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih --- arch/arm/boot/dts/mt7623.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/mt7623.dtsi b/arch/arm/boot/dts/mt7623.dtsi index

[PATCH v4 10/10] arm: dts: mediatek: add mt7629 pwm support

2019-08-19 Thread Sam Shih
From: sam shih This adds pwm support for MT7629. Signed-off-by: Sam Shih --- arch/arm/boot/dts/mt7629.dtsi | 16 1 file changed, 16 insertions(+) diff --git a/arch/arm/boot/dts/mt7629.dtsi b/arch/arm/boot/dts/mt7629.dtsi index 9608bc2ccb3f..493be9a9453b 100644 ---

[PATCH v4 9/10] dt-bindings: pwm: update bindings for MT7629 SoC

2019-08-19 Thread Sam Shih
From: Ryder Lee This updates bindings for MT7629 pwm controller. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Reviewed-by: Matthias Brugger --- Documentation/devicetree/bindings/pwm/pwm-mediatek.txt | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH v4 5/10] dt-bindings: pwm: add a property "num-pwms"

2019-08-19 Thread Sam Shih
From: Ryder Lee This adds a property "num-pwms" in example so that we could specify the number of PWM channels via device tree. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih Reviewed-by: Matthias Brugger --- Documentation/devicetree/bindings/pwm/pwm-mediatek.txt | 7 --- 1 file

[PATCH v4 6/10] dt-bindings: pwm: update bindings for MT7628 SoC

2019-08-19 Thread Sam Shih
From: sam shih This updates bindings for MT7628 pwm controller. Signed-off-by: Sam Shih --- Documentation/devicetree/bindings/pwm/pwm-mediatek.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt

[PATCH v4 4/10] pwm: mediatek: use pwm_mediatek as common prefix

2019-08-19 Thread Sam Shih
From: sam shih Use pwm_mediatek as common prefix to match the filename. No functional change intended. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih --- drivers/pwm/pwm-mediatek.c | 117 ++--- 1 file changed, 58 insertions(+), 59 deletions(-) diff --git

[PATCH v4 3/10] pwm: mediatek: allocate the clks array dynamically and fix mt7628 pwm

2019-08-19 Thread Sam Shih
From: Ryder Lee Instead of using fixed size of arrays, allocate the memory for them based on the information we get from the chips. Also fix mt7628 pwm during configure from userspace. The SoC is legacy MIPS and has no complex clock tree. This patch add property clock-frequency to the SoC

[PATCH v4 2/10] pwm: mediatek: droping the check for of_device_get_match_data

2019-08-19 Thread Sam Shih
From: sam shih This patch drop the check for of_device_get_match_data. Due to the only way call driver probe is compatible match, In this case, the platform data should never be NULL. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih --- Used: https://patchwork.kernel.org/patch/11096905/

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

2019-08-19 Thread Sean Christopherson
On Mon, Aug 19, 2019 at 06:34:07PM -0700, Andy Lutomirski wrote: > On Mon, Aug 19, 2019 at 3:01 PM Sean Christopherson > wrote: > > > > On Thu, Aug 15, 2019 at 05:47:12PM -0700, Andy Lutomirski wrote: > > > > > > > > > >> On Jul 29, 2019, at 7:49 PM, Sean Christopherson > > > >> wrote: > > > >>

[PATCH v4 1/10] pwm: mediatek: add a property "num-pwms"

2019-08-19 Thread Sam Shih
From: Ryder Lee This adds a property "num-pwms" to avoid having an endless list of compatibles with no differences for the same driver. Signed-off-by: Ryder Lee Signed-off-by: Sam Shih --- Used: https://patchwork.kernel.org/project/linux-mediatek/list/?series=68207 Changes since v4: Follow

[PATCH v4 0/10] Add mt7629 and fix mt7628 pwm

2019-08-19 Thread Sam Shih
From: sam shih Changes since v4: - Follow reviewer's comments (v3: pwm: mediatek: add a property "num-pwms") Move the changes of droping the check for of_device_get_match_data returning non-NULL to next patch - Follow reviewers's comments (v3: pwm: mediatek: allocate the clks array

Re: [RFC v2] rcu/tree: Try to invoke_rcu_core() if in_irq() during unlock

2019-08-19 Thread Joel Fernandes
On Mon, Aug 19, 2019 at 07:14:38PM -0500, Scott Wood wrote: > On Sun, 2019-08-18 at 17:49 -0400, Joel Fernandes (Google) wrote: > > When we're in hard interrupt context in rcu_read_unlock_special(), we > > can still benefit from invoke_rcu_core() doing wake ups of rcuc > > threads when the

Re: [PATCH net-next 1/1] fec: add C45 MDIO read/write support

2019-08-19 Thread David Miller
From: Marco Hartmann Date: Mon, 19 Aug 2019 17:11:14 + > @@ -1767,7 +1770,7 @@ static int fec_enet_mdio_read(struct mii_bus *bus, int > mii_id, int regnum) > struct fec_enet_private *fep = bus->priv; > struct device *dev = >pdev->dev; > unsigned long time_left; > - int

Re: linux-next: Tree for Aug 19 (amdgpu)

2019-08-19 Thread Randy Dunlap
On 8/19/19 2:18 AM, Stephen Rothwell wrote: > Hi all, > > Changes since 20190816: > on x86_64: ../drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c: In function ‘amdgpu_exit’: ../drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:1471:2: error: implicit declaration of function ‘mmu_notifier_synchronize’; did you

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

2019-08-19 Thread Andy Lutomirski
On Mon, Aug 19, 2019 at 3:01 PM Sean Christopherson wrote: > > On Thu, Aug 15, 2019 at 05:47:12PM -0700, Andy Lutomirski wrote: > > > > > > >> On Jul 29, 2019, at 7:49 PM, Sean Christopherson > > >> wrote: > > >> > > >> On Sat, Jul 27, 2019 at 10:38:03AM -0700, Andy Lutomirski wrote: > > >> On

Re: pull-request: wireless-drivers-next 2019-08-19

2019-08-19 Thread David Miller
From: Kalle Valo Date: Mon, 19 Aug 2019 19:28:28 +0300 > here's a pull request to net-next for v5.4, more info below. Please let > me know if there are any problems. Pulled, thanks Kalle.

Re: [PATCH] Partially revert "mm/memcontrol.c: keep local VM counters in sync with the hierarchical ones"

2019-08-19 Thread Yafang Shao
On Tue, Aug 20, 2019 at 5:20 AM Roman Gushchin wrote: > > On Sun, Aug 18, 2019 at 08:30:15AM +0800, Yafang Shao wrote: > > On Sun, Aug 18, 2019 at 3:14 AM Roman Gushchin wrote: > > > > > > On Sat, Aug 17, 2019 at 11:33:57AM +0800, Yafang Shao wrote: > > > > On Sat, Aug 17, 2019 at 8:47 AM Roman

[PATCH -next] nfsd: remove duplicated include from filecache.c

2019-08-19 Thread YueHaibing
Remove duplicated include. Signed-off-by: YueHaibing --- fs/nfsd/filecache.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c index 4759fdc8a07e..07939f4834e8 100644 --- a/fs/nfsd/filecache.c +++ b/fs/nfsd/filecache.c @@ -6,7 +6,6 @@ #include

Re: [PATCH 1/4] resource: add a not device managed request_free_mem_region variant

2019-08-19 Thread Dan Williams
On Sun, Aug 18, 2019 at 2:10 AM Christoph Hellwig wrote: > > Factor out the guts of devm_request_free_mem_region so that we can > implement both a device managed and a manually release version as > tiny wrappers around it. > > Signed-off-by: Christoph Hellwig > Reviewed-by: Ira Weiny > --- >

Re: [PATCH 3/3] firmware: add mutex fw_lock_fallback for race condition

2019-08-19 Thread Luis Chamberlain
On Mon, Aug 19, 2019 at 09:19:51AM -0700, Scott Branden wrote: > To be honest, I find the entire firmware code sloppy. And that is after years of cleanup on my part. Try going back to v4.1 for instance, check the code out then for an incredible horrific sight :) > I don't think the

Re: [PATCH v3 bpf-next 1/4] tracing/probe: Add PERF_EVENT_IOC_QUERY_PROBE ioctl

2019-08-19 Thread Alexei Starovoitov
On Fri, Aug 16, 2019 at 3:33 PM Daniel Xu wrote: > > It's useful to know [uk]probe's nmissed and nhit stats. For example with > tracing tools, it's important to know when events may have been lost. > debugfs currently exposes a control file to get this information, but > it is not compatible with

Re: [RFC PATCH v2 00/19] RDMA/FS DAX truncate proposal V1,000,002 ;-)

2019-08-19 Thread Dave Chinner
On Mon, Aug 19, 2019 at 05:05:53PM -0700, John Hubbard wrote: > On 8/19/19 2:24 AM, Dave Chinner wrote: > > On Mon, Aug 19, 2019 at 08:34:12AM +0200, Jan Kara wrote: > > > On Sat 17-08-19 12:26:03, Dave Chinner wrote: > > > > On Fri, Aug 16, 2019 at 12:05:28PM -0700, Ira Weiny wrote: > > > > > On

general protection fault in xsk_poll

2019-08-19 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:da657043 Add linux-next specific files for 20190819 git tree: linux-next console output: https://syzkaller.appspot.com/x/log.txt?x=16af124c60 kernel config: https://syzkaller.appspot.com/x/.config?x=739a9b3ab3d8c770

Re: [PATCH] Kconfig: Fix the reference to the IDT77105 Phy driver in the description of ATM_NICSTAR_USE_IDT77105

2019-08-19 Thread David Miller
From: Christophe JAILLET Date: Mon, 19 Aug 2019 07:04:25 +0200 > This should be IDT77105, not IDT77015. > > Signed-off-by: Christophe JAILLET Applied.

Re: [PATCH net-next] r8152: fix accessing skb after napi_gro_receive

2019-08-19 Thread David Miller
From: Hayes Wang Date: Mon, 19 Aug 2019 11:15:19 +0800 > Fix accessing skb after napi_gro_receive which is caused by > commit 47922fcde536 ("r8152: support skb_add_rx_frag"). > > Fixes: 47922fcde536 ("r8152: support skb_add_rx_frag") > Signed-off-by: Hayes Wang Applied, thanks.

Re: [RFC PATCH v2 00/19] RDMA/FS DAX truncate proposal V1,000,002 ;-)

2019-08-19 Thread Dave Chinner
On Mon, Aug 19, 2019 at 09:38:41AM -0300, Jason Gunthorpe wrote: > On Mon, Aug 19, 2019 at 07:24:09PM +1000, Dave Chinner wrote: > > > So that leaves just the normal close() syscall exit case, where the > > application has full control of the order in which resources are > > released. We've

Re: [PATCH 1/2] perf cs-etm: Support sample flags 'insn' and 'insnlen'

2019-08-19 Thread Leo Yan
On Mon, Aug 19, 2019 at 03:50:54PM -0300, Arnaldo Carvalho de Melo wrote: > Em Mon, Aug 19, 2019 at 12:08:26PM -0600, Mathieu Poirier escreveu: > > On Thu, 15 Aug 2019 at 02:30, Leo Yan wrote: > > > > > > The synthetic branch and instruction samples are missed to set > > > instruction related

Re: [PATCH] sock: fix potential memory leak in proto_register()

2019-08-19 Thread David Miller
From: zhanglin Date: Mon, 19 Aug 2019 09:35:56 +0800 > If protocols registered exceeded PROTO_INUSE_NR, prot will be > added to proto_list, but no available bit left for prot in > proto_inuse_idx. > > Signed-off-by: zhanglin This won't build with CONFIG_PROC_FS disabled.

[PATCH 1/1] netfilter: nf_tables: fib: Drop IPV6 packages if IPv6 is disabled on boot

2019-08-19 Thread Leonardo Bras
If IPv6 is disabled on boot (ipv6.disable=1), but nft_fib_inet ends up dealing with a IPv6 package, it causes a kernel panic in fib6_node_lookup_1(), crashing in bad_page_fault. The panic is caused by trying to deference a very low address (0x38 in ppc64le), due to ipv6.fib6_main_tbl = NULL. BUG:

Re: [PATCH] erofs: move erofs out of staging

2019-08-19 Thread Qu Wenruo
[...] >>> I have made a simple fuzzer to inject messy in inode metadata, >>> dir data, compressed indexes and super block, >>> https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git/commit/?h=experimental-fuzzer >>> >>> I am testing with some given dirs and the following script. >>>

RE: [PATCH v5 1/6] vfio: Define device specific irq type capability

2019-08-19 Thread Zhang, Tina
> -Original Message- > From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Saturday, August 17, 2019 4:52 AM > To: Zhang, Tina > Cc: intel-gvt-...@lists.freedesktop.org; kra...@redhat.com; > k...@vger.kernel.org; linux-kernel@vger.kernel.org; Yuan, Hang > ; Lv, Zhiyuan ;

[v2 PATCH] RISC-V: Optimize tlb flush path.

2019-08-19 Thread Atish Patra
In RISC-V, tlb flush happens via SBI which is expensive. If the target cpumask contains a local hartid, some cost can be saved by issuing a local tlb flush as we do that in OpenSBI anyways. There is also no need of SBI call if cpumask is empty. Do a local flush first if current cpu is present in

[PREEMPT_RT PATCH 0/3] i915 fixups for lockdep/lockdebugging

2019-08-19 Thread Clark Williams
From: Clark Williams The i915 driver was throwing splats on my home test box running v5.2-rt3 when I turned on lockdep and lock debugging configs. This was mainly due to the non-side effects of the spin*_irq*() macros which do nothing to IRQs on PREEMPT_RT. Converting the various irq_lock

[PREEMPT_RT PATCH 2/3] i915: convert all irq_locks spinlocks to raw spinlocks

2019-08-19 Thread Clark Williams
From: Clark Williams The following structures contain a member named 'irq_lock'. These three locks are of type spinlock_t and are used in multiple contexts including atomic: struct drm_i915_private struct intel_breadcrumbs strict intel_guc Convert them all to be raw_spinlock_t so

[PREEMPT_RT PATCH 3/3] i915: convert uncore lock to raw spinlock

2019-08-19 Thread Clark Williams
From: Clark Williams The structure intel_uncore contains a spinlock member named 'lock' which is used in multiple contexts. Convert it to a raw spinlock so that lockdep and the lock debugging code will be happy. Signed-off-by: Clark Williams --- drivers/gpu/drm/i915/i915_gem.c | 4

[PREEMPT_RT PATCH 1/3] i915: do not call lockdep_assert_irqs_disabled() on PREEMPT_RT

2019-08-19 Thread Clark Williams
From: Clark Williams The 'breadcrumb' code in the i915 driver calls lockdep_assert_irqs_disabled() when starting some operations. This is valid on a stock kernel but on a PREEMPT_RT kernel the spin_lock_irq*() calls to not disable interrupts and likewise the spin_unlock_irq*() calls to not

Re: Bisected: Kernel 4.14 + has 3 times higher write IO latency than Kernel 4.4 with raid1

2019-08-19 Thread NeilBrown
On Fri, Aug 16 2019, Jinpu Wang wrote: > On Wed, Aug 7, 2019 at 2:35 PM Jinpu Wang wrote: >> >> On Wed, Aug 7, 2019 at 8:36 AM Jinpu Wang wrote: >> > >> > On Wed, Aug 7, 2019 at 1:40 AM NeilBrown wrote: >> > > >> > > On Tue, Aug 06 2019, Jinpu Wang wrote: >> > > >> > > > On Tue, Aug 6, 2019 at

[PATCH v2] net/ncsi: Ensure 32-bit boundary for data cksum

2019-08-19 Thread Terry S. Duncan
The NCSI spec indicates that if the data does not end on a 32 bit boundary, one to three padding bytes equal to 0x00 shall be present to align the checksum field to a 32-bit boundary. Signed-off-by: Terry S. Duncan --- net/ncsi/ncsi-cmd.c | 2 +- net/ncsi/ncsi-rsp.c | 9 ++--- 2 files

Re: [PATCH v1 05/10] powerpc/mm: Do early ioremaps from top to bottom on PPC64 too.

2019-08-19 Thread Michael Ellerman
Nicholas Piggin writes: > Christophe Leroy's on August 14, 2019 6:11 am: >> Until vmalloc system is up and running, ioremap basically >> allocates addresses at the border of the IOREMAP area. >> >> On PPC32, addresses are allocated down from the top of the area >> while on PPC64, addresses are

[PATCH V40 03/29] security: Add a static lockdown policy LSM

2019-08-19 Thread Matthew Garrett
While existing LSMs can be extended to handle lockdown policy, distributions generally want to be able to apply a straightforward static policy. This patch adds a simple LSM that can be configured to reject either integrity or all lockdown queries, and can be configured at runtime (through

[PATCH V40 14/29] ACPI: Limit access to custom_method when the kernel is locked down

2019-08-19 Thread Matthew Garrett
From: Matthew Garrett custom_method effectively allows arbitrary access to system memory, making it possible for an attacker to circumvent restrictions on module loading. Disable it if the kernel is locked down. Signed-off-by: Matthew Garrett Signed-off-by: David Howells Reviewed-by: Kees

[PATCH V40 27/29] tracefs: Restrict tracefs when the kernel is locked down

2019-08-19 Thread Matthew Garrett
Tracefs may release more information about the kernel than desirable, so restrict it when the kernel is locked down in confidentiality mode by preventing open(). (Fixed by Ben Hutchings to avoid a null dereference in default_file_open()) Signed-off-by: Matthew Garrett Reviewed-by: Steven

Re: [PATCH v6 08/19] PM / devfreq: tegra30: Ensure that target freq won't overflow

2019-08-19 Thread Chanwoo Choi
On 19. 8. 12. 오전 6:23, Dmitry Osipenko wrote: > We already had few integer overflow bugs, let's limit the freq for > consistency. > > Signed-off-by: Dmitry Osipenko > --- > drivers/devfreq/tegra30-devfreq.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

[PATCH V40 21/29] lockdown: Lock down /proc/kcore

2019-08-19 Thread Matthew Garrett
From: David Howells Disallow access to /proc/kcore when the kernel is locked down to prevent access to cryptographic data. This is limited to lockdown confidentiality mode and is still permitted in integrity mode. Signed-off-by: David Howells Signed-off-by: Matthew Garrett Reviewed-by: Kees

[PATCH V40 22/29] lockdown: Lock down tracing and perf kprobes when in confidentiality mode

2019-08-19 Thread Matthew Garrett
From: David Howells Disallow the creation of perf and ftrace kprobes when the kernel is locked down in confidentiality mode by preventing their registration. This prevents kprobes from being used to access kernel memory to steal crypto data, but continues to allow the use of kprobes from signed

[PATCH V40 29/29] lockdown: Print current->comm in restriction messages

2019-08-19 Thread Matthew Garrett
Print the content of current->comm in messages generated by lockdown to indicate a restriction that was hit. This makes it a bit easier to find out what caused the message. The message now patterned something like: Lockdown: : is restricted; see man kernel_lockdown.7 Signed-off-by:

[PATCH V40 20/29] x86/mmiotrace: Lock down the testmmiotrace module

2019-08-19 Thread Matthew Garrett
From: David Howells The testmmiotrace module shouldn't be permitted when the kernel is locked down as it can be used to arbitrarily read and write MMIO space. This is a runtime check rather than buildtime in order to allow configurations where the same kernel may be run in both locked down or

[PATCH V40 23/29] bpf: Restrict bpf when kernel lockdown is in confidentiality mode

2019-08-19 Thread Matthew Garrett
From: David Howells bpf_read() and bpf_read_str() could potentially be abused to (eg) allow private keys in kernel memory to be leaked. Disable them if the kernel has been locked down in confidentiality mode. Suggested-by: Alexei Starovoitov Signed-off-by: Matthew Garrett Reviewed-by: Kees

[PATCH V40 09/29] kexec_file: Restrict at runtime if the kernel is locked down

2019-08-19 Thread Matthew Garrett
From: Jiri Bohac When KEXEC_SIG is not enabled, kernel should not load images through kexec_file systemcall if the kernel is locked down. [Modified by David Howells to fit with modifications to the previous patch and to return -EPERM if the kernel is locked down for consistency with other

[PATCH V40 19/29] lockdown: Lock down module params that specify hardware parameters (eg. ioport)

2019-08-19 Thread Matthew Garrett
From: David Howells Provided an annotation for module parameters that specify hardware parameters (such as io ports, iomem addresses, irqs, dma channels, fixed dma buffers and other types). Suggested-by: Alan Cox Signed-off-by: David Howells Signed-off-by: Matthew Garrett Reviewed-by: Kees

[PATCH V40 26/29] debugfs: Restrict debugfs when the kernel is locked down

2019-08-19 Thread Matthew Garrett
From: David Howells Disallow opening of debugfs files that might be used to muck around when the kernel is locked down as various drivers give raw access to hardware through debugfs. Given the effort of auditing all 2000 or so files and manually fixing each one as necessary, I've chosen to

[PATCH V40 10/29] hibernate: Disable when the kernel is locked down

2019-08-19 Thread Matthew Garrett
From: Josh Boyer There is currently no way to verify the resume image when returning from hibernate. This might compromise the signed modules trust model, so until we can work with signed hibernate images we disable it when the kernel is locked down. Signed-off-by: Josh Boyer Signed-off-by:

[PATCH V40 24/29] lockdown: Lock down perf when in confidentiality mode

2019-08-19 Thread Matthew Garrett
From: David Howells Disallow the use of certain perf facilities that might allow userspace to access kernel data. Signed-off-by: David Howells Signed-off-by: Matthew Garrett Reviewed-by: Kees Cook Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Signed-off-by: James Morris

[PATCH V40 25/29] kexec: Allow kexec_file() with appropriate IMA policy when locked down

2019-08-19 Thread Matthew Garrett
Systems in lockdown mode should block the kexec of untrusted kernels. For x86 and ARM we can ensure that a kernel is trustworthy by validating a PE signature, but this isn't possible on other architectures. On those platforms we can use IMA digital signatures instead. Add a function to determine

[PATCH V40 18/29] lockdown: Lock down TIOCSSERIAL

2019-08-19 Thread Matthew Garrett
From: David Howells Lock down TIOCSSERIAL as that can be used to change the ioport and irq settings on a serial port. This only appears to be an issue for the serial drivers that use the core serial code. All other drivers seem to either ignore attempts to change port/irq or give an error.

[PATCH V40 17/29] lockdown: Prohibit PCMCIA CIS storage when the kernel is locked down

2019-08-19 Thread Matthew Garrett
From: David Howells Prohibit replacement of the PCMCIA Card Information Structure when the kernel is locked down. Suggested-by: Dominik Brodowski Signed-off-by: David Howells Signed-off-by: Matthew Garrett Reviewed-by: Kees Cook Signed-off-by: James Morris --- drivers/pcmcia/cistpl.c

[PATCH V40 16/29] acpi: Disable ACPI table override if the kernel is locked down

2019-08-19 Thread Matthew Garrett
From: Linn Crosetto >From the kernel documentation (initrd_table_override.txt): If the ACPI_INITRD_TABLE_OVERRIDE compile option is true, it is possible to override nearly any ACPI table provided by the BIOS with an instrumented, modified one. When lockdown is enabled, the kernel should

[PATCH V40 15/29] acpi: Ignore acpi_rsdp kernel param when the kernel has been locked down

2019-08-19 Thread Matthew Garrett
From: Josh Boyer This option allows userspace to pass the RSDP address to the kernel, which makes it possible for a user to modify the workings of hardware. Reject the option when the kernel is locked down. This requires some reworking of the existing RSDP command line logic, since the early

[PATCH V40 12/29] x86: Lock down IO port access when the kernel is locked down

2019-08-19 Thread Matthew Garrett
From: Matthew Garrett IO port access would permit users to gain access to PCI configuration registers, which in turn (on a lot of hardware) give access to MMIO register space. This would potentially permit root to trigger arbitrary DMA, so lock it down by default. This also implicitly locks

[PATCH V40 13/29] x86/msr: Restrict MSR access when the kernel is locked down

2019-08-19 Thread Matthew Garrett
From: Matthew Garrett Writing to MSRs should not be allowed if the kernel is locked down, since it could lead to execution of arbitrary code in kernel mode. Based on a patch by Kees Cook. Signed-off-by: Matthew Garrett Signed-off-by: David Howells Acked-by: Kees Cook Reviewed-by: Thomas

[PATCH V40 11/29] PCI: Lock down BAR access when the kernel is locked down

2019-08-19 Thread Matthew Garrett
From: Matthew Garrett Any hardware that can potentially generate DMA has to be locked down in order to avoid it being possible for an attacker to modify kernel code, allowing them to circumvent disabled module loading or module signing. Default to paranoid - in future we can potentially relax

[PATCH V40 01/29] security: Support early LSMs

2019-08-19 Thread Matthew Garrett
The lockdown module is intended to allow for kernels to be locked down early in boot - sufficiently early that we don't have the ability to kmalloc() yet. Add support for early initialisation of some LSMs, and then add them to the list of names when we do full initialisation later. Early LSMs are

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