[patch 09/26] posix-timers: Unify overrun/requeue_pending handling

2017-05-30 Thread Thomas Gleixner
hrtimer based posix-timers and posix-cpu-timers handle the update of the rearming and overflow related status fields differently. Move that update to the common rearming code. Signed-off-by: Thomas Gleixner --- kernel/time/posix-cpu-timers.c | 18 +++--- kernel/time/posix-timers.c

[patch 00/26] alarmtimers/posixtimers: Bug fixes and spec conformity changes

2017-05-30 Thread Thomas Gleixner
The syzkaller folks reported an RCU stall while fuzzing the posix timer interface with CLOCK_ALARMTIMER_*. While fixing this issue, I noticed that the posix timer implementation of alarm timers lacks quite some of the features of the regular hrtimer based posix timers. That makes alarm timer base

[patch 02/26] alarmtimer: Rate limit periodic intervals

2017-05-30 Thread Thomas Gleixner
The alarmtimer code has another source of potentially rearming itself too fast. Interval timers with a very samll interval have a similar CPU hog effect as the previously fixed overflow issue. The reason is that alarmtimers do not implement the normal protection against this kind of problem which

[patch 16/26] posix-timers: Add forward/remaining callbacks

2017-05-30 Thread Thomas Gleixner
Add two callbacks to kclock which allow using common_)timer_get() for both hrtimer and alarm timer based clocks. Signed-off-by: Thomas Gleixner --- include/linux/posix-timers.h |2 ++ 1 file changed, 2 insertions(+) --- a/include/linux/posix-timers.h +++ b/include/linux/posix-timers.h @@ -1

[patch 11/26] posix-timers: Store k_clock pointer in k_itimer

2017-05-30 Thread Thomas Gleixner
Having the k_clock pointer in the k_itimer struct avoids the lookup in several code pathes and makes the next steps of unification of the hrtimer and alarmtimer based posix timers simpler. Signed-off-by: Thomas Gleixner --- include/linux/posix-timers.h |2 ++ kernel/time/posix-cpu-timers.c

[patch 17/26] posix-timers: Make use of forward/remaining callbacks

2017-05-30 Thread Thomas Gleixner
Replace the hrtimer calls by calls to the new forward/remaining kclock callbacks and move the hrtimer specific implementation into the corresponding callback functions. Signed-off-by: Thomas Gleixner --- kernel/time/posix-timers.c | 64 ++--- 1 file chan

[patch 12/26] posix-timers: Add timer_rearm() callback

2017-05-30 Thread Thomas Gleixner
Add a timer_rearm() callback which is used to make the rescheduling of posix interval timers independent of the underlying clock implementation. Signed-off-by: Thomas Gleixner --- include/linux/posix-timers.h | 36 1 file changed, 20 insertions(+), 16 delet

[patch 07/26] posix-timers: Cleanup struct k_itimer

2017-05-30 Thread Thomas Gleixner
As a preparation for further changes, cleanup the formatting of the k_itimer structure and add kernel doc comments. Signed-off-by: Thomas Gleixner --- include/linux/posix-timers.h | 61 --- 1 file changed, 40 insertions(+), 21 deletions(-) --- a/include

[patch 08/26] posix-timers: Move posix-timer internals to core

2017-05-30 Thread Thomas Gleixner
None of these declarations is required outside of kernel/time. Move them to an internal header. Signed-off-by: Thomas Gleixner --- include/linux/posix-timers.h | 11 --- kernel/time/alarmtimer.c |2 ++ kernel/time/posix-clock.c |2 ++ kernel/time/posix-cpu-timers.c

[patch 15/26] posix-timers: Add active flag to k_itimer

2017-05-30 Thread Thomas Gleixner
Keep track of the activation state of posix timers. This is a preparatory change for making common_timer_get() usable by both hrtimer and alarm timer implementations. Signed-off-by: Thomas Gleixner --- include/linux/posix-timers.h |2 ++ kernel/time/posix-timers.c |8 +++- 2 files

[patch 20/26] posix-timers: Make use of cancel/arm callbacks

2017-05-30 Thread Thomas Gleixner
Replace the hrtimer calls by calls to the new try_to_cancel()/arm() kclock callbacks and move the hrtimer specific implementation into the corresponding callback functions. Signed-off-by: Thomas Gleixner --- kernel/time/posix-timers.c | 181 - 1 file

[patch 13/26] posix-timers: Rename do_schedule_next_timer

2017-05-30 Thread Thomas Gleixner
That function is a misnomer. Rename it with a proper prefix to posixtimer_rearm(). Signed-off-by: Thomas Gleixner --- include/asm-generic/siginfo.h |2 +- kernel/signal.c|2 +- kernel/time/posix-cpu-timers.c |2 +- kernel/time/posix-timers.c | 10 +- 4

Re: [HMM 07/15] mm/ZONE_DEVICE: new type of ZONE_DEVICE for unaddressable memory v3

2017-05-30 Thread Jerome Glisse
On Tue, May 30, 2017 at 10:43:55AM -0600, Ross Zwisler wrote: > On Wed, May 24, 2017 at 01:20:16PM -0400, Jérôme Glisse wrote: > > HMM (heterogeneous memory management) need struct page to support migration > > from system main memory to device memory. Reasons for HMM and migration to > > device m

[patch 18/26] posix-timers: Zero settings value in common code

