Re: [Xen-devel] [RFC PATCH 02/16] x86/xen: cpuid support in xenhost_t

2019-06-12 Thread Andrew Cooper
On 09/05/2019 18:25, Ankur Arora wrote: > xen_cpuid_base() is used to probe and setup features early in a > guest's lifetime. > > We want this to behave differently depending on xenhost->type: for > instance, local xenhosts cannot intercept the cpuid instruction at all. > > Add op (*cpuid_base)()

Re: [Xen-devel] [RFC PATCH 04/16] x86/xen: hypercall support for xenhost_t

2019-06-12 Thread Andrew Cooper
On 09/05/2019 18:25, Ankur Arora wrote: > Allow for different hypercall implementations for different xenhost types. > Nested xenhost, which has two underlying xenhosts, can use both > simultaneously. > > The hypercall macros (HYPERVISOR_*) implicitly use the default xenhost.x > A new macro

Re: [RESEND PATCH v1 1/5] of/platform: Speed up of_find_device_by_node()

2019-06-12 Thread Rob Herring
On Wed, Jun 12, 2019 at 1:29 PM Saravana Kannan wrote: > > On Wed, Jun 12, 2019 at 11:19 AM Rob Herring wrote: > > > > On Wed, Jun 12, 2019 at 11:08 AM Greg Kroah-Hartman > > wrote: > > > > > > On Wed, Jun 12, 2019 at 10:53:09AM -0600, Rob Herring wrote: > > > > On Wed, Jun 12, 2019 at 8:22 AM

Re: [PATCHv5 2/2] mtd: spi-nor: cadence-quadspi: add reset control

2019-06-12 Thread Dinh Nguyen
On 6/12/19 10:07 AM, tudor.amba...@microchip.com wrote: > > > On 06/12/2019 05:37 PM, Dinh Nguyen wrote: >> External E-Mail >> >> >> Get the reset control properties for the QSPI controller and bring them >> out of reset. Most will have just one reset bit, but there is an additional >> OCP

Re: [PATCH net-next v2 1/1] net: stmmac: use GPIO descriptors in stmmac_mdio_reset

2019-06-12 Thread Andrew Lunn
On Wed, Jun 12, 2019 at 09:31:15PM +0200, Martin Blumenstingl wrote: > Switch stmmac_mdio_reset to use GPIO descriptors. GPIO core handles the > "snps,reset-gpio" for GPIO descriptors so we don't need to take care of > it inside the driver anymore. > > The advantage of this is that we now

