Re: [PATCH v2 2/4] mm: add file_fdatawait_range and file_write_and_wait

2017-07-27 Thread Jeff Layton
On Thu, 2017-07-27 at 10:49 +0200, Jan Kara wrote: > On Wed 26-07-17 13:55:36, Jeff Layton wrote: > > +int file_write_and_wait(struct file *file) > > +{ > > + int err = 0, err2; > > + struct address_space *mapping = file->f_mapping; > > + > > + if ((!dax_mapping(mapping) && mapping->nrpages)

[PATCH] watchdog: dw_wdt: fix overflow issue in dw_wdt_top_in_seconds

2017-07-27 Thread Huibin Hong
If top is 15, (1 << (16 + top)) may be negative. Change-Id: I76e4a603a54f093e64a4b266008570e3afcdb35a Signed-off-by: Huibin Hong --- drivers/watchdog/dw_wdt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c index 6ea063

[PATCH v2 00/11] Add the internal phy support

2017-07-27 Thread David Wu
The rk3228 and rk3328 support internal phy inside, let's enable it to work. And the internal phy need to do some special setting, so register the rockchip internal phy driver. David Wu (11): net: phy: Add rockchip phy driver support multi_v7_defconfig: Make rockchip phy built-in arm64: defco

[PATCH v2 04/11] net: stmmac: dwmac-rk: Remove unwanted code for rk3328_set_to_rmii()

2017-07-27 Thread David Wu
This is wrong setting for rk3328_set_to_rmii(), so remove it. Signed-off-by: David Wu --- drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c index f0

Re: [PATCH] scsi: sg: only check for dxfer_len greater than 256M

2017-07-27 Thread Martin K. Petersen
Johannes, > Don't make any assumptions on the sg_io_hdr_t::dxfer_direction or the > sg_io_hdr_t::dxferp in order to determine if it is a valid > request. The only way we can check for bad requests is by checking if > the length exceeds 256M. Applied to 4.13/scsi-fixes. Thanks! -- Martin K. Pet

[PATCH v2 03/11] arm64: defconfig: Enable CONFIG_ROCKCHIP_PHY

2017-07-27 Thread David Wu
Make the rockchip phy driver built into the kernel. Signed-off-by: David Wu --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 6c7d147..925bd478 100644 --- a/arch/arm64/configs/defconfig +++ b/arc

[PATCH v2 02/11] multi_v7_defconfig: Make rockchip phy built-in

2017-07-27 Thread David Wu
Enable the rockchip phy for multi_v7_defconfig builds. Signed-off-by: David Wu --- arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index 4d19c1b..94d7e71 100644 --- a/arch/arm/confi

RE: [Linux-ima-devel] [RFC PATCH 1/5] ima: extend clone() with IMA namespace support

2017-07-27 Thread
> -Original Message- > From: Mimi Zohar [mailto:zo...@linux.vnet.ibm.com] > Sent: terça-feira, 25 de julho de 2017 18:29 > To: Serge E. Hallyn > Cc: Mehmet Kayaalp ; Yuqiong Sun > ; containers foundation.org>; linux-kernel ; David Safford > ; James Bottomley > ; linux-security-module s

[PATCH v2 01/11] net: phy: Add rockchip phy driver support

2017-07-27 Thread David Wu
Support internal ephy currently. Signed-off-by: David Wu --- changes in v2: - Alphabetic order for Kconfig and Makefile. - Add analog register init. - Disable auto-mdix for workround. - Rename config drivers/net/phy/Kconfig| 5 ++ drivers/net/phy/Makefile | 1 + drivers/net/phy/ro

[PATCH] Input: elan_i2c - Add antoher Lenovo ACPI ID for Yoga310 Add ELAN0602 in ACPI mapping table to support Yoga310's ELAN touchpad Signed-off-by: KT Liao

2017-07-27 Thread KT Liao
--- drivers/input/mouse/elan_i2c_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/input/mouse/elan_i2c_core.c b/drivers/input/mouse/elan_i2c_core.c index 3b616cb..88fc0f8 100644 --- a/drivers/input/mouse/elan_i2c_core.c +++ b/drivers/input/mouse/elan_i2c_core.c @@ -1247,6 +1247,

Re: [PATCH tip/core/rcu 4/5] sys_membarrier: Add expedited option

2017-07-27 Thread Paul E. McKenney
On Thu, Jul 27, 2017 at 12:14:26PM +0200, Peter Zijlstra wrote: > On Tue, Jul 25, 2017 at 12:36:12PM -0700, Paul E. McKenney wrote: > > This horse is already out, so trying to shut the gate won't be effective. > > So I'm not convinced it is. The mprotect() hack isn't portable as we've > establishe

[PATCH v2 07/11] net: stmmac: dwmac-rk: Add internal phy supprot for rk3328

2017-07-27 Thread David Wu
There are two mac controllers in the rk3328, the one connects to external phy, and the other one connects to internal phy. Like the mac of external phy, the internal phy's mac also needs to configure the related mac registers at GRF. Signed-off-by: David Wu --- drivers/net/ethernet/stmicro/stmma

[PATCH v2 06/11] net: stmmac: dwmac-rk: Add internal phy support for rk3228

2017-07-27 Thread David Wu
There is only one mac controller in rk3228, which could connect to external phy or internal phy, use the grf_com_mux bit15 to route external/internal phy. Signed-off-by: David Wu --- drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 12 1 file changed, 12 insertions(+) diff --git a/

[PATCH v2 08/11] ARM: dts: rk322x: Add support internal phy for gmac

2017-07-27 Thread David Wu
This patch adds internal mac phy clock and internal mac phy reset for rk gmac using. Signed-off-by: David Wu --- arch/arm/boot/dts/rk322x.dtsi | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/rk322x.dtsi b/arch/arm/boot/dts/rk322x.dtsi index f3e4ffd..

Re: [PATCH 1/1] mm/hugetlb: Make huge_pte_offset() consistent and document behaviour

2017-07-27 Thread Punit Agrawal
Mike Kravetz writes: > On 07/26/2017 06:34 AM, Punit Agrawal wrote: >> Michal Hocko writes: >> >>> On Wed 26-07-17 14:33:57, Michal Hocko wrote: On Wed 26-07-17 13:11:46, Punit Agrawal wrote: >>> [...] > I've been running tests from mce-test suite and libhugetlbfs for similar > cha

Re: [PATCH 0/3] Add larbid init routine for mediatek's gen1 smi larb driver

2017-07-27 Thread Joerg Roedel
On Thu, Jul 27, 2017 at 10:01:09AM +0800, honghui.zh...@mediatek.com wrote: > From: Honghui Zhang > > Mediatek's gen1 smi need the hardware larbid to identify the offset for > the register which controls whether enable iommu for this larb. > In the commit 3c8f4ad85c4b ("memory/mediatek: add suppo

[PATCH v2 09/11] ARM: dts: rk3228-evb: Enable the internal phy for gmac

2017-07-27 Thread David Wu
This patch enables the internal phy for rk3228 evb board by default. To use the external 1000M phy on evb board, need to make some switch of evb board to be on. Signed-off-by: David Wu --- arch/arm/boot/dts/rk3228-evb.dts | 19 +++ 1 file changed, 19 insertions(+) diff --git a/a

[PATCH v2 05/11] net: stmmac: dwmac-rk: Add internal phy support

2017-07-27 Thread David Wu
To make internal phy work, need to configure the phy_clock, phy cru_reset and related registers. Signed-off-by: David Wu --- changes in v2: - Use the standard "phy-mode" property for internal phy. (Florian) - Move the internal macphy clock to the optional properties. (Heiko) .../devicetree/bi

[PATCH v2 10/11] ARM64: dts: rockchip: Add gmac2phy node support for rk3328

2017-07-27 Thread David Wu
The gmac2phy controller of rk3328 is connected to internal phy directly inside, add the node for the internal phy support. Signed-off-by: David Wu --- arch/arm64/boot/dts/rockchip/rk3328.dtsi | 24 1 file changed, 24 insertions(+) diff --git a/arch/arm64/boot/dts/rockch

[PATCH 1/2] mm, memcg: reset memory.low during memcg offlining

2017-07-27 Thread Roman Gushchin
A removed memory cgroup with a defined memory.low and some belonging pagecache has very low chances to be freed. If a cgroup has been removed, there is likely no memory pressure inside the cgroup, and the pagecache is protected from the external pressure by the defined low limit. The cgroup will b

[PATCH 2/2] cgroup: revert fa06235b8eb0 ("cgroup: reset css on destruction")

2017-07-27 Thread Roman Gushchin
Commit fa06235b8eb0 ("cgroup: reset css on destruction") caused css_reset callback to be called from the offlining path. Although it solves the problem mentioned in the commit description ("For instance, memory cgroup needs to reset memory.low, otherwise pages charged to a dead cgroup might never g

Re: [PATCH] scsi: sg: only check for dxfer_len greater than 256M

2017-07-27 Thread Jason L Tibbitts III
> "MKP" == Martin K Petersen writes: MKP> Applied to 4.13/scsi-fixes. Thanks! My thanks as well to everyone who helped in getting this fixed. - J<

[PATCH v2 11/11] ARM64: dts: rockchip: Enable gmac2phy for rk3328-evb

2017-07-27 Thread David Wu
Enable the gmac2phy, make the gmac2phy work on the rk3328-evb board. Signed-off-by: David Wu --- arch/arm64/boot/dts/rockchip/rk3328-evb.dts | 17 + 1 file changed, 17 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3328-evb.dts b/arch/arm64/boot/dts/rockchip/rk3328-e

Re: [PATCH tip/core/rcu 4/5] sys_membarrier: Add expedited option

2017-07-27 Thread Paul E. McKenney
On Thu, Jul 27, 2017 at 10:30:03AM +0200, Peter Zijlstra wrote: > On Wed, Jul 26, 2017 at 08:41:10AM -0700, Paul E. McKenney wrote: > > On Wed, Jul 26, 2017 at 09:41:28AM +0200, Peter Zijlstra wrote: > > > On Tue, Jul 25, 2017 at 04:59:36PM -0700, Paul E. McKenney wrote: > > > > Sure, but SCHED_OT

Re: [RFC PATCH 0/8] EDAC, mce_amd: Add a tracepoint for the decoded error

2017-07-27 Thread Borislav Petkov
On Thu, Jul 27, 2017 at 10:39:27AM +0200, Ingo Molnar wrote: > I don't think so: we routinely log several KB per event worth of call chains > via > perf tracing just fine. > > So I'd suggest logging more than less, and making it more verbose is > definitely > the way to go. No no, you're miss

[PATCH 1/2] clk: meson: gxbb: fix meson cts_amclk divider flags

2017-07-27 Thread Jerome Brunet
CLK_DIVIDER_ROUND_CLOSEST was incorrectly put in the hw.init flags while it should have been in the divider flags Fixes: 4087bd4b2170 ("clk: meson: gxbb: add cts_amclk") Signed-off-by: Jerome Brunet --- drivers/clk/meson/gxbb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH 0/2] clk: meson: gxbb: fix audio divider flags

2017-07-27 Thread Jerome Brunet
Two audio clocks incorrectly set divider flags in the hw.init flag. Just move these flags where they belong. Jerome Brunet (2): clk: meson: gxbb: fix meson cts_amclk divider flags clk: meson: gxbb: fix clk_mclk_i958 divider flags drivers/clk/meson/gxbb.c | 10 ++ 1 file changed, 6 in

[PATCH 2/2] clk: meson: gxbb: fix clk_mclk_i958 divider flags

2017-07-27 Thread Jerome Brunet
CLK_DIVIDER_ROUND_CLOSEST was incorrectly put in the hw.init flags while it should have been in the divider flags Fixes: 3c277c247eab ("clk: meson: gxbb: add cts_mclk_i958") Signed-off-by: Jerome Brunet --- drivers/clk/meson/gxbb.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) di

Re: [PATCH tip/core/rcu 4/5] sys_membarrier: Add expedited option

2017-07-27 Thread Paul E. McKenney
On Thu, Jul 27, 2017 at 10:53:12AM +0200, Peter Zijlstra wrote: > On Wed, Jul 26, 2017 at 06:01:15PM +, Mathieu Desnoyers wrote: > > > Another alternative for a MEMBARRIER_CMD_SHARED_EXPEDITED would be > > rate-limiting > > per thread. For instance, we could add a new "ulimit" that would boun

Re: [PATCH v8 1/3] perf: cavium: Support memory controller PMU counters

2017-07-27 Thread Borislav Petkov
On Thu, Jul 27, 2017 at 11:08:56AM +0200, Jan Glauber wrote: > OK. As fixing the firmware will take quite some time I'll go for the memory > controller driver that starts EDAC / PMU depending on their CONFIG_. > > What would be the proper location for the multiplexer? > drivers/soc/cavium or drive

Re: [PATCH] PM / runtime: Document new pm_runtime_set_suspended constraint

2017-07-27 Thread Ulf Hansson
On 24 July 2017 at 11:53, Johan Hovold wrote: > Since commit a8636c89648a ("PM / Runtime: Don't allow to suspend a > device with an active child") it is no longer permitted to set > RPM_SUSPENDED state for a device with active children unless > power.ignore_children is set. > > Update the document

[PATCH] KVM: nVMX: INVPCID support

2017-07-27 Thread Paolo Bonzini
Expose the "Enable INVPCID" secondary execution control to the guest and properly reflect the exit reason. In addition, before this patch the guest was always running with INVPCID enabled, causing pcid.flat's "Test on INVPCID when disabled" test to fail. Signed-off-by: Paolo Bonzini --- arch/x8

Re: [PATCH -tip v4] [BUGFIX] kprobes/x86: Do not jump-optimize kprobes on irq entry code

2017-07-27 Thread Masami Hiramatsu
On Thu, 27 Jul 2017 10:24:46 +0200 Ingo Molnar wrote: > > * Masami Hiramatsu wrote: > > > Since the kernel segment registers are not prepared at the > > entry of irq-entry code, if a kprobe on such code is > > jump-optimized, accessing per-cpu variables may cause > > kernel panic. > > However,

Re: [PATCH 02/37] binder: use group leader instead of open thread

2017-07-27 Thread Greg Kroah-Hartman
On Thu, Jul 27, 2017 at 02:38:30PM +0530, Amit Pundir wrote: > Hi, > > On 25 July 2017 at 14:43, Martijn Coenen wrote: > > Hi John, > > > > On Mon, Jul 24, 2017 at 11:07 PM, John Stultz > > wrote: > >> > >> 12-31 16:00:36.632 2518 2584 E hw-ProcessState: Using /dev/hwbinder > >> failed: unabl

Re: [PATCH net-next v2 06/10] net: dsa: lan9303: added sysfs node swe_bcst_throt

2017-07-27 Thread Andrew Lunn
> Yes, this setting can be used to reduce effect of broadcast storms. So one way to solve this is to teach the software bridge about broadcast storm control. Put some rate limiting into its broadcast flood handling. Then add a switchdev call which passes this down into the switch. Or look at doin

Re: [PATCH v7 16/26] x86/insn-eval: Support both signed 32-bit and 64-bit effective addresses

2017-07-27 Thread Borislav Petkov
On Tue, Jul 25, 2017 at 04:48:13PM -0700, Ricardo Neri wrote: > I meant to say the 4 most significant bytes. In this case, the > 64-address 0x1234 would lie in the kernel memory while > 0x1234 would correctly be in the user space memory. That explanation is better. > Yes, perhaps

Re: [PATCH v2 03/13] mpt3sas: SGL to PRP Translation for I/Os to NVMe devices

2017-07-27 Thread Martin K. Petersen
Suganath, > * Added support for translating the SGLs associated with incoming > commands either to IEE SGL or NVMe PRPs for NVMe devices. This all seems very convoluted. You should rely on the block layer infrastructure instead of doing all this slicing and dicing by hand. If the attached devic

Re: [PATCH net-next v2 07/10] net: dsa: lan9303: Added basic offloading of unicast traffic

2017-07-27 Thread Andrew Lunn
> >I think you are over-simplifying here. Say i have a layer 2 VPN and i > >bridge port 1 and the VPN? The software bridge still wants to do STP > >on port 1, in order to solve loops. > > > > Problem is that the mainline lan9303_separate_ports() does its > work by setting port 1 & 2 in STP BLOCKIN

Re: [PATCH net-next v2 06/10] net: dsa: lan9303: added sysfs node swe_bcst_throt

2017-07-27 Thread Jiri Pirko
Thu, Jul 27, 2017 at 03:26:25PM CEST, and...@lunn.ch wrote: >> Yes, this setting can be used to reduce effect of broadcast storms. > >So one way to solve this is to teach the software bridge about >broadcast storm control. Put some rate limiting into its broadcast >flood handling. Then add a switch

Re: [RFC Part1 PATCH v3 06/17] x86/mm: Use encrypted access of boot related data with SEV

2017-07-27 Thread Borislav Petkov
On Mon, Jul 24, 2017 at 02:07:46PM -0500, Brijesh Singh wrote: > From: Tom Lendacky > > When Secure Encrypted Virtualization (SEV) is active, boot data (such as > EFI related data, setup data) is encrypted and needs to be accessed as > such when mapped. Update the architecture override in early_m

Re: [PATCH v2] ARM: Convert to using %pOF instead of full_name

2017-07-27 Thread Simon Horman
On Fri, Jul 21, 2017 at 02:28:32PM -0500, Rob Herring wrote: > Now that we have a custom printf format specifier, convert users of > full_name to use %pOF instead. This is preparation to remove storing > of the full path string for each node. > > Signed-off-by: Rob Herring > Acked-by: Krzysztof K

Re: [lkp-robot] [x86/refcount] b631e535c6: WARNING:at_net/netlink/af_netlink.c:#netlink_sock_destruct

2017-07-27 Thread Hans Liljestrand
On Tue, Jul 25, 2017 at 11:38:30AM -0700, Kees Cook wrote: On Tue, Jul 25, 2017 at 3:43 AM, Hans Liljestrand wrote: On Mon, Jul 24, 2017 at 08:21:16PM -0700, Kees Cook wrote: On Mon, Jul 24, 2017 at 6:03 AM, Hans Liljestrand wrote: On Sun, Jul 23, 2017 at 08:52:53PM -0700, Kees Cook wrote:

Re: [PATCH 0/2] clk: meson: gxbb: fix audio divider flags

2017-07-27 Thread Neil Armstrong
On 07/27/2017 03:09 PM, Jerome Brunet wrote: > Two audio clocks incorrectly set divider flags in the hw.init flag. > Just move these flags where they belong. > > Jerome Brunet (2): > clk: meson: gxbb: fix meson cts_amclk divider flags > clk: meson: gxbb: fix clk_mclk_i958 divider flags > > d

Re: [PATCH tip/core/rcu 4/5] sys_membarrier: Add expedited option

2017-07-27 Thread Peter Zijlstra
On Thu, Jul 27, 2017 at 05:56:59AM -0700, Paul E. McKenney wrote: > On Thu, Jul 27, 2017 at 12:14:26PM +0200, Peter Zijlstra wrote: > > On Tue, Jul 25, 2017 at 12:36:12PM -0700, Paul E. McKenney wrote: > > > This horse is already out, so trying to shut the gate won't be effective. > > > > So I'm n

Re: [PATCH v2 01/11] net: phy: Add rockchip phy driver support

2017-07-27 Thread Andrew Lunn
> + /* > + * If mode switch happens from 10BT to 100BT, all DSP/AFE > + * registers are set to default values. So any AFE/DSP > + * registers have to be re-initialized in this case. > + */ Hi David Are they also lost on suspend and resume? Andrew

Re: [RFC Part1 PATCH v3 03/17] x86/mm: Secure Encrypted Virtualization (SEV) support

2017-07-27 Thread Borislav Petkov
On Wed, Jul 26, 2017 at 11:47:32AM -0500, Tom Lendacky wrote: > If it's made static then the sme_active()/sev_active() inline functions > would need to be turned into functions within the mem_encrypt.c file. So > there's a trade-off to do that, which is the better one? Simple: why do we have funct

Re: [PATCH 02/37] binder: use group leader instead of open thread

2017-07-27 Thread Martijn Coenen
Looks like this assignment somehow went missing in the upstream version: proc->vma_vm_mm = current->group_leader->mm; which probably causes us to bail out here in binder_update_page_range() because proc->vma_vm_mm is NULL: if (vma && mm != proc->vma_vm_mm) { pr_err("%d: v

Re: [PATCH 02/37] binder: use group leader instead of open thread

2017-07-27 Thread Amit Pundir
On 27 July 2017 at 18:53, Greg Kroah-Hartman wrote: > On Thu, Jul 27, 2017 at 02:38:30PM +0530, Amit Pundir wrote: >> Hi, >> >> On 25 July 2017 at 14:43, Martijn Coenen wrote: >> > Hi John, >> > >> > On Mon, Jul 24, 2017 at 11:07 PM, John Stultz >> > wrote: >> >> >> >> 12-31 16:00:36.632 2518

Re: [PATCH] drivers/rxe: improve rxe loopback

2017-07-27 Thread kbuild test robot
Hi Marcel, [auto build test ERROR on rdma/master] [also build test ERROR on v4.13-rc2 next-20170727] [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/Marcel-Apfelbaum/drivers-rxe-improve-rxe

[tip:irq/urgent] genirq/cpuhotplug: Revert "Set force affinity flag on hotplug migration"

2017-07-27 Thread tip-bot for Thomas Gleixner
Commit-ID: 8397913303abc9333f376a518a8368fa22ca5e6e Gitweb: http://git.kernel.org/tip/8397913303abc9333f376a518a8368fa22ca5e6e Author: Thomas Gleixner AuthorDate: Thu, 27 Jul 2017 12:21:11 +0200 Committer: Thomas Gleixner CommitDate: Thu, 27 Jul 2017 15:40:02 +0200 genirq/cpuhotplug: R

Re: [PATCH tip/core/rcu 4/5] sys_membarrier: Add expedited option

2017-07-27 Thread Peter Zijlstra
On Thu, Jul 27, 2017 at 06:08:16AM -0700, Paul E. McKenney wrote: > > No. Its called wakeup latency :-) Your SCHED_OTHER task will not get to > > insta-run all the time. If there are other tasks already running, we'll > > not IPI unless it should preempt. > > > > If its idle, nobody cares.. > >

Re: [PATCH v2 05/11] net: stmmac: dwmac-rk: Add internal phy support

2017-07-27 Thread Andrew Lunn
On Thu, Jul 27, 2017 at 09:02:16PM +0800, David Wu wrote: > To make internal phy work, need to configure the phy_clock, > phy cru_reset and related registers. > > Signed-off-by: David Wu > --- > changes in v2: > - Use the standard "phy-mode" property for internal phy. (Florian) I think we need

[PATCH v3] ARM: dts: stm32: change pinctrl bindings definition

2017-07-27 Thread Alexandre Torgue
Initially each pin was declared in "include/dt-bindings/stm32-pinfunc.h" and each definition contained SOC names (ex: STM32F429_PA9_FUNC_USART1_TX). Since this approach was approved, the number of supported MCU has increased (STM32F429/STM32F469/STM32f746/STM32H743). To avoid to add a new file in "

Re: [PATCH 2/2] cgroup: revert fa06235b8eb0 ("cgroup: reset css on destruction")

2017-07-27 Thread Tejun Heo
On Thu, Jul 27, 2017 at 02:04:28PM +0100, Roman Gushchin wrote: > Commit fa06235b8eb0 ("cgroup: reset css on destruction") caused > css_reset callback to be called from the offlining path. Although > it solves the problem mentioned in the commit description > ("For instance, memory cgroup needs to

Re: [PATCH v2] KVM: x86: Avoid guest page table walk when gpa_available is set

2017-07-27 Thread Paolo Bonzini
On 19/05/2017 17:12, Brijesh Singh wrote: > - vcpu_is_mmio_gpa(vcpu, addr, exception->address, write) && > (addr & ~PAGE_MASK) == (exception->address & ~PAGE_MASK)) { ^^ I think this should be vcpu->arch.gpa_val. Paolo > -

[PATCH] KVM: nVMX: do not pin the VMCS12

2017-07-27 Thread Paolo Bonzini
Since the current implementation of VMCS12 does a memcpy in and out of guest memory, we do not need current_vmcs12 and current_vmcs12_page anymore. current_vmptr is enough to read and write the VMCS12. Signed-off-by: Paolo Bonzini --- arch/x86/kvm/vmx.c | 23 ++- 1 file chan

Re: [PATCH tip/core/rcu 4/5] sys_membarrier: Add expedited option

2017-07-27 Thread Boqun Feng
Hi Paul, I have a side question out of curiosity: How does synchronize_sched() work properly for sys_membarrier()? sys_membarrier() requires every other CPU does a smp_mb() before it returns, and I know synchronize_sched() will wait until all CPUs running a kernel thread do a context-switch, whi

Re: [PATCH tip/core/rcu 4/5] sys_membarrier: Add expedited option

2017-07-27 Thread Peter Zijlstra
On Thu, Jul 27, 2017 at 06:08:16AM -0700, Paul E. McKenney wrote: > > So I think we need either switch_mm() or switch_to() to imply a full > > barrier for this to work, otherwise we get: > > > > CPU0 CPU1 > > > > > > lock rq->lock > > mb > > > > rq->curr =

Re: [PATCH v7 24/26] x86: Enable User-Mode Instruction Prevention

2017-07-27 Thread Borislav Petkov
On Tue, Jul 25, 2017 at 05:44:08PM -0700, Ricardo Neri wrote: > On Fri, 2017-06-09 at 18:10 +0200, Borislav Petkov wrote: > > On Fri, May 05, 2017 at 11:17:22AM -0700, Ricardo Neri wrote: > > > User_mode Instruction Prevention (UMIP) is enabled by setting/clearing a > > > bit in %cr4. > > > > > >

[PATCH stable 3.10] mm: memcontrol: factor out reclaim iterator loading and updating

2017-07-27 Thread Wenwei Tao
From: Johannes Weiner commit 519ebea3bf6df45439e79c54bda1d9e29fe13a64 upstream It turned out that this is actually a bug fix which prevents a double css_put on last_visited memcg which results in kernel BUG at kernel/cgroup.c:893! See http://lkml.kernel.org/r/20170726130742.5976-1-wenwei@gm

Re: [RFC v6 13/62] powerpc: track allocation status of all pkeys

2017-07-27 Thread Thiago Jung Bauermann
Hello Ram, I'm still going through the patches and haven't formed a full picture of the feature in my mind yet, so my comments today won't be particularly insightful... But hopefully the comments that I currently have will be helpful anyway. Ram Pai writes: > diff --git a/arch/powerpc/include/

Re: [PATCH 2/2] mm: replace TIF_MEMDIE checks by tsk_is_oom_victim

2017-07-27 Thread Tetsuo Handa
Michal Hocko wrote: > diff --git a/mm/memcontrol.c b/mm/memcontrol.c > index 544d47e5cbbd..86a48affb938 100644 > --- a/mm/memcontrol.c > +++ b/mm/memcontrol.c > @@ -1896,7 +1896,7 @@ static int try_charge(struct mem_cgroup *memcg, gfp_t > gfp_mask, >* bypass the last charges so that they c

Re: blk_mq_sched_insert_request: inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage

2017-07-27 Thread Jens Axboe
On 07/26/2017 11:10 PM, Michael Ellerman wrote: > Hi Jens, > > I'm seeing the lockdep warning below on shutdown on a Power8 machine > using IPR. > > If I'm reading it right it looks like the spin_lock() (non-irq) in > blk_mq_sched_insert_request() is the immediate cause. All the users of ctx->lo

Re: [PATCH net-next v2 07/10] net: dsa: lan9303: Added basic offloading of unicast traffic

2017-07-27 Thread Egil Hjelmeland
On 27. juli 2017 15:31, Andrew Lunn wrote: I think you are over-simplifying here. Say i have a layer 2 VPN and i bridge port 1 and the VPN? The software bridge still wants to do STP on port 1, in order to solve loops. Problem is that the mainline lan9303_separate_ports() does its work by setti

Re: [PATCH 2/2] mm: replace TIF_MEMDIE checks by tsk_is_oom_victim

2017-07-27 Thread Tetsuo Handa
Tetsuo Handa wrote: > Michal Hocko wrote: > > diff --git a/mm/memcontrol.c b/mm/memcontrol.c > > index 544d47e5cbbd..86a48affb938 100644 > > --- a/mm/memcontrol.c > > +++ b/mm/memcontrol.c > > @@ -1896,7 +1896,7 @@ static int try_charge(struct mem_cgroup *memcg, gfp_t > > gfp_mask, > > * bypa

Re: [PATCH v1 1/2] x86/mm, kexec: Fix memory corruption with SME on successive kexecs

2017-07-27 Thread Tom Lendacky
On 7/27/2017 2:17 AM, Ingo Molnar wrote: * Tom Lendacky wrote: After issuing successive kexecs it was found that the SHA hash failed verification when booting the kexec'd kernel. When SME is enabled, the change from using pages that were marked encrypted to now being marked as not encrypted

Re: [RFC v6 17/62] powerpc: implementation for arch_set_user_pkey_access()

2017-07-27 Thread Thiago Jung Bauermann
Ram Pai writes: > @@ -113,10 +117,14 @@ static inline int arch_override_mprotect_pkey(struct > vm_area_struct *vma, > return 0; > } > > +extern int __arch_set_user_pkey_access(struct task_struct *tsk, int pkey, > + unsigned long init_val); > static inline int arch_set_user_pk

Re: [PATCH tip/core/rcu 4/5] sys_membarrier: Add expedited option

2017-07-27 Thread Paul E. McKenney
On Thu, Jul 27, 2017 at 09:55:51PM +0800, Boqun Feng wrote: > Hi Paul, > > I have a side question out of curiosity: > > How does synchronize_sched() work properly for sys_membarrier()? > > sys_membarrier() requires every other CPU does a smp_mb() before it > returns, and I know synchronize_sched

Re: [PATCH 2/2] mm: replace TIF_MEMDIE checks by tsk_is_oom_victim

2017-07-27 Thread Michal Hocko
On Thu 27-07-17 23:01:05, Tetsuo Handa wrote: > Michal Hocko wrote: > > diff --git a/mm/memcontrol.c b/mm/memcontrol.c > > index 544d47e5cbbd..86a48affb938 100644 > > --- a/mm/memcontrol.c > > +++ b/mm/memcontrol.c > > @@ -1896,7 +1896,7 @@ static int try_charge(struct mem_cgroup *memcg, gfp_t > >

Re: [PATCH] mm: memcontrol: Cast mismatched enum types passed to memcg state and event functions

2017-07-27 Thread Johannes Weiner
On Thu, Jul 27, 2017 at 09:24:51AM +0200, Michal Hocko wrote: > On Wed 26-07-17 15:03:32, Andrew Morton wrote: > > On Wed, 26 Jul 2017 14:49:14 -0700 Matthias Kaehlcke > > wrote: > > > > > El Wed, Jul 26, 2017 at 02:23:09PM -0700 Andrew Morton ha dit: > > > > > > > On Wed, 26 Jul 2017 12:23:56

Re: [PATCH v2 1/3] staging: ccree: Replace kzalloc with devm_kzalloc

2017-07-27 Thread Gilad Ben-Yossef
On Tue, Jul 18, 2017 at 1:58 PM, wrote: > From: Suniel Mahesh > > It is recommended to use managed function devm_kzalloc, which > simplifies driver cleanup paths and driver code. > This patch does the following: > (a) replace kzalloc with devm_kzalloc. > (b) drop kfree(), because memory allocate

[PATCH 2/3] staging: ccree: Convert to devm_ioremap_resource for map, unmap

2017-07-27 Thread Gilad Ben-Yossef
From: Suniel Mahesh It is recommended to use managed function devm_ioremap_resource(), which simplifies driver cleanup paths and driver code. This patch does the following: (a) replace request_mem_region(), ioremap() and corresponding error handling with devm_ioremap_resource(). (b) remove struct

[PATCH 1/3] staging: ccree: Replace kzalloc with devm_kzalloc

2017-07-27 Thread Gilad Ben-Yossef
From: Suniel Mahesh It is recommended to use managed function devm_kzalloc, which simplifies driver cleanup paths and driver code. This patch does the following: (a) replace kzalloc with devm_kzalloc. (b) drop kfree(), because memory allocated with devm_kzalloc() is automatically freed on driver

[PATCH 3/3] staging: ccree: Use platform_get_irq and devm_request_irq

2017-07-27 Thread Gilad Ben-Yossef
From: Suniel Mahesh It is recommended to use managed function devm_request_irq(), which simplifies driver cleanup paths and driver code. This patch does the following: (a) replace platform_get_resource(), request_irq() and corresponding error handling with platform_get_irq() and devm_request_irq(

Re: [PATCH tip/core/rcu 4/5] sys_membarrier: Add expedited option

2017-07-27 Thread Boqun Feng
On Thu, Jul 27, 2017 at 07:16:33AM -0700, Paul E. McKenney wrote: > On Thu, Jul 27, 2017 at 09:55:51PM +0800, Boqun Feng wrote: > > Hi Paul, > > > > I have a side question out of curiosity: > > > > How does synchronize_sched() work properly for sys_membarrier()? > > > > sys_membarrier() requires

Re: [PATCH 2/2] xen: dont fiddle with event channel masking in suspend/resume

2017-07-27 Thread Boris Ostrovsky
On 07/17/2017 01:47 PM, Juergen Gross wrote: > Instead of fiddling with masking the event channels during suspend > and resume handling let do the irq subsystem do its job. It will do > the mask and unmask operations as needed. > > Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky (I've

[PATCH v2 00/10] drivers/hwmon: Add On-Chip Controller (OCC) hwmon driver

2017-07-27 Thread Eddie James
From: "Edward A. James" This series adds a hwmon driver to support the OCC on POWER8 and POWER9 processors. The OCC is an embedded processor that provides realtime power and thermal monitoring and management. This driver has two different platform drivers as a "base" for the hwmon interface, as

[PATCH v2 01/10] drivers/hwmon: Add On-Chip Controller (OCC) hwmon driver

2017-07-27 Thread Eddie James
From: "Edward A. James" The OCC is a device embedded on a POWER processor that collects and aggregates sensor data from the processor and system. The OCC can provide the raw sensor data as well as perform thermal and power management on the system. This driver provides a hwmon interface to the O

[PATCH v2 10/10] dt-bindings: i2c: Add P8 OCC hwmon driver documentation

2017-07-27 Thread Eddie James
From: "Edward A. James" Document the bindings for I2C-based OCC hwmon driver. Signed-off-by: Edward A. James --- .../devicetree/bindings/i2c/ibm,p8-occ-hwmon.txt | 25 ++ 1 file changed, 25 insertions(+) create mode 100644 Documentation/devicetree/bindings/i2c/ibm,p8-occ

[PATCH v2 07/10] drivers/hwmon/occ: Add error handling

2017-07-27 Thread Eddie James
From: "Edward A. James" Add logic to detect a number of error scenarios on the OCC. Export any errors through an additional non-hwmon device attribute. The error counting and state verification are required by the OCC hardware specification. Signed-off-by: Edward A. James --- drivers/hwmon/occ

[PATCH v2 05/10] drivers/hwmon/occ: Add sensor attributes and register hwmon device

2017-07-27 Thread Eddie James
From: "Edward A. James" Setup the sensor attributes for every OCC sensor found by the first poll response. Register the attributes with hwmon. Add hwmon documentation for the driver. Signed-off-by: Edward A. James --- drivers/hwmon/occ/common.c | 432 +++

[PATCH v2 09/10] Documentation: ABI: Add occ-hwmon driver sysfs documentation

2017-07-27 Thread Eddie James
From: "Edward A. James" Detail the sysfs attributes provided by the occ-hwmon driver. Signed-off-by: Edward A. James --- Documentation/ABI/testing/sysfs-driver-occ-hwmon | 77 1 file changed, 77 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-driver-o

[PATCH v2 08/10] Documentation: hwmon: Add OCC documentation

2017-07-27 Thread Eddie James
From: "Edward A. James" Document the hwmon interface for the OCC. Signed-off-by: Edward A. James --- Documentation/hwmon/occ | 74 + 1 file changed, 74 insertions(+) create mode 100644 Documentation/hwmon/occ diff --git a/Documentation/hwmon/oc

[PATCH v2 06/10] drivers/hwmon/occ: Add non-hwmon attributes

2017-07-27 Thread Eddie James
From: "Edward A. James" Create device attributes for additional OCC properties that do not belong as hwmon sensors. These provide additional information as to the state of the processor and system. Signed-off-by: Edward A. James --- drivers/hwmon/occ/common.c | 83 +

Re: [PATCH tip/core/rcu 4/5] sys_membarrier: Add expedited option

2017-07-27 Thread Paul E. McKenney
On Thu, Jul 27, 2017 at 03:49:08PM +0200, Peter Zijlstra wrote: > On Thu, Jul 27, 2017 at 06:08:16AM -0700, Paul E. McKenney wrote: > > > > No. Its called wakeup latency :-) Your SCHED_OTHER task will not get to > > > insta-run all the time. If there are other tasks already running, we'll > > > no

[PATCH v2 03/10] drivers/hwmon/occ: Parse OCC poll response

2017-07-27 Thread Eddie James
From: "Edward A. James" Add method to parse the response from the OCC poll command. This only needs to be done during probe(), since the OCC shouldn't change the number or format of sensors while it's running. The parsed response allows quick access to sensor data, as well as information on the n

[PATCH v2 02/10] drivers/hwmon/occ: Add command transport method for P8 and P9

2017-07-27 Thread Eddie James
From: "Edward A. James" For the P8 OCC, add the procedure to send a command to the OCC over I2C bus. This involves writing the OCC command registers with serial communication operations (SCOMs) interpreted by the I2C slave. For the P9 OCC, add a procedure to use the OCC in-kernel API to send a co

[PATCH v2 04/10] drivers/hwmon/occ: Add sensor types and versions

2017-07-27 Thread Eddie James
From: "Edward A. James" Add structures to define all sensor types and versions. Add sysfs show and store functions for each sensor type. Add a method to construct the "set user power cap" command and send it to the OCC. Add rate limit to polling the OCC (in case user-space reads our hwmon entries

Re: [PATCH tip/core/rcu 4/5] sys_membarrier: Add expedited option

2017-07-27 Thread Paul E. McKenney
On Thu, Jul 27, 2017 at 03:37:29PM +0200, Peter Zijlstra wrote: > On Thu, Jul 27, 2017 at 05:56:59AM -0700, Paul E. McKenney wrote: > > On Thu, Jul 27, 2017 at 12:14:26PM +0200, Peter Zijlstra wrote: > > > On Tue, Jul 25, 2017 at 12:36:12PM -0700, Paul E. McKenney wrote: > > > > This horse is alrea

Re: [PATCH v6 1/1] acpi: apei: Enable APEI multiple GHES source to share a single external IRQ

2017-07-27 Thread Rafael J. Wysocki
On Thu, Jul 27, 2017 at 7:58 AM, Borislav Petkov wrote: > On Wed, Jul 26, 2017 at 08:57:03PM +0200, Rafael J. Wysocki wrote: >> > Should I apply this or will Tony do that? >> >> So am I suppsed to drop this? > > Well, as suggested in another mail, I think it'll be best if Tony and I > put ourselve

Re: [PATCH 1/2] mm, memcg: reset memory.low during memcg offlining

2017-07-27 Thread Johannes Weiner
CC Andrew - can you route these through the -mm tree please? On Thu, Jul 27, 2017 at 02:04:27PM +0100, Roman Gushchin wrote: > A removed memory cgroup with a defined memory.low and some belonging > pagecache has very low chances to be freed. > > If a cgroup has been removed, there is likely no me

Re: [PATCH stable 3.10] mm: memcontrol: factor out reclaim iterator loading and updating

2017-07-27 Thread Michal Hocko
On Thu 27-07-17 21:59:06, Wenwei Tao wrote: > From: Johannes Weiner > > commit 519ebea3bf6df45439e79c54bda1d9e29fe13a64 upstream > > It turned out that this is actually a bug fix which prevents a double > css_put on last_visited memcg which results in kernel BUG at > kernel/cgroup.c:893! > See

Re: [PATCH 2/2] cgroup: revert fa06235b8eb0 ("cgroup: reset css on destruction")

2017-07-27 Thread Johannes Weiner
On Thu, Jul 27, 2017 at 02:04:28PM +0100, Roman Gushchin wrote: > Commit fa06235b8eb0 ("cgroup: reset css on destruction") caused > css_reset callback to be called from the offlining path. Although > it solves the problem mentioned in the commit description > ("For instance, memory cgroup needs to

Re: [PATCH 2/5] mm: slub: constify attribute_group structures.

2017-07-27 Thread Christopher Lameter
On Thu, 27 Jul 2017, Arvind Yadav wrote: > attribute_group are not supposed to change at runtime. All functions > working with attribute_group provided by work with > const attribute_group. So mark the non-const structs as const. Acked-by: Christoph Lameter

Re: [PATCH tip/core/rcu 4/5] sys_membarrier: Add expedited option

2017-07-27 Thread Peter Zijlstra
On Thu, Jul 27, 2017 at 07:32:05AM -0700, Paul E. McKenney wrote: > > as per your proposed patch, will spray IPIs to all CPUs and at high > > rates. > > OK, I have updated my patch to do throttling. But not respect cpusets. Which is the other important point. The scheduler based IPIs are limited

Re: [PATCH tip/core/rcu 4/5] sys_membarrier: Add expedited option

2017-07-27 Thread Paul E. McKenney
On Thu, Jul 27, 2017 at 10:29:55PM +0800, Boqun Feng wrote: > On Thu, Jul 27, 2017 at 07:16:33AM -0700, Paul E. McKenney wrote: > > On Thu, Jul 27, 2017 at 09:55:51PM +0800, Boqun Feng wrote: > > > Hi Paul, > > > > > > I have a side question out of curiosity: > > > > > > How does synchronize_sche

Re: [Linux-ima-devel] [RFC PATCH 1/5] ima: extend clone() with IMA namespace support

2017-07-27 Thread Mimi Zohar
On Thu, 2017-07-27 at 12:51 +, Magalhaes, Guilherme (Brazil R&D- CL) wrote: > > > > On Tue, 2017-07-25 at 16:08 -0500, Serge E. Hallyn wrote: > > > On Tue, Jul 25, 2017 at 04:57:57PM -0400, Mimi Zohar wrote: > > > > On Tue, 2017-07-25 at 15:46 -0500, Serge E. Hallyn wrote: > > > > > On Tue, J

Re: [PATCH tip/core/rcu 4/5] sys_membarrier: Add expedited option

2017-07-27 Thread Will Deacon
On Thu, Jul 27, 2017 at 07:36:58AM -0700, Paul E. McKenney wrote: > On Thu, Jul 27, 2017 at 10:29:55PM +0800, Boqun Feng wrote: > > On Thu, Jul 27, 2017 at 07:16:33AM -0700, Paul E. McKenney wrote: > > > On Thu, Jul 27, 2017 at 09:55:51PM +0800, Boqun Feng wrote: > > > > Hi Paul, > > > > > > > > I

Re: [PATCH v2 05/13] xen/pvcalls: implement bind command

2017-07-27 Thread Boris Ostrovsky
>> This all looks very similar to previous patches. Can it be factored out? > You are right that the pattern is the same for all commands: > - get a request > - fill the request > - possibly do something else > - wait > however each request is different, the struct and fields are different. > Ther

Re: [PATCH v1 2/2] acpi, x86: Remove encryption mask from ACPI page protection type

2017-07-27 Thread Borislav Petkov
On Wed, Jul 26, 2017 at 01:04:34PM -0500, Tom Lendacky wrote: > The function arch_apei_get_mem_attributes() is used to set the page > protection type for ACPI physical addresses. When SME is active, the > associated protection type needs to not have the encryption mask set > since the ACPI tables l

<    1   2   3   4   5   6   7   8   9   >