2017-05-30 Thread Thomas Gleixner
Zero out the settings struct in the common code so the callbacks do not have to do it themself. Signed-off-by: Thomas Gleixner --- kernel/time/posix-cpu-timers.c |5 + kernel/time/posix-timers.c |3 +-- 2 files changed, 2 insertions(+), 6 deletions(-) --- a/kernel/time/posix-cpu

[patch 22/26] alarmtimer: Implement forward callback

2017-05-30 Thread Thomas Gleixner
Preparatory change to utilize the common posix timer mechanisms. Signed-off-by: Thomas Gleixner --- kernel/time/alarmtimer.c | 13 + 1 file changed, 13 insertions(+) --- a/kernel/time/alarmtimer.c +++ b/kernel/time/alarmtimer.c @@ -549,6 +549,18 @@ static void alarm_timer_rearm(st

[patch 24/26] alarmtimer: Implement try_to_cancel callback

2017-05-30 Thread Thomas Gleixner
Preparatory change to utilize the common posix timer mechanisms. Signed-off-by: Thomas Gleixner --- kernel/time/alarmtimer.c | 10 ++ 1 file changed, 10 insertions(+) --- a/kernel/time/alarmtimer.c +++ b/kernel/time/alarmtimer.c @@ -573,6 +573,15 @@ static ktime_t alarm_timer_remainin

[patch 23/26] alarmtimer: Implement remaining callback

2017-05-30 Thread Thomas Gleixner
Preparatory change to utilize the common posix timer mechanisms. Signed-off-by: Thomas Gleixner --- kernel/time/alarmtimer.c | 31 ++- 1 file changed, 22 insertions(+), 9 deletions(-) --- a/kernel/time/alarmtimer.c +++ b/kernel/time/alarmtimer.c @@ -561,6 +561,18 @

[patch 14/26] posix-timers: Use timer_rearm() callback in posixtimer_rearm()

2017-05-30 Thread Thomas Gleixner
Use the new timer_rearm() callback to replace the conditional hardcoded calls into the hrtimer and cpu timer code. This allows later to bring the same logic to alarmtimers. Signed-off-by: Thomas Gleixner --- kernel/time/posix-cpu-timers.c |7 +-- kernel/time/posix-timers.c | 12 ++

[patch 25/26] alarmtimer: Implement arm callback

2017-05-30 Thread Thomas Gleixner
Preparatory change to utilize the common posix timer mechanisms. Signed-off-by: Thomas Gleixner --- kernel/time/alarmtimer.c | 22 ++ 1 file changed, 22 insertions(+) Index: b/kernel/time/alarmtimer.c === ---

[patch 26/26] alarmtimer: Switch over to generic set/get/rearm routine

2017-05-30 Thread Thomas Gleixner
All required callbacks are in place. Switch the alarm timer based posix interval timer callbacks to the common implementation and remove the incorrect private implementation. Signed-off-by: Thomas Gleixner --- kernel/time/alarmtimer.c | 121 ++--- kerne

Re: [PATCH] acpi: configfs: Unload SSDT on configfs entry removal

2017-05-30 Thread Rafael J. Wysocki
On Tue, May 30, 2017 at 11:16 PM, Moore, Robert wrote: > > >> -Original Message- >> From: Jan Kiszka [mailto:jan.kis...@siemens.com] >> Sent: Monday, May 29, 2017 5:53 AM >> To: Mika Westerberg >> Cc: Rafael J. Wysocki ; Len Brown ; >> Zheng, Lv ; linux-a...@vger.kernel.org; Linux Kernel

[patch 10/26] posix-timers: Move interval out of the union

2017-05-30 Thread Thomas Gleixner
Preparatory patch to unify the alarm timer and hrtimer based posix interval timer handling. The interval is used as a criteria for rearming decisions so moving it out of the clock specific data structures allows later unification. Signed-off-by: Thomas Gleixner --- include/linux/posix-timers.h

[patch 21/26] alarmtimer: Implement timer_rearm() callback

2017-05-30 Thread Thomas Gleixner
Preparatory change to utilize the common posix timer mechanisms. Signed-off-by: Thomas Gleixner --- kernel/time/alarmtimer.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) --- a/kernel/time/alarmtimer.c +++ b/kernel/time/alarmtimer.c @@ -537,6 +537,18 @@ static enum ala

[patch 19/26] posix-timers: Add cancel/arm callbacks

2017-05-30 Thread Thomas Gleixner
Add timer_try_to_cancel() and timer_arm() callbacks to kclock which allow to make common_timer_set() usable by both hrtimer and alarmtimer based clocks. Signed-off-by: Thomas Gleixner --- include/linux/posix-timers.h |3 +++ 1 file changed, 3 insertions(+) Index: b/include/linux/posix-timer

Re: [PATCH] dt-bindings: net: move FMan binding

2017-05-30 Thread Rob Herring
On Thu, May 25, 2017 at 12:57:26PM +, Madalin-Cristian Bucur wrote: > > -Original Message- > > From: David Miller [mailto:da...@davemloft.net] > > Sent: Monday, May 15, 2017 5:31 PM > > Subject: Re: [PATCH] dt-bindings: net: move FMan binding > > > > From: Madalin Bucur > > Date: Mon,

[patch 04/26] posix-timers: Remove unused export of posix_timer_event()