[GIT PULL] SELinux fixes for v5.2 (#2)

2019-06-12 Thread Paul Moore
05174c95b83f8aca0c47b87115abb7a6387aafa5: selinux: do not report error on connect(AF_UNSPEC) (2019-05-20 21:46:02 -0400) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux.git tags/selinux-pr-20190612 for you to fetch changes up

Re: MHI code review

2019-06-12 Thread Daniele Palmas
Hi Sujeev, Il giorno mer 12 giu 2019 alle ore 19:54 Sujeev Dias ha scritto: > > Hi Daniels > > Sorry for delay response. Yes, we will be pushing new set of series very > soon that will have support for 55 as well. The series that's pushed should > already work for SDX20, 24 and 55. There are

Re: perf build failure with newer glibc headers

2019-06-12 Thread Arnaldo Carvalho de Melo
Em Wed, Jun 12, 2019 at 03:23:12PM -0400, Laura Abbott escreveu: > Hi, > > While doing some build experiments, I found a compile failure with perf and > jvmti: > > BUILDSTDERR: gcc -Wp,-MD,./.xsk.o.d -Wp,-MT,xsk.o -O2 -g -pipe -Wall > -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2

Re: [PATCH] locking/static_key: always define static_branch_deferred_inc

2019-06-12 Thread Jakub Kicinski
On Wed, 12 Jun 2019 16:25:16 -0400, Willem de Bruijn wrote: > On Wed, Jun 12, 2019 at 3:59 PM Jakub Kicinski > wrote: > > > > On Wed, 12 Jun 2019 15:44:09 -0400, Willem de Bruijn wrote: > > > From: Willem de Bruijn > > > > > > This interface is currently only defined if CONFIG_JUMP_LABEL. Make

Re: [RFC 00/10] Process-local memory allocations for hiding KVM secrets

2019-06-12 Thread Andy Lutomirski
> On Jun 12, 2019, at 1:41 PM, Dave Hansen wrote: > > On 6/12/19 1:27 PM, Andy Lutomirski wrote: >>> We've discussed having per-cpu page tables where a given PGD is >>> only in use from one CPU at a time. I *think* this scheme still >>> works in such a case, it just adds one more PGD entry

[PATCH v2 3/4] arm64: dts: meson: use the generic Ethernet PHY reset GPIO bindings

2019-06-12 Thread Martin Blumenstingl
The snps,reset-gpio bindings are deprecated in favour of the generic "Ethernet PHY reset" bindings. Replace snps,reset-gpio from the node with reset-gpios in the ethernet-phy node. The old snps,reset-active-low property is now encoded directly as GPIO flag inside the reset-gpios property.

[PATCH v2 2/4] ARM: dts: meson: switch to the generic Ethernet PHY reset bindings

2019-06-12 Thread Martin Blumenstingl
The snps,reset-gpio bindings are deprecated in favour of the generic "Ethernet PHY reset" bindings. Replace snps,reset-gpio from the node with reset-gpios in the ethernet-phy node. The old snps,reset-active-low property is now encoded directly as GPIO flag inside the reset-gpios property.

[PATCH v2 1/4] arm64: dts: meson: g12a: x96-max: fix the Ethernet PHY reset line

2019-06-12 Thread Martin Blumenstingl
The Odroid-N2 schematics show that the following pins are used for the reset and interrupt lines: - GPIOZ_14 is the PHY interrupt line - GPIOZ_15 is the PHY reset line The GPIOZ_14 and GPIOZ_15 pins are special. The datasheet describes that they are "3.3V input tolerant open drain (OD) output

[PATCH v2 0/4] Ethernet PHY reset GPIO updates for Amlogic SoCs

2019-06-12 Thread Martin Blumenstingl
While trying to add the Ethernet PHY interrupt on the X96 Max I found that the current reset line definition is incorrect. Patch #1 fixes this. Since the fix requires moving from the deprecated "snps,reset-gpio" property to the generic Ethernet PHY reset bindings I decided to move all Amlogic

[PATCH v2 4/4] arm64: dts: meson: g12b: odroid-n2: add the Ethernet PHY reset line

2019-06-12 Thread Martin Blumenstingl
The reset line of the RTL8211F PHY is routed to the GPIOZ_15 pad. Describe this in the device tree so the PHY framework can bring the PHY into a known state when initializing it. GPIOZ_15 doesn't support driving the output HIGH (to take the PHY out of reset, only output LOW to reset the PHY is

INFO: task syz-executor can't die for more than 143 seconds.

2019-06-12 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:81a72c79 Add linux-next specific files for 20190612 git tree: linux-next console output: https://syzkaller.appspot.com/x/log.txt?x=1451d31ea0 kernel config: https://syzkaller.appspot.com/x/.config?x=8aa46bbce201b8b6

Re: [RFC 00/10] Process-local memory allocations for hiding KVM secrets

2019-06-12 Thread Dave Hansen
On 6/12/19 1:27 PM, Andy Lutomirski wrote: >> We've discussed having per-cpu page tables where a given PGD is >> only in use from one CPU at a time. I *think* this scheme still >> works in such a case, it just adds one more PGD entry that would >> have to context-switched. > Fair warning: Linus

Re: linux-next: Tree for Jun 12 (kernel/bpf/verifier)

2019-06-12 Thread Randy Dunlap
On 6/12/19 12:00 AM, Stephen Rothwell wrote: > Hi all, > > Changes since 20190611: > on x86_64: ld: kernel/bpf/verifier.o: in function `check_mem_access': verifier.c:(.text+0x4b90): undefined reference to `bpf_xdp_sock_is_valid_access' ld: kernel/bpf/verifier.o: in function

[PATCH v3] platform/chrome: cros_ec_lpc: Choose Microchip EC at runtime

2019-06-12 Thread Enric Balletbo i Serra
On many boards, communication between the kernel and the Embedded Controller happens over an LPC bus. In these cases, the kernel config CONFIG_CROS_EC_LPC is enabled. Some of these LPC boards contain a Microchip Embedded Controller (MEC) that is different from the regular EC. On these devices, the

[PATCH] binder: fix possible UAF when freeing buffer

2019-06-12 Thread Todd Kjos
There is a race between the binder driver cleaning up a completed transaction via binder_free_transaction() and a user calling binder_ioctl(BC_FREE_BUFFER) to release a buffer. It doesn't matter which is first but they need to be protected against running concurrently which can result in a UAF.

[GIT PULL] cpupower update for Linux 5.2-rc6

2019-06-12 Thread Shuah Khan
Hi Rafael, Please pull the following update for Linux 5.2-rc6 or 5.3 depending on your pull request schedule for Linus. This cpupower update for Linux 5.2-rc6 consists of a fix and a minor spelling correction. diff is attached. thanks, -- Shuah

Re: [RFC 00/10] Process-local memory allocations for hiding KVM secrets

2019-06-12 Thread Andy Lutomirski
> On Jun 12, 2019, at 12:55 PM, Dave Hansen wrote: > >> On 6/12/19 10:08 AM, Marius Hillenbrand wrote: >> This patch series proposes to introduce a region for what we call >> process-local memory into the kernel's virtual address space. > > It might be fun to cc some x86 folks on this

Re: [PATCH] locking/static_key: always define static_branch_deferred_inc

2019-06-12 Thread Willem de Bruijn
On Wed, Jun 12, 2019 at 3:59 PM Jakub Kicinski wrote: > > On Wed, 12 Jun 2019 15:44:09 -0400, Willem de Bruijn wrote: > > From: Willem de Bruijn > > > > This interface is currently only defined if CONFIG_JUMP_LABEL. Make it > > available also when jump labels are disabled. > > > > Fixes:

Re: [RESEND PATCH v1 1/5] of/platform: Speed up of_find_device_by_node()

2019-06-12 Thread Frank Rowand
On 6/12/19 12:29 PM, Saravana Kannan wrote: > On Wed, Jun 12, 2019 at 11:19 AM Rob Herring wrote: >> >> On Wed, Jun 12, 2019 at 11:08 AM Greg Kroah-Hartman >> wrote: >>> >>> On Wed, Jun 12, 2019 at 10:53:09AM -0600, Rob Herring wrote: On Wed, Jun 12, 2019 at 8:22 AM Greg Kroah-Hartman

Re: [PATCH v4 0/7] cpufreq support for Raspberry Pi

2019-06-12 Thread Stefan Wahren
Hi Nicolas, Am 12.06.19 um 20:24 schrieb Nicolas Saenz Julienne: > Hi all, > this aims at adding cpufreq support to the Raspberry Pi family of > boards. > > The series first factors out 'pllb' from clk-bcm2385 and creates a new > clk driver that operates it over RPi's firmware interface[1]. We

Re: WARNING in binder_transaction_buffer_release

2019-06-12 Thread Todd Kjos
On Wed, Jun 12, 2019 at 12:23 PM Eric Biggers wrote: > > On Mon, May 20, 2019 at 07:18:06AM -0700, syzbot wrote: > > Hello, > > > > syzbot found the following crash on: > > > > HEAD commit:72cf0b07 Merge tag 'sound-fix-5.2-rc1' of git://git.kernel.. > > git tree: upstream > > console

[PATCH 1/2] thermal/drivers/core: Add init section table for self-encapsulation

2019-06-12 Thread Daniel Lezcano
Currently the governors are declared in their respective files but they export their [un]register functions which in turn call the [un]register governors core's functions. That implies a cyclic dependency which is not desirable. There is a way to self-encapsulate the governors by letting them to

[PATCH 2/2] thermal/drivers/core: Use governor table to initialize

2019-06-12 Thread Daniel Lezcano
Now that the governor table is in place and the macro allows to browse the table, declare the governor so the entry is added in the governor table in the init section. The [un]register_thermal_governors function does no longer need to use the exported [un]register thermal governor's specific

Re: [PATCH] arm64: defconfig: Enable FSL_EDMA driver

2019-06-12 Thread Li Yang
On Thu, May 9, 2019 at 10:15 PM Shawn Guo wrote: > > On Mon, Apr 22, 2019 at 01:30:56PM -0500, Li Yang wrote: > > Enables the FSL EDMA driver by default. This also works around an issue > > that imx-i2c driver keeps deferring the probe because of the DMA is not > > ready. And currently the DMA

[PATCH v3 00/14] pwm-meson: cleanups and improvements

2019-06-12 Thread Martin Blumenstingl
This series consists of various cleanups and improvements for the pwm-meson driver. Patches 1 to 6 are small code cleanups with the goal of making the code easier to read. Patches 7 to 9 are reworking the way the per-channel settings are accessed. This is a first preparation step for adding full

[PATCH v3 03/14] pwm: meson: use GENMASK and FIELD_PREP for the lo and hi values

2019-06-12 Thread Martin Blumenstingl
meson_pwm_calc() ensures that "lo" is always less than 16 bits wide (otherwise it would overflow into the "hi" part of the REG_PWM_{A,B} register). Use GENMASK and FIELD_PREP for the lo and hi values to make it easier to spot how wide these are internally. Additionally this is a preparation step

[PATCH v3 06/14] pwm: meson: pass struct pwm_device to meson_pwm_calc()

2019-06-12 Thread Martin Blumenstingl
meson_pwm_calc() is the last function that accepts a struct meson_pwm_channel. meson_pwm_enable(), meson_pwm_disable() and meson_pwm_apply() for example are all taking a struct pwm_device as parameter. When they need the struct meson_pwm_channel these functions simply call pwm_get_chip_data()

[PATCH v3 02/14] pwm: meson: use devm_clk_get_optional() to get the input clock

2019-06-12 Thread Martin Blumenstingl
Simplify the code which fetches the input clock for a PWM channel by using devm_clk_get_optional(). This comes with a small functional change: previously all errors except EPROBE_DEFER were ignored. Now all other errors are also treated as errors. If no input clock is present

[PATCH v3 09/14] pwm: meson: move pwm_set_chip_data() to meson_pwm_request()

2019-06-12 Thread Martin Blumenstingl
All existing PWM drivers (except pwm-meson and two other ones) call pwm_set_chip_data() from their pwm_ops.request() callback. Now that we can access the struct meson_pwm_channel from struct meson_pwm we can do the same. Move the call to pwm_set_chip_data() to meson_pwm_request() and drop the

[PATCH v3 04/14] pwm: meson: change MISC_CLK_SEL_WIDTH to MISC_CLK_SEL_MASK

2019-06-12 Thread Martin Blumenstingl
MISC_CLK_SEL_WIDTH is only used in one place where it's converted into a bit-mask. Rename and change the macro to be a bit-mask so that conversion is not needed anymore. No functional changes intended. Reviewed-by: Neil Armstrong Signed-off-by: Martin Blumenstingl --- drivers/pwm/pwm-meson.c |

[PATCH v3 11/14] pwm: meson: read the full hardware state in meson_pwm_get_state()

2019-06-12 Thread Martin Blumenstingl
Update the meson_pwm_get_state() implementation to take care of all information in the registers instead of only reading the "enabled" state. The PWM output is only enabled if two conditions are met: 1. the per-channel clock is enabled 2. the PWM output is enabled Calculate the PWM period and

[PATCH v3 07/14] pwm: meson: add the meson_pwm_channel data to struct meson_pwm

2019-06-12 Thread Martin Blumenstingl
Make struct meson_pwm_channel accessible from struct meson_pwm. PWM core has a limitation: per-channel data can only be set after pwmchip_add() is called. However, pwmchip_add() internally calls pwm_ops.get_state(). If pwm_ops.get_state() needs access to the per-channel data it has to obtain it

[PATCH v3 08/14] pwm: meson: add the per-channel register offsets and bits in a struct

2019-06-12 Thread Martin Blumenstingl
Introduce struct meson_pwm_channel_data which contains the per-channel offsets for the PWM register and REG_MISC_AB bits. Replace the existing switch (pwm->hwpwm) statements with an access to the new struct. This simplifies the code and will make it easier to implement pwm_ops.get_state() because

[PATCH v3 05/14] pwm: meson: don't duplicate the polarity internally

2019-06-12 Thread Martin Blumenstingl
Let meson_pwm_calc() use the polarity from struct pwm_state directly. This removes a level of indirection where meson_pwm_apply() first had to set a driver-internal inverter mask which was then only used by meson_pwm_calc(). Instead of adding the polarity as parameter to meson_pwm_calc() switch

[PATCH v3 12/14] pwm: meson: don't cache struct pwm_state internally

2019-06-12 Thread Martin Blumenstingl
The PWM core already caches the "current struct pwm_state" as the "current state of the hardware registers" inside struct pwm_device. Drop the struct pwm_state from struct meson_pwm_channel in favour of the struct pwm_state in struct pwm_device. While here also drop any checks based on the

[PATCH v3 01/14] pwm: meson: unify the parameter list of meson_pwm_{enable,disable}

2019-06-12 Thread Martin Blumenstingl
This is a preparation for a future cleanup. Pass struct pwm_device instead of passing the individual values required by each function as these can be obtained for each struct pwm_device instance. As a nice side-effect the driver now uses "switch (pwm->hwpwm)" everywhere. Before some functions

[PATCH v3 14/14] pwm: meson: add documentation to the driver

2019-06-12 Thread Martin Blumenstingl
Add links to the datasheet and a short summary how the hardware works. The goal is to make it easier for other developers to understand why the pwm-meson driver is implemented the way it is. Suggested-by: Uwe Kleine-König Co-authored-by: Neil Armstrong Reviewed-by: Neil Armstrong

[PATCH v3 10/14] pwm: meson: simplify the calculation of the pre-divider and count

2019-06-12 Thread Martin Blumenstingl
Replace the loop to calculate the pre-divider and count with two separate div64_u64() calculations. This makes the code easier to read and improves the precision. Three example cases: 1) 32.768kHz LPO clock for the SDIO wifi chip on Khadas VIM clock input: 500MHz (FCLK_DIV4) period: 30518ns