2017-05-30 Thread Thomas Gleixner
Since the removal of the mmtimer driver the export is not longer needed. Signed-off-by: Thomas Gleixner --- kernel/time/posix-timers.c |1 - 1 file changed, 1 deletion(-) --- a/kernel/time/posix-timers.c +++ b/kernel/time/posix-timers.c @@ -442,7 +442,6 @@ int posix_timer_event(struct k_iti

[PATCH v5 2/3] x86/asm: Add suffix macro for GEN_*_RMWcc()

2017-05-30 Thread Kees Cook
The coming x86 refcount protection needs to be able to add trailing instructions to the GEN_*_RMWcc() operations. This extracts the difference between the goto/non-goto cases so the helper macros can be defined outside the #ifdef cases. Additionally adds argument naming to the resulting asm for ref

[PATCH v5 3/3] x86/refcount: Implement fast refcount overflow protection

2017-05-30 Thread Kees Cook
This protection is a modified version of the x86 PAX_REFCOUNT defense from PaX/grsecurity. This speeds up the refcount_t API by duplicating the existing atomic_t implementation with a single instruction added to detect if the refcount has wrapped past INT_MAX (or below 0) resulting in a negative va

[PATCH v5 1/3] refcount: Create unchecked atomic_t implementation

2017-05-30 Thread Kees Cook
Many subsystems will not use refcount_t unless there is a way to build the kernel so that there is no regression in speed compared to atomic_t. This adds CONFIG_REFCOUNT_FULL to enable the full refcount_t implementation which has the validation but is slightly slower. When not enabled, refcount_t u

[PATCH v5 0/3] Implement fast refcount overflow protection

2017-05-30 Thread Kees Cook
A new patch has been added at the start of this series to make the default refcount_t implementation just use an unchecked atomic_t implementation, since many kernel subsystems want to be able to opt out of the full validation, since it includes a small performance overhead. When enabling CONFIG_RE

Re: [PATCH 5/7] pci: use proper name for the R-Car SoC

2017-05-30 Thread Bjorn Helgaas
On Sun, May 28, 2017 at 11:30:48AM +0200, Wolfram Sang wrote: > It is 'R-Car', not 'RCar'. No code or binding changes, only descriptive text. > > Signed-off-by: Wolfram Sang > --- > I suggest this trivial patch should be picked individually per susbsystem. > > Documentation/devicetree/bindings/

Re: [PATCH v4 1/2] dt-bindings: i2c: Add Mediatek MT2701 i2c binding

2017-05-30 Thread Rob Herring
On Mon, May 29, 2017 at 05:30:26PM +0200, Matthias Brugger wrote: g> > > On 26/05/17 09:35, Jun Gao wrote: > > From: Jun Gao > > > > Add MT2701 i2c binding to i2c-mt6577.txt and there is no need to > > modify i2c driver. > > > > Signed-off-by: Jun Gao > > --- > > Documentation/devicetree/bi

Re: [PATCH v8 3/5] i2c: aspeed: added documentation for Aspeed I2C driver

2017-05-30 Thread Rob Herring
On Wed, May 24, 2017 at 11:49:23PM -0700, Brendan Higgins wrote: > Added device tree binding documentation for Aspeed I2C busses. > > Signed-off-by: Brendan Higgins > --- > Changes for v2: > - None > Changes for v3: > - Removed reference to "bus" device tree param > Changes for v4: > - None

Re: [PATCH v8 1/5] irqchip/aspeed-i2c-ic: binding docs for Aspeed I2C Interrupt Controller

2017-05-30 Thread Rob Herring
On Wed, May 24, 2017 at 11:49:21PM -0700, Brendan Higgins wrote: > Added device tree binding documentation for Aspeed I2C Interrupt > Controller. > > Signed-off-by: Brendan Higgins > --- > Added in v6: > - Pulled "aspeed_i2c_controller" out into a interrupt controller since that > is > wha

Re: [PATCH V2 1/3] Documentation: devicetree: add multiple cpu port DSA binding

2017-05-30 Thread Florian Fainelli
On 05/30/2017 03:44 AM, John Crispin wrote: > Extend the DSA binding documentation, adding the new property required > when there is more than one CPU port attached to the switch. > > Cc: Rob Herring > Cc: devicet...@vger.kernel.org > Signed-off-by: John Crispin > --- > Documentation/devicetree

Re: [PATCH v5 0/7] Add kselftest_harness.h

2017-05-30 Thread Shuah Khan
On 05/26/2017 01:09 PM, Kees Cook wrote: > On Fri, May 26, 2017 at 11:43 AM, Mickaël Salaün wrote: >> Hi, >> >> This patch series make the seccomp/test_harness.h more generally available >> [1] >> and update the kselftest documentation in the Sphinx format. It also improve >> the Makefile of secc

Re: [PATCH ALT4 V2 2/2] audit: filter PATH records keyed on filesystem magic

2017-05-30 Thread Paul Moore
On Tue, Apr 4, 2017 at 5:21 AM, Richard Guy Briggs wrote: > Tracefs or debugfs were causing hundreds to thousands of PATH records to > be associated with the init_module and finit_module SYSCALL records on a > few modules when the following rule was in place for startup: > -a always,exit -

[PATCH] mm: add NULL check to avoid potential NULL pointer dereference

2017-05-30 Thread Gustavo A. R. Silva
NULL check at line 1226: if (!pgdat), implies that pointer pgdat might be NULL. Function rollback_node_hotadd() dereference this pointer. Add NULL check to avoid a potential NULL pointer dereference. Addresses-Coverity-ID: 1369133 Signed-off-by: Gustavo A. R. Silva --- mm/memory_hotplug.c | 2 +-

Re: [PATCH ALT4 V2 1/2] audit: show fstype:pathname for entries with anonymous parents

2017-05-30 Thread Paul Moore
On Tue, Apr 4, 2017 at 5:21 AM, Richard Guy Briggs wrote: > Tracefs or debugfs were causing hundreds to thousands of null PATH > records to be associated with the init_module and finit_module SYSCALL > records on a few modules when the following rule was in place for > startup: > -a always

RE: [PATCH] acpi: configfs: Unload SSDT on configfs entry removal

2017-05-30 Thread Moore, Robert
> -Original Message- > From: Jan Kiszka [mailto:jan.kis...@siemens.com] > Sent: Monday, May 29, 2017 5:53 AM > To: Mika Westerberg > Cc: Rafael J. Wysocki ; Len Brown ; > Zheng, Lv ; linux-a...@vger.kernel.org; Linux Kernel > Mailing List ; de...@acpica.org; Moore, > Robert > Subject: R

Re: [RFC 0/3] WhiteEgret LSM module

2017-05-30 Thread Matthew Garrett
On Tue, May 30, 2017 at 08:11:57PM +0900, Masanobu Koike wrote: > An execution-whitelist, simply called whitelist, is a list > of executable components (e.g., applications, libraries) > that are approved to run on a host. The whitelist is used > to decide whether executable components are permitted

Re: [RFC] KVM: SVM: do not drop VMCB CPL to 0 if SS is not present

2017-05-30 Thread Paolo Bonzini
On 30/05/2017 19:35, Roman Penyaev wrote: > On Tue, May 30, 2017 at 4:47 PM, Paolo Bonzini wrote: >> >> >> On 19/05/2017 18:14, Roman Penyaev wrote: >>> 2. A bit complicated, which makes sure the CPL field is preserved across >>>KVM_GET/SET_SREGS calls and makes svm_set_segment() and svm_get

Re: [PATCH net-next 1/7] net: dsa: hide dsa_uses_tagged_protocol code

2017-05-30 Thread kbuild test robot
Hi Vivien, [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Vivien-Didelot/net-dsa-tagger-simplification/20170531-032911 config: ia64-allmodconfig (attached as .config) compiler: ia64-linux-gcc (GCC) 6.2.0 reproduce: wget https://raw.githubuser

[PATCH] NFC: add NULL checks to avoid potential NULL pointer dereference

2017-05-30 Thread Gustavo A. R. Silva
NULL checks at line 457: if (!link0 || !link1) {, implies that both pointers link0 and link1 might be NULL. Function nfcsim_link_free() dereference pointers link0 and link1. Add NULL checks before calling nfcsim_link_free() to avoid a potential NULL pointer dereference. Addresses-Coverity-ID: 1364

[PATCH] drm/panel: st7789v: Add a dependency on the backlight framework

2017-05-30 Thread Maxime Ripard
The driver depends on the backlight functions, but we have no dependency on it in Kconfig. Add this dependency to avoid breakages. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/panel/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/pa

Re: signals: Bug or manpage inconsistency?

2017-05-30 Thread Thomas Gleixner
On Tue, 30 May 2017, Linus Torvalds wrote: > On Tue, May 30, 2017 at 12:35 PM, Thomas Gleixner wrote: > > The reason why I'm looking into that is the silly case with posix interval > > timers dealing with ignored signals. We have to keep these timers self > > rearming because nothing rearms them w

Re: [PATCH net-next v2 6/6] net: dsa: factor skb freeing on xmit

2017-05-30 Thread Florian Fainelli
On 05/30/2017 11:33 AM, Vivien Didelot wrote: > The taggers are currently responsible to free the original SKB if they > made a copy of it, or in case of error. > > This patch simplifies this by freeing the original SKB in the > dsa_slave_xmit caller, but only if an error (NULL) is returned. Is n

Re: [PATCH 0/2] Save and restore pci properties to support FLR

2017-05-30 Thread Bjorn Helgaas
On Tue, May 30, 2017 at 09:25:47AM -0700, Ashok Raj wrote: > Resending Jean's patch so it can be included earlier than his large > SVM commits. Original patch https://patchwork.kernel.org/patch/9593891 > was ack'ed by Bjorn. Let's commit these separately since we need > functionality earlier. > >

Re: [PATCH 2/2] PCI: Save properties required to handle FLR for replay purposes.

2017-05-30 Thread Bjorn Helgaas
On Tue, May 30, 2017 at 09:25:49AM -0700, Ashok Raj wrote: > From: CQ Tang > > Requires: https://patchwork.kernel.org/patch/9593891 > > > After a FLR, pci-states need to be restored. This patch saves PASID features > and PRI reqs cached. > > To: Bjorn Helgaas > To: Joerg Roedel > To: linux-.

Re: signals: Bug or manpage inconsistency?

2017-05-30 Thread Thomas Gleixner
On Tue, 30 May 2017, Linus Torvalds wrote: > On Tue, May 30, 2017 at 10:04 AM, Oleg Nesterov wrote: > > Obviously this is a user-visible change and it can break something. Say, an > > application does sigwaitinfo(SIGCHLD) and SIGCHLD is ignored (SIG_IGN), this > > will no longer work. > > That's

4.12-rc3: tty lockdep splat

2017-05-30 Thread Russell King - ARM Linux
Reproducing this bug is rather easy: ssh in to a target machine running 4.12-rc3 with lockdep enabled, wait for the shell prompt, and hit ^C. Works every time for me. == WARNING: possible circular locking dependency detected 4.12.0-rc3+ #213 Not

Re: [PATCH net-next v2 5/6] net: dsa: remove out_drop label in taggers rcv

2017-05-30 Thread Florian Fainelli
On 05/30/2017 11:33 AM, Vivien Didelot wrote: > Many rcv functions from net/dsa/tag_*.c have a useless out_drop goto > label which simply returns NULL. Kill it in favor of the obvious. Why not > > Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH net-next v2 3/6] net: dsa: remove dsa_uses_tagged_protocol

2017-05-30 Thread Florian Fainelli
On 05/30/2017 11:33 AM, Vivien Didelot wrote: > Since dev->dsa_ptr is a pointer to a dsa_switch_tree, there is no need > to have another inline helper just to check rcv. > > Remove dsa_uses_tagged_protocol and check dsa_ptr && dsa_ptr->rcv > together at the same time. > > Signed-off-by: Vivien Di

[PATCH] HID: asus: Stop underlying hardware on remove

2017-05-30 Thread Carlo Caione
From: Carlo Caione We are missing a call to hid_hw_stop() on the remove hook. Among other things this is causing an Oops when (re-)starting GNOME / upowerd / ... after the module has been already rmmod-ed. Signed-off-by: Carlo Caione --- drivers/hid/hid-asus.c | 2 ++ 1 file changed, 2 inserti

Re: [PATCH net-next v2 2/6] net: dsa: do not cast dst

2017-05-30 Thread Florian Fainelli
On 05/30/2017 11:33 AM, Vivien Didelot wrote: > dsa_ptr is not a void pointer anymore since Nov 2011, as of cf50dcc24f82 > ("dsa: Change dsa_uses_{dsa, trailer}_tags() into inline functions"), > but an explicit dsa_switch_tree pointer, thus remove the (void *) cast. > > Signed-off-by: Vivien Didel

Re: [PATCH net-next v2 1/6] net: dsa: comment hot path requirements

2017-05-30 Thread Florian Fainelli
On 05/30/2017 11:33 AM, Vivien Didelot wrote: > The DSA layer uses inline helpers and copies of the tagging functions > for faster access in hot path. Add comments to detail that. > > Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH v8 4/4] defconfig: PCI: Enable Kirin PCIe defconfig

2017-05-30 Thread Bjorn Helgaas
Subject line: arm64: defconfig: Enable Kirin PCIe (Hint: run "git log --oneline " to see what pattern you should follow) On Fri, May 26, 2017 at 09:53:33AM +0800, Xiaowei Song wrote: > Cc: Guodong Xu > Signed-off-by: Xiaowei Song > --- > arch/arm64/configs/defconfig | 1 + > 1 file changed,

Re: [PATCH v7 3/4] PCI: dwc: kirin: add PCIe Driver for HiSilicon Kirin SoC

2017-05-30 Thread Bjorn Helgaas
Hi Xiaowei, Several trivial cosmetic comments below. On Thu, May 25, 2017 at 11:02:03AM +0800, Xiaowei Song wrote: > Hisilicon PCIe Driver shares the common functions for PCIe dw-host > > The poweron functions is developed on hi3660 SoC, > while Others Functions are common for Kirin series SoCs.

Re: [kernel-hardening] Re: [PATCH v7 2/2] security: tty: make TIOCSTI ioctl require CAP_SYS_ADMIN

2017-05-30 Thread Daniel Micay
> Thanks, I didn't know that android was doing this. I still think this > feature > is worthwhile for people to be able to harden their systems against > this attack > vector without having to implement a MAC. Since there's a capable LSM hook for ioctl already, it means it could go in Yama with pt

Re: [PATCH v5 26/32] x86, drm, fbdev: Do not specify encrypted memory for video mappings

2017-05-30 Thread Tom Lendacky
On 5/16/2017 12:35 PM, Borislav Petkov wrote: On Tue, Apr 18, 2017 at 04:20:56PM -0500, Tom Lendacky wrote: Since video memory needs to be accessed decrypted, be sure that the memory encryption mask is not set for the video ranges. Signed-off-by: Tom Lendacky --- arch/x86/include/asm/vga.h

Re: [PATCH 2/2] PCI: Save properties required to handle FLR for replay purposes.

2017-05-30 Thread Raj, Ashok
On Tue, May 30, 2017 at 02:50:33PM -0500, Bjorn Helgaas wrote: > On Tue, May 30, 2017 at 09:25:49AM -0700, Ashok Raj wrote: > > From: CQ Tang > > > > Requires: https://patchwork.kernel.org/patch/9593891 > > The above patch (9593891) is not in my tree or Linus' tree, so I can't > do anything with

Re: [PATCH net-next v2 4/6] net: dsa: remove unused arguments of tagger rcv

2017-05-30 Thread Vivien Didelot
Florian Fainelli writes: >> Is orig_dev really needed in the tagging implementation, or only in the >> layer above? (dsa_slave_xmit and dsa_switch_rcv.) > > It's needed: > > https://github.com/ffainelli/linux/commits/switch-tag > https://github.com/ffainelli/linux/commit/61f9ca70dd21bb8c1615f9599

Re: [PATCH v7 1/4] PCI: hisi: Add DT binding for PCIe of Kirin SoC series

2017-05-30 Thread Bjorn Helgaas
On Thu, May 25, 2017 at 11:02:01AM +0800, Xiaowei Song wrote: > Signed-off-by: Xiaowei Song > --- > .../devicetree/bindings/pci/kirin-pcie.txt | 49 > ++ > 1 file changed, 49 insertions(+) > create mode 100644 Documentation/devicetree/bindings/pci/kirin-pcie.txt Loo

Re: Q. drm/i915 shrinker, synchronize_rcu_expedited() from handlers

2017-05-30 Thread Hugh Dickins
On Mon, 22 May 2017, Joonas Lahtinen wrote: > On la, 2017-05-20 at 10:56 +0900, J. R. Okajima wrote: > > "J. R. Okajima": > > > > > > I don't know whether the fix is good to me or not yet. I will test your > > > fix, but I am busy now and my test will be a few weeks later. Other > > > people may w

Re: [PATCH net-next v2 4/6] net: dsa: remove unused arguments of tagger rcv

2017-05-30 Thread Florian Fainelli
On 05/30/2017 12:55 PM, Vivien Didelot wrote: > Hi Florian, > > Florian Fainelli writes: > >> I actually have a patch pending that adds support for HW >> insertion/extraction of switch tags (broadcom HW supports that) which >> require the orig_dev to be there so we know what features are support

Re: [PATCH v7 2/4] arm64: dts: hisi: add kirin pcie node

2017-05-30 Thread Bjorn Helgaas
On Thu, May 25, 2017 at 11:02:02AM +0800, Xiaowei Song wrote: > Add PCIe node for hi3660, and add binding documentation. > > Cc: Guodong Xu > Signed-off-by: Xiaowei Song > --- > arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 31 > +++ > 1 file changed, 31 insertions(+)

Re: signals: Bug or manpage inconsistency?

2017-05-30 Thread Linus Torvalds
On Tue, May 30, 2017 at 12:35 PM, Thomas Gleixner wrote: > Right, blocking signals which are not set to SIG_IGN makes perfectly sense. > The > SIG_IGN case is what bothers me. The thing is, the SIG_IGN may not *remain* a SIG_IGN. Put another way, let's say that you are a process that uses signa

Re: [PATCH net-next v2 4/6] net: dsa: remove unused arguments of tagger rcv

2017-05-30 Thread Vivien Didelot
Hi Florian, Florian Fainelli writes: > I actually have a patch pending that adds support for HW > insertion/extraction of switch tags (broadcom HW supports that) which > require the orig_dev to be there so we know what features are supported > by the master network device. Is orig_dev really ne

Re: [PATCH V2 2/3] net-next: dsa: add multi cpu port support

2017-05-30 Thread Vivien Didelot
Hi John, Vivien Didelot writes: >> +int port_cpu = ds->ports[port].upstream; > > ds->ports[port] is p->dp. I misread this part, p is not yet allocated in that chunk, please ignore this one comment ;-) Thanks, Vivien

Re: [PATCH 2/2] PCI: Save properties required to handle FLR for replay purposes.

2017-05-30 Thread Bjorn Helgaas
On Tue, May 30, 2017 at 09:25:49AM -0700, Ashok Raj wrote: > From: CQ Tang > > Requires: https://patchwork.kernel.org/patch/9593891 The above patch (9593891) is not in my tree or Linus' tree, so I can't do anything with this yet. > After a FLR, pci-states need to be restored. This patch saves P

Re: [PATCH v2] xen: don't print error message in case of missing Xenstore entry

2017-05-30 Thread Boris Ostrovsky
On 05/30/2017 02:52 PM, Juergen Gross wrote: > When registering for the Xenstore watch of the node control/sysrq the > handler will be called at once. Don't issue an error message if the > Xenstore node isn't there, as it will be created only when an event > is being triggered. > > Signed-off-by: J

Re: [PATCH V2 2/3] net-next: dsa: add multi cpu port support

2017-05-30 Thread Vivien Didelot
Hi John, John Crispin writes: > +static inline bool dsa_is_upstream_port(struct dsa_switch *ds, int p) > +{ > + return dsa_is_cpu_port(ds, p) || dsa_is_dsa_port(ds, p); > +} This looks confusing to me. What DSA calls an "upstream" port for the moment is the port which goes to the CPU interf