Re: [v2 PATCH] mm: thp: fix false negative of shmem vma's THP eligibility

2019-06-12 Thread Yang Shi
On 6/12/19 11:44 AM, Hugh Dickins wrote: On Mon, 10 Jun 2019, Yang Shi wrote: On 6/7/19 8:58 PM, Hugh Dickins wrote: Yes, that is correct; and correctly placed. But a little more is needed: see how mm/memory.c's transhuge_vma_suitable() will only allow a pmd to be used instead of a pte if

[PATCH v3 13/14] pwm: meson: add support PWM_POLARITY_INVERSED when disabling

2019-06-12 Thread Martin Blumenstingl
meson_pwm_apply() has to consider the PWM polarity when disabling the output. With enabled=false and polarity=PWM_POLARITY_NORMAL the output needs to be LOW. The driver already supports this. With enabled=false and polarity=PWM_POLARITY_INVERSED the output needs to be HIGH. Implement this in the

Re: [PATCH] locking/static_key: always define static_branch_deferred_inc

2019-06-12 Thread Jakub Kicinski
On Wed, 12 Jun 2019 15:44:09 -0400, Willem de Bruijn wrote: > From: Willem de Bruijn > > This interface is currently only defined if CONFIG_JUMP_LABEL. Make it > available also when jump labels are disabled. > > Fixes: ad282a8117d50 ("locking/static_key: Add support for deferred static >

Re: [RFC 00/10] Process-local memory allocations for hiding KVM secrets

2019-06-12 Thread Dave Hansen
On 6/12/19 10:08 AM, Marius Hillenbrand wrote: > This patch series proposes to introduce a region for what we call > process-local memory into the kernel's virtual address space. It might be fun to cc some x86 folks on this series. They might have some relevant opinions. ;) A few high-level

Re: [PATCH -next] x86/mm: fix an unused variable "tsk" warning

2019-06-12 Thread Borislav Petkov
On Wed, Jun 12, 2019 at 01:19:06PM -0500, Eric W. Biederman wrote: > Since I am removing the tsk parameter from all of the synchrnous signal > sending functions, on all of the architectures it was easier to go > through my own tree than -tip. Yeah, I remember reading a mail about it... > The

Re: [PATCH v2 1/1] PCI/IOV: Fix incorrect cfg_size for VF > 0

2019-06-12 Thread Raslan, KarimAllah
On Wed, 2019-06-12 at 12:03 -0700, Raj, Ashok wrote: > On Wed, Jun 12, 2019 at 12:58:17PM -0600, Alex Williamson wrote: > > > > On Wed, 12 Jun 2019 11:41:36 -0700 > > sathyanarayanan kuppuswamy > > wrote: > > > > > > > > On 6/12/19 11:19 AM, Alex Williamson wrote: > > > > > > > > On Wed, 12

Re: possible deadlock in io_submit_one

2019-06-12 Thread Eric Biggers
Hi Bart and Christoph, On Mon, Feb 04, 2019 at 06:03:04PM -0800, syzbot wrote: > Hello, > > syzbot found the following crash on: > > HEAD commit:5eeb63359b1e Merge tag 'for-linus' of git://git.kernel.org.. > git tree: upstream > console output:

Re: [PATCH v3 3/4] backlight: pwm_bl: compute brightness of LED linearly to human eye.

2019-06-12 Thread Daniel Thompson
On Wed, Jun 12, 2019 at 12:26:42PM -0700, Matthias Kaehlcke wrote: > Hi Daniel, > > On Wed, Jun 12, 2019 at 12:03:25PM +0100, Daniel Thompson wrote: > > On Tue, Jun 11, 2019 at 03:30:19PM -0700, Matthias Kaehlcke wrote: > > > On Tue, Jun 11, 2019 at 09:55:30AM -0700, Brian Norris wrote: > > > >

Re: [PATCH v2 04/14] pwm: meson: change MISC_CLK_SEL_WIDTH to MISC_CLK_SEL_MASK

2019-06-12 Thread Martin Blumenstingl
Hi Uwe, On Tue, Jun 11, 2019 at 6:33 PM Uwe Kleine-König wrote: [...] > > @@ -463,7 +463,7 @@ static int meson_pwm_init_channels(struct meson_pwm > > *meson, > > > > channel->mux.reg = meson->base + REG_MISC_AB; > > channel->mux.shift = mux_reg_shifts[i]; > > -

Re: infinite loop in read_hpet from ktime_get_boot_fast_ns

2019-06-12 Thread Arnd Bergmann
On Wed, Jun 12, 2019 at 7:55 PM Peter Zijlstra wrote: > On Wed, Jun 12, 2019 at 11:44:35AM +0200, Jason A. Donenfeld wrote: > > But there's still the > > issue of the 32-bit wraparound on the base implementation. > > If an architecture doesn't provide a sched_clock(), you're on a > seriously

Re: [PATCH 08/15] x86/alternatives: Teach text_poke_bp() to emulate instructions

2019-06-12 Thread Nadav Amit
> On Jun 11, 2019, at 8:55 AM, Peter Zijlstra wrote: > > On Tue, Jun 11, 2019 at 11:22:54AM -0400, Steven Rostedt wrote: >> On Tue, 11 Jun 2019 10:03:07 +0200 >> Peter Zijlstra wrote: >> >> >>> So what happens is that arch_prepare_optimized_kprobe() <- >>> copy_optimized_instructions() copies

[PATCH] locking/static_key: always define static_branch_deferred_inc

2019-06-12 Thread Willem de Bruijn
From: Willem de Bruijn This interface is currently only defined if CONFIG_JUMP_LABEL. Make it available also when jump labels are disabled. Fixes: ad282a8117d50 ("locking/static_key: Add support for deferred static branches") Signed-off-by: Willem de Bruijn --- The original patch went into

Re: [BISECTED REGRESSION] b43legacy broken on G4 PowerBook

2019-06-12 Thread Larry Finger
On 6/12/19 1:55 AM, Christoph Hellwig wrote: Ooops, yes. But I think we could just enable ZONE_DMA on 32-bit powerpc. Crude enablement hack below: diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 8c1c636308c8..1dd71a98b70c 100644 --- a/arch/powerpc/Kconfig +++

Re: [PATCH -next] mm/hotplug: skip bad PFNs from pfn_to_online_page()

2019-06-12 Thread Dan Williams
ff > > page dumped because: VM_BUG_ON_PAGE(PagePoisoned(p)) > > [ cut here ] > > kernel BUG at include/linux/mm.h:1084! > > invalid opcode: [#1] SMP DEBUG_PAGEALLOC KASAN PTI > > CPU: 5 PID: 332 Comm: kmemleak Not tainted 5.2.0-rc4-next-20190612

Re: [PATCH -next] mm/hotplug: skip bad PFNs from pfn_to_online_page()

2019-06-12 Thread Dan Williams
t include/linux/mm.h:1084! > invalid opcode: [#1] SMP DEBUG_PAGEALLOC KASAN PTI > CPU: 5 PID: 332 Comm: kmemleak Not tainted 5.2.0-rc4-next-20190612+ #6 > Hardware name: Lenovo ThinkSystem SR530 -[7X07RCZ000]-/-[7X07RCZ000]-, > BIOS -[TEE113T-1.00]- 07/07/2017 > RIP: 0010:kmemleak_scan+0x6

[PATCH 7/8] sched,fair: refactor enqueue/dequeue_entity

2019-06-12 Thread Rik van Riel
Refactor enqueue_entity, dequeue_entity, and update_load_avg, in order to split out the things we still want to happen at every level in the cgroup hierarchy with a flat runqueue from the things we only need to happen once. No functional changes. Signed-off-by: Rik van Riel ---

[PATCH 6/8] sched,cfs: fix zero length timeslice calculation

2019-06-12 Thread Rik van Riel
The way the time slice length is currently calculated, not only do high priority tasks get longer time slices than low priority tasks, but due to fixed point math, low priority tasks could end up with a zero length time slice. This can lead to cache thrashing and other inefficiencies. Simplify

[PATCH 4/8] sched,fair: remove cfs rqs from leaf_cfs_rq_list bottom up

2019-06-12 Thread Rik van Riel
Reducing the overhead of the CPU controller is achieved by not walking all the sched_entities every time a task is enqueued or dequeued. One of the things being checked every single time is whether the cfs_rq is on the rq->leaf_cfs_rq_list. By only removing a cfs_rq from the list once it no

[PATCH 8/8] sched,fair: flatten hierarchical runqueues

2019-06-12 Thread Rik van Riel
Flatten the hierarchical runqueues into just the per CPU rq.cfs runqueue. Iteration of the sched_entity hierarchy is rate limited to once per jiffy per sched_entity, which is a smaller change than it seems, because load average adjustments were already rate limited to once per jiffy before this

[PATCH 1/8] sched: introduce task_se_h_load helper

2019-06-12 Thread Rik van Riel
Sometimes the hierarchical load of a sched_entity needs to be calculated. Split out task_h_load into a task_se_h_load that takes a sched_entity pointer as its argument, and a task_h_load wrapper that calls task_se_h_load. No functional changes. Signed-off-by: Rik van Riel ---

[PATCH 5/8] sched,cfs: use explicit cfs_rq of parent se helper

2019-06-12 Thread Rik van Riel
Use an explicit "cfs_rq of parent sched_entity" helper in a few strategic places, where cfs_rq_of(se) may no longer point at the right runqueue once we flatten the hierarchical cgroup runqueues. No functional change. Signed-off-by: Rik van Riel --- kernel/sched/fair.c | 17 + 1

[PATCH 3/8] sched,fair: redefine runnable_load_avg as the sum of task_h_load

2019-06-12 Thread Rik van Riel
The runnable_load magic is used to quickly propagate information about runnable tasks up the hierarchy of runqueues. lhen switching to a flat runqueue, that no longer works. Redefine the CPU cfs_rq runnable_load_avg to be the sum of task_h_loads of the runnable tasks. This provides enough

[PATCH 2/8] sched: change /proc/sched_debug fields

2019-06-12 Thread Rik van Riel
Remove some fields from /proc/sched_debug that are removed from sched_entity in a subsequent patch, and add h_load, which comes in very handy to debug CPU controller weight distribution. Signed-off-by: Rik van Riel --- kernel/sched/debug.c | 11 ++- 1 file changed, 2 insertions(+), 9

[RFC] sched,cfs: flatten CPU controller runqueues

2019-06-12 Thread Rik van Riel
The current implementation of the CPU controller uses hierarchical runqueues, where on wakeup a task is enqueued on its group's runqueue, the group is enqueued on the runqueue of the group above it, etc. This increases a fairly large amount of overhead for workloads that do a lot of wakeups a

[PATCH net-next v2 0/1] stmmac: honor the GPIO flags for the PHY reset GPIO

2019-06-12 Thread Martin Blumenstingl
Recent Amlogic SoCs (G12A which includes S905X2 and S905D2 as well as G12B which includes S922X) use GPIOZ_14 or GPIOZ_15 for the PHY reset line. These GPIOs are special because they are marked as "3.3V input tolerant open drain (OD) pins" which means they can only drive the pin output LOW (to

[PATCH net-next v2 1/1] net: stmmac: use GPIO descriptors in stmmac_mdio_reset

2019-06-12 Thread Martin Blumenstingl
Switch stmmac_mdio_reset to use GPIO descriptors. GPIO core handles the "snps,reset-gpio" for GPIO descriptors so we don't need to take care of it inside the driver anymore. The advantage of this is that we now preserve the GPIO flags which are passed via devicetree. This is required on some

Re: [RFC PATCH v1 2/3] LSM/x86/sgx: Implement SGX specific hooks in SELinux

2019-06-12 Thread Andy Lutomirski
On Tue, Jun 11, 2019 at 3:02 PM Sean Christopherson wrote: > > On Tue, Jun 11, 2019 at 09:40:25AM -0400, Stephen Smalley wrote: > > I haven't looked at this code closely, but it feels like a lot of > > SGX-specific logic embedded into SELinux that will have to be repeated or > > reused for every

Re: [RESEND PATCH v1 1/5] of/platform: Speed up of_find_device_by_node()

2019-06-12 Thread Saravana Kannan
On Wed, Jun 12, 2019 at 11:19 AM Rob Herring wrote: > > On Wed, Jun 12, 2019 at 11:08 AM Greg Kroah-Hartman > wrote: > > > > On Wed, Jun 12, 2019 at 10:53:09AM -0600, Rob Herring wrote: > > > On Wed, Jun 12, 2019 at 8:22 AM Greg Kroah-Hartman > > > wrote: > > > > > > > > On Wed, Jun 12, 2019 at

Re: [RFC PATCH v2 2/5] x86/sgx: Require userspace to define enclave pages' protection bits

2019-06-12 Thread Jarkko Sakkinen
On Mon, Jun 10, 2019 at 11:17:44AM -0700, Sean Christopherson wrote: > On Mon, Jun 10, 2019 at 08:45:06PM +0300, Jarkko Sakkinen wrote: > > On Mon, Jun 10, 2019 at 09:15:33AM -0700, Sean Christopherson wrote: > > > > 'flags' should would renamed as 'secinfo_flags_mask' even if the name is > > > >

[PATCHv4 05/28] timens: Introduce CLOCK_BOOTTIME offset

2019-06-12 Thread Dmitry Safonov
From: Andrei Vagin Adds boottime virtualisation for time namespace. Introduce timespec for boottime clock into timens offsets and wire clock_gettime() syscall. Signed-off-by: Andrei Vagin Co-developed-by: Dmitry Safonov Signed-off-by: Dmitry Safonov --- include/linux/time_namespace.h | 9

[PATCHv4 15/28] x86/vdso: Add offsets page in vvar

2019-06-12 Thread Dmitry Safonov
From: Andrei Vagin As modern applications fetch time from VDSO without entering the kernel, it's needed to provide offsets for userspace code inside time namespace. A page for timens offsets is allocated on time namespace construction. Put that page into VVAR for tasks inside timens and zero

[PATCHv4 03/28] posix-clocks: add another call back to return clock time in ktime_t

2019-06-12 Thread Dmitry Safonov
From: Andrei Vagin The callsite in common_timer_get() has already a comment: /* * The timespec64 based conversion is suboptimal, but it's not * worth to implement yet another callback. */ kc->clock_get(timr->it_clock, ); now =

[PATCHv4 01/28] ns: Introduce Time Namespace

2019-06-12 Thread Dmitry Safonov
From: Andrei Vagin Time Namespace isolates clock values. The kernel provides access to several clocks CLOCK_REALTIME, CLOCK_MONOTONIC, CLOCK_BOOTTIME, etc. CLOCK_REALTIME System-wide clock that measures real (i.e., wall-clock) time. CLOCK_MONOTONIC Clock that cannot be set and

[PATCHv4 12/28] x86/vdso/Makefile: Add vobjs32

2019-06-12 Thread Dmitry Safonov
Treat ia32/i386 objects in array the same As for 64-bit vdso objects. This is a preparation ground to avoid code duplication on introduction timens vdso. Co-developed-by: Andrei Vagin Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov --- arch/x86/entry/vdso/Makefile | 15

[PATCHv4 09/28] timens: Shift /proc/uptime

2019-06-12 Thread Dmitry Safonov
Respect boottime inside time namespace for /proc/uptime Co-developed-by: Andrei Vagin Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov --- fs/proc/uptime.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/proc/uptime.c b/fs/proc/uptime.c index a4c2791ab70b..5a1b228964fb

[PATCHv4 06/28] timerfd/timens: Take into account ns clock offsets

2019-06-12 Thread Dmitry Safonov
From: Andrei Vagin Make timerfd respect timens offsets. Provide a helper timens_ktime_to_host() that is useful to wire up timens to different kernel subsystems. Signed-off-by: Andrei Vagin Co-developed-by: Dmitry Safonov Signed-off-by: Dmitry Safonov --- fs/timerfd.c | 3

[PATCHv4 16/28] x86/vdso: Allocate timens vdso

2019-06-12 Thread Dmitry Safonov
As it has been discussed on timens RFC, adding a new conditional branch `if (inside_time_ns)` on VDSO for all processes is undesirable. It will add a penalty for everybody as branch predictor may mispredict the jump. Also there are instruction cache lines wasted on cmp/jmp. Those effects of

[PATCHv4 10/28] x86/vdso2c: Correct err messages on file opening

2019-06-12 Thread Dmitry Safonov
err() message in main() is misleading: it should print `outfilename`, which is argv[3], not argv[2]. Correct error messages to be more precise about what failed and for which file. Co-developed-by: Andrei Vagin Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov ---

[PATCHv4 07/28] posix-timers/timens: Take into account clock offsets

2019-06-12 Thread Dmitry Safonov
From: Andrei Vagin Wire timer_settime() syscall into time namespace virtualization. Signed-off-by: Andrei Vagin Co-developed-by: Dmitry Safonov Signed-off-by: Dmitry Safonov --- kernel/time/posix-timers.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/time/posix-timers.c

[PATCHv4 08/28] timens/kernel: Take into account timens clock offsets in clock_nanosleep

2019-06-12 Thread Dmitry Safonov
From: Andrei Vagin Wire up clock_nanosleep() to timens offsets. Signed-off-by: Andrei Vagin Co-developed-by: Dmitry Safonov Signed-off-by: Dmitry Safonov --- include/linux/hrtimer.h| 2 +- kernel/time/alarmtimer.c | 2 ++ kernel/time/hrtimer.c | 8

Re: [PATCH v3 3/4] backlight: pwm_bl: compute brightness of LED linearly to human eye.

2019-06-12 Thread Matthias Kaehlcke
Hi Daniel, On Wed, Jun 12, 2019 at 12:03:25PM +0100, Daniel Thompson wrote: > On Tue, Jun 11, 2019 at 03:30:19PM -0700, Matthias Kaehlcke wrote: > > On Tue, Jun 11, 2019 at 09:55:30AM -0700, Brian Norris wrote: > > > On Tue, Jun 11, 2019 at 3:49 AM Daniel Thompson > > > wrote: > > > > This is a

[PATCHv4 17/28] x86/vdso: Switch image on setns()/unshare()/clone()

2019-06-12 Thread Dmitry Safonov
As it has been discussed on timens RFC, adding a new conditional branch `if (inside_time_ns)` on VDSO for all processes is undesirable. It will add a penalty for everybody as branch predictor may mispredict the jump. Also there are instruction cache lines wasted on cmp/jmp. Those effects of

[PATCHv4 14/28] x86/vdso: Rename vdso_image {.data=>.text}

2019-06-12 Thread Dmitry Safonov
To avoid any confusion with VVAR. Co-developed-by: Andrei Vagin Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov --- arch/x86/entry/vdso/vdso2c.h | 2 +- arch/x86/entry/vdso/vma.c| 6 +++--- arch/x86/include/asm/vdso.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-)

[PATCHv4 21/28] selftest/timens: Add Time Namespace test for supported clocks

2019-06-12 Thread Dmitry Safonov
A test to check that all supported clocks work on host and inside a new time namespace. Use both ways to get time: through VDSO and by entering the kernel with implicit syscall. Introduce a new timens directory in selftests framework for the next timens tests. Co-developed-by: Andrei Vagin

[PATCHv4 20/28] timens/fs/proc: Introduce /proc/pid/timens_offsets

2019-06-12 Thread Dmitry Safonov
From: Andrei Vagin API to set time namespace offsets for children processes, i.e.: echo "clockid off_ses off_nsec" > /proc/self/timens_offsets Signed-off-by: Andrei Vagin Co-developed-by: Dmitry Safonov Signed-off-by: Dmitry Safonov --- fs/proc/base.c | 95

[PATCHv4 23/28] selftest/timens: Add a test for clock_nanosleep()

2019-06-12 Thread Dmitry Safonov
From: Andrei Vagin Check that clock_nanosleep() takes into account clock offsets. Signed-off-by: Andrei Vagin Co-developed-by: Dmitry Safonov Signed-off-by: Dmitry Safonov --- tools/testing/selftests/timens/.gitignore | 1 + tools/testing/selftests/timens/Makefile | 2 +-

Re: [PATCH v3 1/2] KVM: LAPIC: Optimize timer latency consider world switch time

2019-06-12 Thread Radim Krčmář
2019-06-12 21:22+0200, Radim Krčmář: > 2019-06-12 08:14-0700, Sean Christopherson: > > On Wed, Jun 12, 2019 at 05:40:18PM +0800, Wanpeng Li wrote: > > > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > > > @@ -145,6 +145,12 @@ module_param(tsc_tolerance_ppm, uint, S_IRUGO | > > > S_IWUSR);

[PATCHv4 26/28] x86/vdso: Align VDSO functions by CPU L1 cache line

2019-06-12 Thread Dmitry Safonov
From: Andrei Vagin After performance testing VDSO patches a noticeable 20% regression was found on gettime_perf selftest with a cold cache. As it turns to be, before time namespaces introduction, VDSO functions were quite aligned to cache lines, but adding a new code to adjust timens offset

[PATCHv4 25/28] selftest/timens: Add timer offsets test

2019-06-12 Thread Dmitry Safonov
From: Andrei Vagin Check that timer_create() takes into account clock offsets. Signed-off-by: Andrei Vagin Co-developed-by: Dmitry Safonov Signed-off-by: Dmitry Safonov --- tools/testing/selftests/timens/.gitignore | 1 + tools/testing/selftests/timens/Makefile | 3 +-

[PATCHv4 24/28] selftest/timens: Add procfs selftest

2019-06-12 Thread Dmitry Safonov
Check that /proc/uptime is correct inside a new time namespace. Co-developed-by: Andrei Vagin Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov --- tools/testing/selftests/timens/.gitignore | 1 + tools/testing/selftests/timens/Makefile | 2 +-

[PATCHv4 27/28] selftests: Add a simple perf test for clock_gettime()

2019-06-12 Thread Dmitry Safonov
From: Andrei Vagin Signed-off-by: Andrei Vagin Co-developed-by: Dmitry Safonov Signed-off-by: Dmitry Safonov --- tools/testing/selftests/timens/.gitignore | 2 + tools/testing/selftests/timens/Makefile | 8 +- tools/testing/selftests/timens/gettime_perf.c | 74 +++

[PATCHv4 28/28] selftest/timens: Check that a right vdso is mapped after fork and exec

2019-06-12 Thread Dmitry Safonov
From: Andrei Vagin Signed-off-by: Andrei Vagin Co-developed-by: Dmitry Safonov Signed-off-by: Dmitry Safonov --- tools/testing/selftests/timens/.gitignore | 1 + tools/testing/selftests/timens/Makefile | 2 +- tools/testing/selftests/timens/exec.c | 91 +++ 3

[PATCHv4 18/28] vdso: introduce timens_static_branch

2019-06-12 Thread Dmitry Safonov
From: Andrei Vagin As it has been discussed on timens RFC, adding a new conditional branch `if (inside_time_ns)` on VDSO for all processes is undesirable. Addressing those problems, there are two versions of VDSO's .so: for host tasks (without any penalty) and for processes inside of time

[PATCHv4 22/28] selftest/timens: Add a test for timerfd

2019-06-12 Thread Dmitry Safonov
From: Andrei Vagin Check that timerfd_create() takes into account clock offsets. Signed-off-by: Andrei Vagin Co-developed-by: Dmitry Safonov Signed-off-by: Dmitry Safonov --- tools/testing/selftests/timens/.gitignore | 1 + tools/testing/selftests/timens/Makefile | 2 +-

[PATCHv4 02/28] timens: Add timens_offsets

2019-06-12 Thread Dmitry Safonov
From: Andrei Vagin Introduce offsets for time namespace. They will contain an adjustment needed to convert clocks to/from host's. Allocate one page for each time namespace that will be premapped into userspace among vvar pages. Signed-off-by: Andrei Vagin Co-developed-by: Dmitry Safonov

[PATCHv4 19/28] timens: Add align for timens_offsets

2019-06-12 Thread Dmitry Safonov
Align offsets so that time namespace will work for ia32 applications on x86_64 host. Co-developed-by: Andrei Vagin Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov --- include/linux/timens_offsets.h | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git

[PATCHv4 00/28] kernel: Introduce Time Namespace

2019-06-12 Thread Dmitry Safonov
Discussions around time namespace are there for a long time. The first attempt to implement it was in 2006 by Jeff Dike. From that time, the topic appears on and off in various discussions. There are two main use cases for time namespaces: 1. change date and time inside a container; 2. adjust

  1   2   3   4   5   6   7   8   9   10   >