Re: [PATCH-v2 0/5] Hyper-V vPCI: use vPCI protocol version 1.2

2017-05-30 Thread Bjorn Helgaas
On Wed, May 24, 2017 at 01:41:23PM -0700, Jork Loeser wrote: > From: Jork Loeser > > Update the Hyper-V vPCI driver to use the Server-2016 version of the vPCI > protocol, fixing MSI creation and retargeting issues. > > Changes since v1: > - reduced spew in protocol negotiation (Dan Carpenter) >

Re: Yes, people use FOLL_FORCE ;)

2017-05-30 Thread Linus Torvalds
On Tue, May 30, 2017 at 11:54 AM, Keno Fischer wrote: > Hi Linus, > >> But it sounds like your JIT case actually uses it for writing - >> but if you can write a small blurb about it, that would be nice. > > yes, we use it for writing. Happy to describe the scheme in more detail. Ok, I've eff

[PATCH] time: Fix parameter description of try_to_del_timer_sync()

2017-05-30 Thread Peter Meerwald-Stadler
Signed-off-by: Peter Meerwald-Stadler Cc: John Stultz Cc: Thomas Gleixner Cc: triv...@rustcorp.com.au --- kernel/time/timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/time/timer.c b/kernel/time/timer.c index 152a706ef8b8..709a404bd133 100644 --- a/kernel/time/t

Re: [PATCH 1/2] perf/x86/intel: enable CPU ref_cycles for GP counter

2017-05-30 Thread Andi Kleen
> > BTW there's an alternative solution in cycling the NMI watchdog over > > all available CPUs. Then it would eventually cover all. But that's > > less real time friendly than relying on RCU. > > I don't think we need to worry too much about the watchdog being rt > friendly. Robustness is the thi

Re: [PATCH v5] usb: typec: Add a sysfs node to manage port type

2017-05-30 Thread Badhri Jagan Sridharan
Noticed that I accidentally dropped the ABI documentation for the new port_type node during patchset revision. Adding that back and resubmitting the patch. Thanks, Badhri. On Mon, May 29, 2017 at 1:07 PM, Badhri Jagan Sridharan wrote: > Thanks for all the reviews Guenter & Heikki. > Heikki, Is t

[PATCH v6] usb: typec: Add a sysfs node to manage port type

2017-05-30 Thread Badhri Jagan Sridharan
User space applications in some cases have the need to enforce a specific port type(DFP/UFP/DRP). This change allows userspace to attempt setting the desired port type. Low level drivers can however reject the request if the specific port type is not supported. Signed-off-by: Badhri Jagan Sridhara

Re: [net-wireless-orinoco] question about potential null pointer dereference

2017-05-30 Thread Johannes Berg
Hi, > The issue here is that line 56 implies that pointer tfm_michael > might be NULL. If this is the case, there is a potential NULL > pointer dereference at line 52 once pointer tfm_michael is > indirectly dereferenced inside macro SHASH_DESC_ON_STACK(). > > My question is if there is any chanc

Re: signals: Bug or manpage inconsistency?

2017-05-30 Thread Thomas Gleixner
On Tue, 30 May 2017, Linus Torvalds wrote: > On Tue, May 30, 2017 at 6:21 AM, Thomas Gleixner wrote: > > > > Linus, any recollection? > > > > IMO, it's perfectly reasonable to discard ignored signals even when the > > signal is in the blocked mask. When its unblocked and SIG_IGN is replaced > > th

[PATCH v2 0/3] pwm: sun4i: switch to atomic PWM

2017-05-30 Thread Alexandre Belloni
Switch to atomic PWM. The main goal is to properly wait for a period before disabling a channel to ensure the correct level is set on the output. Changes in v2: - fixed remaining checkpatch warnings - split the series to ease reviews - changed the delay handling to ensure the proper amount of t

[PATCH v2 1/3] pwm: sun4i: improve hardware read out

2017-05-30 Thread Alexandre Belloni
Implement .get_state instead of only reading the polarity at probe time. This allows to get the proper state, period and duty cycle. Signed-off-by: Alexandre Belloni --- drivers/pwm/pwm-sun4i.c | 65 ++--- 1 file changed, 46 insertions(+), 19 deletions

[PATCH v2 2/3] pwm: sun4i: switch to atomic PWM

2017-05-30 Thread Alexandre Belloni
Switch the driver to atomic PWM. This makes it easier to wait a proper amount of time when changing the duty cycle before disabling the channel (main use case is switching the duty cycle to 0 before disabling). Signed-off-by: Alexandre Belloni --- drivers/pwm/pwm-sun4i.c | 166 ++

[PATCH v2 3/3] pwm: sun4i: drop legacy callbacks

2017-05-30 Thread Alexandre Belloni
Remove the legacy callbacks .enable(), .disable(), .set_polarity() and .config(). Signed-off-by: Alexandre Belloni --- drivers/pwm/pwm-sun4i.c | 160 1 file changed, 160 deletions(-) diff --git a/drivers/pwm/pwm-sun4i.c b/drivers/pwm/pwm-sun4i.c

Re: [tip:x86/urgent] x86/PAT: Fix Xorg regression on CPUs that don't support PAT

2017-05-30 Thread Bernhard Held
On 05/30/2017 at 07:59 PM, Mikulas Patocka wrote: On Tue, 30 May 2017, Dominik Brodowski wrote: Same boot problem here (Intel(R) Core(TM) i5-5200U CPU on a Dell XPS 13), git-bisected to the same patch... On Mon, May 29, 2017 at 06:50:57PM -0400, Mikulas Patocka wrote: Please do the followin

Re: pull request: linux-firmware: update cxgb4 firmware

2017-05-30 Thread Kyle McMartin
On Sun, May 28, 2017 at 05:29:23PM +0530, Ganesh Goudar wrote: > Hi, > > Kindly pull the new firmware from the following URL. > git://git.chelsio.net/pub/git/linux-firmware.git for-upstream > Pulled, thanks Ganesh. > Thanks > Ganesh > > The following changes since commit c990aae817a1606a1fbeb0

Re: [PATCH V2 2/3] net-next: dsa: add multi cpu port support

2017-05-30 Thread Florian Fainelli
On 05/30/2017 12:15 PM, Florian Fainelli wrote: > Hi John, > > On 05/30/2017 11:37 AM, John Crispin wrote: >> Hi, >> >> the patch series is based on net-next from 12 hours ago and works fine >> on that tree. I compile and runtime tested it quite intensively on >> various boards > > The warning is

Re: [PATCH v5 08/10] x86/hyper-v: use hypercall for remote TLB flush

2017-05-30 Thread Andy Shevchenko
On Tue, May 30, 2017 at 10:17 PM, Jork Loeser wrote: >> > +#define HV_FLUSH_ALL_PROCESSORS0x0001 >> > +#define HV_FLUSH_ALL_VIRTUAL_ADDRESS_SPACES0x0002 >> > +#define HV_FLUSH_NON_GLOBAL_MAPPINGS_ONLY 0x0004 >> > +#define HV_FLUSH_USE_EXTENDED_RANGE_FO

Re: [PATCH v2] arm: eBPF JIT compiler

2017-05-30 Thread Kees Cook
Forwarding this to net-dev and eBPF folks, who weren't on CC... -Kees On Thu, May 25, 2017 at 4:13 PM, Shubham Bansal wrote: > The JIT compiler emits ARM 32 bit instructions. Currently, It supports > eBPF only. Classic BPF is supported because of the conversion by BPF > core. > > This patch is e

Re: signals: Bug or manpage inconsistency?

2017-05-30 Thread Oleg Nesterov
On 05/30, Linus Torvalds wrote: > > On Tue, May 30, 2017 at 10:04 AM, Oleg Nesterov wrote: > > > > I can't comment, I never tried to understand the rationality behind the > > current > > behaviour. But at least the sending path should never drop a blocked SIG_DFL > > signal, there is no other way

RE: [PATCH v5 08/10] x86/hyper-v: use hypercall for remote TLB flush

2017-05-30 Thread Jork Loeser
> -Original Message- > From: Andy Shevchenko [mailto:andy.shevche...@gmail.com] > Sent: Tuesday, May 30, 2017 09:53 > To: Vitaly Kuznetsov > Cc: x...@kernel.org; de...@linuxdriverproject.org; linux- > ker...@vger.kernel.org; KY Srinivasan ; Haiyang Zhang > ; Stephen Hemminger ; > Thomas Gl

Re: [PATCH] Input: synaptics-rmi4 - use %ph to form F34 configuration ID

2017-05-30 Thread Joe Perches
On Tue, 2017-05-30 at 22:04 +0300, Andy Shevchenko wrote: > On Tue, 2017-05-30 at 10:23 -0700, Joe Perches wrote: > > On Tue, 2017-05-30 at 09:59 -0700, Dmitry Torokhov wrote: > > > On Tue, May 30, 2017 at 10:23:58AM +0200, Benjamin Tissoires wrote: > > > > On May 29 2017 or thereabouts, Dmitry Tor

Re: [PATCH V2 2/3] net-next: dsa: add multi cpu port support

2017-05-30 Thread Florian Fainelli
err = dsa_user_parse(port, index, ds); if (err) return err; > > John > > > On 30/05/17 17:38, kbuild test robot wrote: >> Hi John, >> >> [auto build test ERROR on net-next/master] >> [also bui

RE: [PATCH v5 09/10] x86/hyper-v: support extended CPU ranges for TLB flush hypercalls

2017-05-30 Thread Jork Loeser
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Tuesday, May 30, 2017 04:34 > To: x...@kernel.org; de...@linuxdriverproject.org > Cc: linux-kernel@vger.kernel.org; KY Srinivasan ; Haiyang > Zhang ; Stephen Hemminger > ; Thomas Gleixner ; Ingo > Molnar ; H.

Re: [PATCH v2] arm: eBPF JIT compiler

2017-05-30 Thread Kees Cook
On Thu, May 25, 2017 at 4:13 PM, Shubham Bansal wrote: > The JIT compiler emits ARM 32 bit instructions. Currently, It supports > eBPF only. Classic BPF is supported because of the conversion by BPF > core. > > This patch is essentially changing the current implementation of JIT > compiler of Berk

Re: [PATCH 1/2] arm64: allwinner: h5: Add initial NanoPi NEO2 support

2017-05-30 Thread icenowy
在 2017-05-31 01:42,Jagan Teki 写道: From: Jagan Teki NanoPi M1 Plus is designed and developed by FriendlyElec using the Allwinner 64-bit H5 SOC. Copy'n'paste error? NanoPi Neo2 key features - Allwinner H5, Quad-core 64-bit Cortex-A53 - 512MB DDR3 RAM - microSD slot - 10/100/1000M Ethernet -

Re: [PATCH 2/2] clk: bcm2835: Minimise clock jitter for PCM clock

2017-05-30 Thread Stefan Wahren
Hi Phil, > Phil Elwell hat am 30. Mai 2017 um 18:28 geschrieben: > > > Fractional clock dividers generate accurate average frequencies but > with jitter, particularly when the integer divisor is small. > > Introduce a new metric of clock accuracy to penalise clocks with a good > average but wo

Re: perf group read for inherited events

2017-05-30 Thread Vince Weaver
On Tue, 30 May 2017, Peter Zijlstra wrote: > On Tue, May 30, 2017 at 06:57:14AM -0700, Andi Kleen wrote: > > On Tue, May 30, 2017 at 11:45:12AM +0200, Peter Zijlstra wrote: > > > > Or is the simple patch below good enough? > > > > > > The below seems to be the correct thing. It is rather unfortun

Re: [PATCH] Input: synaptics-rmi4 - use %ph to form F34 configuration ID

2017-05-30 Thread Andy Shevchenko
On Tue, 2017-05-30 at 10:23 -0700, Joe Perches wrote: > On Tue, 2017-05-30 at 09:59 -0700, Dmitry Torokhov wrote: > > On Tue, May 30, 2017 at 10:23:58AM +0200, Benjamin Tissoires wrote: > > > On May 29 2017 or thereabouts, Dmitry Torokhov wrote: > > > > > > Or we'd need to introduce %pH I guess.

Re: [PATCH v2 net-next 1/3] perf, bpf: Add BPF support to all perf_event types

2017-05-30 Thread Peter Zijlstra
On Tue, May 30, 2017 at 10:37:46AM -0700, Alexei Starovoitov wrote: > On 5/30/17 9:51 AM, Peter Zijlstra wrote: > > I'm not entirely sure I see how that is required. Should per task not > > already work? The WARN that's there will only trigger if you call them > > on the wrong task, which is somet

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