[PATCH] kvm: Return -ENODEV from update_persistent_clock

2017-10-31 Thread Jason Gunthorpe
kvm does not support setting the RTC, so the correct result is -ENODEV. Returning -1 will cause sync_cmos_clock to keep trying to set the RTC every second. Signed-off-by: Jason Gunthorpe --- arch/x86/kernel/kvmclock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] MAINTAINERS: Remove Rafael from Opal maintainers.

2017-10-31 Thread Scott Bauer
He is no longer working on storage. Signed-off-by: Scott Bauer --- MAINTAINERS | 1 - 1 file changed, 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index af0cb69f6a3e..5c0864d7d7ad 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12052,7 +12052,6 @@ F: drivers/mmc/host/sdhci-spear.c

Re: [v2,04/16] iommu/vt-d: support flushing more TLB types

2017-10-31 Thread Jacob Pan
On Thu, 26 Oct 2017 14:02:13 +0100 "Lukoshkov, Maksim" wrote: > On 10/6/2017 00:03, Jacob Pan wrote: > > Signed-off-by: Jacob Pan > > --- > > drivers/iommu/dmar.c| 53 > > ++--- > > drivers/iommu/intel-iommu.c | 3 ++- include/linux/intel-iommu.h

Re: [PATCH] MAINTAINERS: Remove Rafael from Opal maintainers.

2017-10-31 Thread Jens Axboe
On 10/31/2017 02:15 PM, Scott Bauer wrote: > He is no longer working on storage. Applied, thanks. -- Jens Axboe

RE: [PATCH v4 37/37] selftests: ftrace: Add inter-event hist triggers testcases

2017-10-31 Thread Jingar, Rajvi
Hi Masami, > -Original Message- > From: linux-rt-users-ow...@vger.kernel.org [mailto:linux-rt-users- > ow...@vger.kernel.org] On Behalf Of Masami Hiramatsu > Sent: Tuesday, October 31, 2017 7:29 AM > To: Tom Zanussi > Cc: rost...@goodmis.org; t...@linutronix.de; mhira...@kernel.org; >

[PATCH 1/3] fpga: region: don't use drvdata in common fpga code

2017-10-31 Thread Alan Tull
Part of patchset that changes the following fpga_*_register functions to not set drvdata: * fpga_region_register. * fpga_mgr_register * fpga_bridge_register The rationale is that setting drvdata is fine for DT based devices that will have one manager, bridge, or region per platform device.

[PATCH 2/3] fpga: manager: don't use drvdata in common fpga code

2017-10-31 Thread Alan Tull
Changes to the fpga manager code to not use drvdata in common code. Change fpga_mgr_register to not set or use drvdata. Change the register/unregister function parameters to take the mgr struct: * int fpga_mgr_register(struct device *dev, struct fpga_manager *mgr); * void

[PATCH 3/3] fpga: bridge: don't use drvdata in common fpga code

2017-10-31 Thread Alan Tull
Changes to the fpga bridge code to not use drvdata in common code. Change fpga_bridge_register to not set drvdata. Change the register/unregister functions parameters to take the bridge struct: * int fpga_bridge_register(struct device *dev, struct fpga_bridge *bridge);

[PATCH 0/3] fpga: don't use drvdata in common fpga code

2017-10-31 Thread Alan Tull
This patch set goes on top of the non-dt set that's been on the list since March. This patchset changes the following fpga_*_register functions to not set drvdata: * fpga_region_register. * fpga_mgr_register * fpga_bridge_register Setting drvdata is fine for DT based devices, that will have

linux-next: build failure after merge of the sunxi tree

2017-10-31 Thread Stephen Rothwell
Hi all, After merging the sunxi tree, today's linux-next build (arm multi_v7_defconfig) failed like this: arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dtb: ERROR (phandle_references): Reference to non-existent node or label "reg_gmac_3v3" ERROR: Input tree has errors, aborting (use -f to force

Pull Request for linux-next

2017-10-31 Thread Palmer Dabbelt
I'd like to request that you add the following tree to linux-next git://git.kernel.org/pub/scm/linux/kernel/git/palmer/linux.git for-linux-next It contains the RISC-V port, which has been through 9 rounds of review on various public Linux mailing lists. While the port isn't perfect, I've

linux-next: manual merge of the arm64 tree with Linus' tree

2017-10-31 Thread Stephen Rothwell
Hi Catalin, Today's linux-next merge of the arm64 tree got a conflict in: drivers/acpi/arm64/iort.c between commit: 37f6b42e9c29 ("ACPI/IORT: Fix PCI ACS enablement") from Linus' tree and commit: 896dd2c32484 ("ACPI/IORT: Make platform devices initialization code SMMU agnostic") from

Re: [PATCH v2 04/17] PCI: designware-ep: Pre-allocate memory for MSI in dw_pcie_ep_init

2017-10-31 Thread Niklas Cassel
On 10/31/2017 07:01 AM, Kishon Vijay Abraham I wrote: > Hi Niklas, > > On Monday 30 October 2017 06:12 PM, Niklas Cassel wrote: >> Certain SoCs need to map the MSI address in raise_irq. >> To map an address, you first need to call pci_epc_mem_alloc_addr, >> however, pci_epc_mem_alloc_addr calls

[PATCH] hwmon: xgene: Minor clean up of ifdef and acpi_match_table reference

2017-10-31 Thread Hoan Tran
This patch removes the un-necessary ifdef CONFIG_ACPI and directly uses the acpi_match_table from the driver pdev. Signed-off-by: Hoan Tran --- drivers/hwmon/xgene-hwmon.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/hwmon/xgene-hwmon.c

Re: [PATCH 2/3] fpga: manager: don't use drvdata in common fpga code

2017-10-31 Thread Moritz Fischer
On Tue, Oct 31, 2017 at 08:42:14PM +, Alan Tull wrote: > Changes to the fpga manager code to not use drvdata in common > code. > > Change fpga_mgr_register to not set or use drvdata. > > Change the register/unregister function parameters to take the mgr > struct: > * int

Re: [PATCH 4.9 00/23] 4.9.60-stable review

2017-10-31 Thread Tom Gall
> On Oct 31, 2017, at 4:55 AM, Greg Kroah-Hartman > wrote: > > This is the start of the stable review cycle for the 4.9.60 release. > There are 23 patches in this series, all will be posted as a response > to this one. If anyone has any issues with these being applied, please > let me know. >

[PATCH RESEND] scsi: fnic: Clean up redundant variables

2017-10-31 Thread Christos Gkekas
Remove variables that are set but not used. Signed-off-by: Christos Gkekas --- drivers/scsi/fnic/fnic_fcs.c | 9 - drivers/scsi/fnic/vnic_rq.c | 3 --- drivers/scsi/fnic/vnic_wq.c | 3 --- 3 files changed, 15 deletions(-) diff --git a/drivers/scsi/fnic/fnic_fcs.c

Re: [PATCH v2 06/17] PCI: designware-ep: Add generic function for raising MSI irq

2017-10-31 Thread Niklas Cassel
On 10/31/2017 07:22 AM, Kishon Vijay Abraham I wrote: (snip) >> --- a/drivers/pci/dwc/pcie-designware.h >> +++ b/drivers/pci/dwc/pcie-designware.h >> @@ -106,6 +106,8 @@ >> #define MSI_CAP_MME_MASK(7 << MSI_CAP_MME_SHIFT) >> #define MSI_MESSAGE_ADDR_L320x54 >>

Re: [alsa-devel] [PATCH 08/14] soundwire: Add Slave status handling helpers

2017-10-31 Thread Pierre-Louis Bossart
+ if (found == false) { + /* TODO: Park this device in Group 13 */ + dev_err(bus->dev, "Slave Entry not found"); No break here? Otherwise... Thats intentional. We want to still read next device that show up + } +

Re: Pull Request for linux-next

2017-10-31 Thread Stephen Rothwell
Hi Palmer, On Tue, 31 Oct 2017 13:43:26 -0700 (PDT) Palmer Dabbelt wrote: > > I'd like to request that you add the following tree to linux-next > > git://git.kernel.org/pub/scm/linux/kernel/git/palmer/linux.git > for-linux-next > > It contains the RISC-V port, which has been through 9

Re: [PATCH v2 09/17] PCI: dwc: dra7xx: Add ifdefs for host/ep specific code

2017-10-31 Thread Niklas Cassel
On 10/31/2017 09:29 AM, Kishon Vijay Abraham I wrote: (snip) >> >> +#ifdef CONFIG_PCI_DRA7XX_HOST > > This block can also be moved around the file so that there is a single +#ifdef > CONFIG_PCI_DRA7XX_HOST in this file. Hello Kishon, Sure, will fix in V3. >> static int __init

Nokia N9: fun with camera

2017-10-31 Thread Pavel Machek
Hi! Sakari, I am actually playing with N9 camera, not N950. That comes next. And the clock error I mentioned ... seems to be -EPROBE_DEFER. So... not an issue. Strange thing is, that my sensors seems to have different resolution from yours: - entity 89: smiapp pixel_array 1-0010 (1 pad, 1

[PATCH] selftests: vdso_test: support ARM64 targets

2017-10-31 Thread Greg Hackmann
ARM64's vDSO exports its gettimeofday() implementation with a different name (__kernel_gettimeofday) and version (LINUX_2.6.39) from other architectures. Add a corresponding special-case to vdso_test. Signed-off-by: Greg Hackmann --- tools/testing/selftests/vDSO/vdso_test.c | 17

Re: [PATCH v8 6/6] lib/dlock-list: Add an IRQ-safe mode to be used in interrupt handler

2017-10-31 Thread Davidlohr Bueso
I would drop this patch for being too ugly and if nothing else, for lack of users (epoll will no longer need dlock). Thanks, Davidlohr

Re: Crashes in perf_event_ctx_lock_nested

2017-10-31 Thread Thomas Gleixner
On Tue, 31 Oct 2017, Peter Zijlstra wrote: > On Mon, Oct 30, 2017 at 03:45:12PM -0700, Guenter Roeck wrote: > > I added some logging and a long msleep() in > > hardlockup_detector_perf_cleanup(). > > Here is the result: > > > > [0.274361] NMI watchdog:

Re: [PATCH 4.4 00/20] 4.4.96-stable review

2017-10-31 Thread Tom Gall
> On Oct 31, 2017, at 4:55 AM, Greg Kroah-Hartman > wrote: > > This is the start of the stable review cycle for the 4.4.96 release. > There are 20 patches in this series, all will be posted as a response > to this one. If anyone has any issues with these being applied, please > let me know. >

Re: [PATCH v2 1/2] isofs: fix timestamps beyond 2027

2017-10-31 Thread Arnd Bergmann
On Tue, Oct 31, 2017 at 5:59 PM, Jan Kara wrote: > On Thu 19-10-17 17:29:12, Arnd Bergmann wrote: >> On Thu, Oct 19, 2017 at 5:17 PM, Jan Kara wrote: >> >> >> >> - year = p[0]; >> >> + year = (int)(u8)p[0]; >> > >> > The cast seems unnecessary now? >> > >> >> Sorry, I must have rebased

Re: [PATCH v8 1/6] lib/dlock-list: Distributed and lock-protected lists

2017-10-31 Thread Davidlohr Bueso
On Tue, 31 Oct 2017, Waiman Long wrote: +void dlock_lists_del(struct dlock_list_node *node) +{ + struct dlock_list_head *head; + bool retry; + + do { + head = READ_ONCE(node->head); Boqun had previously pointed this out; you need to WRITE_ONCE() node->head too.

Re: [PATCH v2 09/17] PCI: dwc: dra7xx: Add ifdefs for host/ep specific code

2017-10-31 Thread Niklas Cassel
>>> >>> static int __init dra7xx_pcie_probe(struct platform_device *pdev) >>> { >>> @@ -681,6 +697,7 @@ static int __init dra7xx_pcie_probe(struct >>> platform_device *pdev) >>> dra7xx->link_gen = 2; >>> >>> switch (mode) { >>> +#ifdef CONFIG_PCI_DRA7XX_HOST >>> case

[PATCH] scripts: warn about invalid MAINTAINERS patterns

2017-10-31 Thread Tom Saeger
Add "--pattern-checks" option to get_maintainer.pl to warn about invalid "F" and "X" patterns found in MAINTAINERS file(s). Signed-off-by: Tom Saeger Cc: Joe Perches --- scripts/get_maintainer.pl | 47 +++ 1 file changed, 47 insertions(+) diff --git

Re: 67bb8e999e ("x86/mm: Disable various instrumentations of .."): BUG: -1 unexpected failures (out of 262) - debugging disabled! |

2017-10-31 Thread Fengguang Wu
On Tue, Oct 31, 2017 at 10:09:44AM -0500, Tom Lendacky wrote: On 10/29/2017 8:39 PM, kernel test robot wrote: Greetings, 0day kernel testing robot got the below dmesg and the first bad commit is https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master commit

[PATCH] PM / s2idle: Clear the events_check_enabled flag

2017-10-31 Thread Rajat Jain
Problem: This flag does not get cleared currently in the suspend or resume path in the following cases: * In case some driver's suspend routine returns an error. * Successful s2idle case * etc? Why is this a problem: What happens is that the next suspend attempt could fail even though the user

Re: [PATCH] selftests/ftrace: Introduce exit_pass and exit_fail

2017-10-31 Thread Steven Rostedt
On Tue, 31 Oct 2017 23:51:42 +0900 Masami Hiramatsu wrote: > diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/busy_check.tc > b/tools/testing/selftests/ftrace/test.d/kprobe/busy_check.tc > index 74507db8bbc8..b8701fa0b8f2 100644 > ---

Re: [PATCH 2/3] fpga: manager: don't use drvdata in common fpga code

2017-10-31 Thread Alan Tull
On Tue, Oct 31, 2017 at 3:59 PM, Moritz Fischer wrote: > On Tue, Oct 31, 2017 at 08:42:14PM +, Alan Tull wrote: >> Changes to the fpga manager code to not use drvdata in common >> code. >> >> Change fpga_mgr_register to not set or use drvdata. >> >> Change the register/unregister function

Re: [PATCH] scsi: ibmvscsi: Convert timers to use timer_setup()

2017-10-31 Thread Tyrel Datwyler
On 10/25/2017 03:06 AM, Kees Cook wrote: > In preparation for unconditionally passing the struct timer_list pointer to > all timer callbacks, switch to using the new timer_setup() and from_timer() > to pass the timer pointer explicitly. > > Cc: "Martin K. Petersen" > Cc: Tyrel Datwyler > Cc:

Excessive logging in thunderbolt driver

2017-10-31 Thread Stephen Hemminger
The thunderbolt driver needs to stop logging. All these debug messages and the laptop is on battery with no devices connected. (I did use a USB key, but that is not a thunderbolt device). IMHO a production driver should log nothing in normal operation. If you insist, the one message when device

Re: [lkp-robot] [android/ion] 5fb70554d6: kernel_selftests.android.make_fail

2017-10-31 Thread Laura Abbott
On 10/31/2017 03:21 AM, Pintu Kumar wrote: > On Tue, Oct 31, 2017 at 2:32 AM, Laura Abbott wrote: >> On 10/30/2017 12:12 AM, Pintu Kumar wrote: >>> On Sun, Oct 29, 2017 at 7:51 PM, kernel test robot >>> wrote: FYI, we noticed the following commit (built with gcc-6): commit:

Re: [PATCH] kprobes, x86/alternatives: use text_mutex to protect smp_alt_modules

2017-10-31 Thread Steven Rostedt
On Mon, 30 Oct 2017 17:03:23 +0900 Masami Hiramatsu wrote: > > static LIST_HEAD(smp_alt_modules); > > -static DEFINE_MUTEX(smp_alt); > > -static bool uniproc_patched = false; /* protected by smp_alt */ > > +static bool uniproc_patched = false; /* protected by text_mutex */ We

[PATCH] storvsc: Avoid excessive host scan on controller change

2017-10-31 Thread Long Li
From: Long Li When there are multiple disks attached to the same SCSI controller, the host may send several VSTOR_OPERATION_REMOVE_DEVICE or VSTOR_OPERATION_ENUMERATE_BUS messages in a row, to indicate there is a change on the SCSI controller. In response, storvsc rescans the SCSI host. There

Re: [PATCH] MIPS: microMIPS: Fix incorrect mask in insn_table_MM

2017-10-31 Thread James Hogan
On Tue, Oct 31, 2017 at 07:08:04AM +, James Hogan wrote: > On Tue, Oct 31, 2017 at 12:35:03AM -0500, Gustavo A. R. Silva wrote: > > Signed-off-by: Gustavo A. R. Silva > > Reviewed-by: James Hogan That should of course be: Reviewed-by: James Hogan

Re: [PATCH v4 00/12] arm+arm64: vdso unification to lib/vdso/

2017-10-31 Thread Jon Masters
On 10/31/2017 02:30 PM, Mark Salyzyn wrote: > Take an effort to recode the arm64 vdso code from assembler to C > previously submitted by Andrew Pinski , rework > it for use in both arm and arm64, overlapping any optimizations > for each architecture. But instead of landing it in arm64, land the >

Re: Crashes in perf_event_ctx_lock_nested

2017-10-31 Thread Guenter Roeck
On Tue, Oct 31, 2017 at 10:32:00PM +0100, Thomas Gleixner wrote: [ ...] > So we have to revert > > a33d44843d45 ("watchdog/hardlockup/perf: Simplify deferred event destroy") > > Patch attached. > Tested-by: Guenter Roeck There is still a problem. When running echo 6 >

Re: [tip:core/urgent] futex: Fix more put_pi_state() vs. exit_pi_state_list() races

2017-10-31 Thread Thomas Gleixner
On Tue, 31 Oct 2017, tip-bot for Peter Zijlstra wrote: > Commit-ID: d5f6ac33189af48a0dc011190af5144947a30a76 > Gitweb: > https://git.kernel.org/tip/d5f6ac33189af48a0dc011190af5144947a30a76 > Author: Peter Zijlstra > AuthorDate: Tue, 31 Oct 2017 11:18:53 +0100 > Committer: Ingo Molnar

[RFC] xfs: fix reporting supported extra file attributes for statx()

2017-10-31 Thread Luis R. Rodriguez
statx(2) notes that any attribute that is not indicated as supported by stx_attributes_mask has no usable value. Commit 5f955f26f3d42d ("xfs: report crtime and attribute flags to statx") added support for informing userspace of extra file attributes but forgot to list these flags as supported

Re: [PATCH 04/17] coresight: Add generic TMC sg table framework

2017-10-31 Thread Mathieu Poirier
On Thu, Oct 19, 2017 at 06:15:40PM +0100, Suzuki K Poulose wrote: > This patch introduces a generic sg table data structure and > associated operations. An SG table can be used to map a set > of Data pages where the trace data could be stored by the TMC > ETR. The information about the data pages

Re: [GIT PULL][PATCH 0/7] Timekeeping items for 4.15

2017-10-31 Thread Thomas Gleixner
On Mon, 30 Oct 2017, John Stultz wrote: > Hey Thomas, > Bit later then I'd like, but here's my current queue of > timekeeping items for 4.15. > > >From Arnd's patchset, I'm missing the last patch as it didn't > apply properly, but the rest of it looked ok to me. > > Please let me know if you

[PATCH char-misc 1/1] Drivers: hv: vmbus: Implement Direct Mode for stimer0

2017-10-31 Thread mikelley
From: Michael Kelley The 2016 version of Hyper-V offers the option to operate the guest VM per-vcpu stimer's in Direct Mode, which means the timer interupts on its own vector rather than queueing a VMbus message. Direct Mode reduces timer processing overhead in both the hypervisor and the

Re: WARNING in tracepoint_probe_register_prio

2017-10-31 Thread Steven Rostedt
On Sun, 29 Oct 2017 14:24:01 -0700 syzbot wrote: > syzkaller has found reproducer for the following crash on > 36ef71cae353f88fd6e095e2aaa3e5953af1685d So this fuzzer triggers this. > git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/master > compiler: gcc (GCC) 7.1.1

Re: [RESEND v12 0/6] cgroup-aware OOM killer

2017-10-31 Thread David Rientjes
On Tue, 31 Oct 2017, Michal Hocko wrote: > > I'm not ignoring them, I have stated that we need the ability to protect > > important cgroups on the system without oom disabling all attached > > processes. If that is implemented as a memory.oom_score_adj with the same > > semantics as

[GIT PULL] Power management commit reverts for v4.14

2017-10-31 Thread Rafael J. Wysocki
Hi Linus, Since Geert reports additional problems with my PM QoS fix from the last week that have not been addressed by the most recent fixup on top of it, they both should better be reverted now and let's fix the original issue properly in 4.15. Please pull from the tag

Re: [RFC] xfs: fix reporting supported extra file attributes for statx()

2017-10-31 Thread Darrick J. Wong
On Tue, Oct 31, 2017 at 03:13:05PM -0700, Luis R. Rodriguez wrote: > statx(2) notes that any attribute that is not indicated as supported by > stx_attributes_mask has no usable value. Commit 5f955f26f3d42d ("xfs: report > crtime and attribute flags to statx") added support for informing userspace

Re: [PATCH] genirq: add mutex and rcu locking to irq_desc_tree

2017-10-31 Thread Thomas Gleixner
On Tue, 31 Oct 2017, Masahiro Yamada wrote: > Add a mutex to prevent concurrency on the updater side of the > irq_desc radix tree. The callers of insert/delete are already serialized by sparse_irq_lock. SO why would we need yet another mutex? > Add rcu_read_lock/unlock to the reader side so

Re: WARNING in tracepoint_probe_register_prio

2017-10-31 Thread Jens Axboe
On 10/31/2017 04:21 PM, Steven Rostedt wrote: > On Sun, 29 Oct 2017 14:24:01 -0700 > syzbot > > wrote: > >> syzkaller has found reproducer for the following crash on >> 36ef71cae353f88fd6e095e2aaa3e5953af1685d > > So this fuzzer triggers this. > >>

[PATCH 00/23] KAISER: unmap most of the kernel from userspace page tables

2017-10-31 Thread Dave Hansen
tl;dr: KAISER makes it harder to defeat KASLR, but makes syscalls and interrupts slower. These patches are based on work from a team at Graz University of Technology posted here[1]. The major addition is support for Intel PCIDs which builds on top of Andy Lutomorski's PCID work merged for 4.14.

[PATCH 01/23] x86, kaiser: prepare assembly for entry/exit CR3 switching

2017-10-31 Thread Dave Hansen
This is largely code from Andy Lutomirski. I fixed a few bugs in it, and added a few SWITCH_TO_* spots. KAISER needs to switch to a different CR3 value when it enters the kernel and switch back when it exits. This essentially needs to be done before we leave assembly code. This is extra

[PATCH 18/23] x86, mm: Move CR3 construction functions

2017-10-31 Thread Dave Hansen
For flushing the TLB, we need to know which ASID has been programmed into the hardware. Since that differs from what is in 'cpu_tlbstate', we need to be able to transform the ASID in cpu_tlbstate to the one programmed into the hardware. It's not easy to include mmu_context.h into tlbflush.h, so

[PATCH 23/23] x86, kaiser: add Kconfig

2017-10-31 Thread Dave Hansen
PARAVIRT generally requires that the kernel not manage its own page tables. It also means that the hypervisor and kernel must agree wholeheartedly about what format the page tables are in and what they contain. KAISER, unfortunately, changes the rules and they can not be used together. I've

[PATCH 19/23] x86, mm: remove hard-coded ASID limit checks

2017-10-31 Thread Dave Hansen
First, it's nice to remove the magic numbers. Second, KAISER is going to eat up half of the available ASID space. We do not use it today, but we need to at least spell out this new restriction. Signed-off-by: Dave Hansen Cc: Moritz Lipp Cc: Daniel Gruss Cc: Michael Schwarz Cc: Andy

[PATCH 21/23] x86, pcid, kaiser: allow flushing for future ASID switches

2017-10-31 Thread Dave Hansen
If we change the page tables in such a way that we need an invalidation of all contexts (aka. PCIDs / ASIDs) we can actively invalidate them by: 1. INVPCID for each PCID (works for single pages too). 2. Load CR3 with each PCID without the NOFLUSH bit set 3. Load CR3 with the NOFLUSH bit set

[PATCH 09/23] x86, kaiser: allow NX to be set in p4d/pgd

2017-10-31 Thread Dave Hansen
We protect user portion of the kernel page tables with the NX bit to cripple it. But, that trips the p4d/pgd_bad() checks. Make sure it does not do that. Signed-off-by: Dave Hansen Cc: Moritz Lipp Cc: Daniel Gruss Cc: Michael Schwarz Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Kees Cook

[PATCH 22/23] x86, kaiser: use PCID feature to make user and kernel switches faster

2017-10-31 Thread Dave Hansen
Short summary: Use x86 PCID feature to avoid flushing the TLB at all interrupts and syscalls. Speed them up. Makes context switches and TLB flushing slower. Background: KAISER keeps two copies of the page tables. We switch between them with the the CR3 register. But, CR3 was really designed

[PATCH 17/23] x86, kaiser: map virtually-addressed performance monitoring buffers

2017-10-31 Thread Dave Hansen
From: Hugh Dickins The BTS and PEBS buffers both have their virtual addresses programmed into the hardware. This means that we have to access them via the page tables. The times that the hardware accesses these are entirely dependent on how the performance monitoring hardware events are set

[PATCH 20/23] x86, mm: put mmu-to-h/w ASID translation in one place

2017-10-31 Thread Dave Hansen
We effectively have two ASID types: 1. The one stored in the mmu_context that goes from 0->5 2. The one we program into the hardware that goes from 1->6 Let's just put the +1 in a single place which gives us a nice place to comment. KAISER will also need to, given an ASID, know which hardware

[PATCH 12/23] x86, kaiser: map dynamically-allocated LDTs

2017-10-31 Thread Dave Hansen
Normally, a process just has a NULL mm->context.ldt. But, we have a syscall for a process to set a new one. If a process does that, we need to map the new LDT. The original KAISER patch missed this case. Signed-off-by: Dave Hansen Cc: Moritz Lipp Cc: Daniel Gruss Cc: Michael Schwarz Cc:

[PATCH 15/23] x86, kaiser: map trace interrupt entry

2017-10-31 Thread Dave Hansen
We put all of the interrupt entry/exit code into a special section (.irqentry.text). This enables the ftrace code to figure out when we are in a "grey area" of interrupt handling before the C code has taken over and marked the data structures that we are in an interrupt. KAISER needs to map

[PATCH 14/23] x86, kaiser: map entry stack variables

2017-10-31 Thread Dave Hansen
There are times that we enter the kernel and do not have a safe stack, like at SYSCALL entry. We use the per-cpu vairables 'rsp_scratch' and 'cpu_current_top_of_stack' to save off the old %rsp and find a safe place to have a stack. You can not directly manipulate the CR3 register. You can only

[PATCH 16/23] x86, kaiser: map debug IDT tables

2017-10-31 Thread Dave Hansen
The IDT table it references are another structure where the CPU references a virtual address. It also obviously needs these to handle an interrupt in userspace, so these need to be mapped into the user copy of the page tables. Signed-off-by: Dave Hansen Cc: Moritz Lipp Cc: Daniel Gruss Cc:

Re: [PATCH] PM / QoS: Fix default runtime_pm device resume latency

2017-10-31 Thread Rafael J. Wysocki
On Tue, Oct 31, 2017 at 7:07 PM, Geert Uytterhoeven wrote: > Hi Rafael, > > On Tue, Oct 31, 2017 at 6:22 PM, Rafael J. Wysocki wrote: >> On Tue, Oct 31, 2017 at 2:55 PM, Geert Uytterhoeven >> wrote: >>> Hi Rafael, Tero, >>> >>> CC pinchartl, dri-devel >>> >>> On Tue, Oct 31, 2017 at 2:10 PM,

[PATCH 13/23] x86, kaiser: map espfix structures

2017-10-31 Thread Dave Hansen
We have some rather arcane code to help when we IRET to 16-bit segments: the "espfix" code. This consists of a few per-cpu variables: espfix_stack: tells us where we allocated the stack (the bottom) espfix_waddr: tells us where we can actually point %rsp

[PATCH 08/23] x86, kaiser: only populate shadow page tables for userspace

2017-10-31 Thread Dave Hansen
KAISER has two copies of the page tables: one for the kernel and one for when we are running in userspace. There is also a kernel portion of each of the page tables: the part that *maps* the kernel. The kernel portion is relatively static and uses pre-populated PGDs. Nobody ever calls

[PATCH 07/23] x86, kaiser: unmap kernel from userspace page tables (core patch)

2017-10-31 Thread Dave Hansen
These patches are based on work from a team at Graz University of Technology: https://github.com/IAIK/KAISER . This work would not have been possible without their work as a starting point. KAISER is a countermeasure against side channel attacks against kernel virtual memory. It leaves the

[PATCH 10/23] x86, kaiser: make sure static PGDs are 8k in size

2017-10-31 Thread Dave Hansen
We have a few PGDs that come out of the kernel binary instead of being allocated dynamically. Before this patch, they are all 8k-aligned, but we also need them to be 8k in *size*e The original KAISER patch did not do this. It probably just lucked out that it did not trample over data after the

[PATCH 11/23] x86, kaiser: map GDT into user page tables

2017-10-31 Thread Dave Hansen
The GDT is used to control the x86 segmentation mechanism. It must be virtually mapped when switching segments or at IRET time when switching between userspace and kernel. The original KAISER patch did not do this. I have no ide how it ever worked. Signed-off-by: Dave Hansen Cc: Moritz Lipp

[PATCH 06/23] x86, kaiser: introduce user-mapped percpu areas

2017-10-31 Thread Dave Hansen
These patches are based on work from a team at Graz University of Technology posted here: https://github.com/IAIK/KAISER The KAISER approach keeps two copies of the page tables: one for running in the kernel and one for running userspace. But, there are a few structures that are needed for

Re: [PATCH v2] sched/sysctl: Fix attributes of some extern declarations

2017-10-31 Thread Matthias Kaehlcke
El Tue, Oct 30, 2017 at 10:57:58AM +0100 Ingo Molnar ha dit: > * Matthias Kaehlcke wrote: > > > The definition of sysctl_sched_migration_cost, sysctl_sched_nr_migrate > > and sysctl_sched_time_avg includes the attribute const_debug. This > > attribute is not part of the extern declaration of

[PATCH 05/23] x86, mm: document X86_CR4_PGE toggling behavior

2017-10-31 Thread Dave Hansen
The comment says it all here. The problem here is that the X86_CR4_PGE bit affects all PCIDs in a way that is totally obscure. This makes it easier for someone to find if grepping for PCID- related stuff and documents the hardware behavior that we are depending on. Signed-off-by: Dave Hansen

[PATCH 03/23] x86, kaiser: disable global pages

2017-10-31 Thread Dave Hansen
Global pages stay in the TLB across context switches. Since all contexts share the same kernel mapping, we use global pages to allow kernel entries in the TLB to survive when we context switch. But, even having these entries in the TLB opens up something that an attacker can use [1]. Disable

[PATCH 02/23] x86, kaiser: do not set _PAGE_USER for init_mm page tables

2017-10-31 Thread Dave Hansen
init_mm is for kernel-exclusive use. If someone is allocating page tables in it, do not set _PAGE_USER on them. This ensures that we do *not* set NX on these page tables in the KAISER code. Signed-off-by: Dave Hansen Cc: Moritz Lipp Cc: Daniel Gruss Cc: Michael Schwarz Cc: Andy Lutomirski

[PATCH 04/23] x86, tlb: make CR4-based TLB flushes more robust

2017-10-31 Thread Dave Hansen
Our CR4-based TLB flush currently requries global pages to be supported *and* enabled. But, we really only need for them to be supported. Make the code more robust by alllowing X86_CR4_PGE to clear as well as set. This change was suggested by Kirill Shutemov. Signed-off-by: Dave Hansen Cc:

Re: [PATCH] auxdisplay: Convert timers to use timer_setup()

2017-10-31 Thread Paul Burton
Hi Kees, On Wed, Oct 25, 2017 at 03:22:57AM -0700, Kees Cook wrote: > In preparation for unconditionally passing the struct timer_list pointer to > all timer callbacks, switch to using the new timer_setup() and from_timer() > to pass the timer pointer explicitly. For the whole patch:

Re: [RFC] xfs: fix reporting supported extra file attributes for statx()

2017-10-31 Thread Luis R. Rodriguez
On Tue, Oct 31, 2017 at 3:27 PM, Darrick J. Wong wrote: > On Tue, Oct 31, 2017 at 03:13:05PM -0700, Luis R. Rodriguez wrote: >> statx(2) notes that any attribute that is not indicated as supported by >> stx_attributes_mask has no usable value. Commit 5f955f26f3d42d ("xfs: report >> crtime and

[PATCH v3 02/17] PCI: designware-ep: dw_pcie_ep_set_msi() should only set MMC bits

2017-10-31 Thread Niklas Cassel
Previously, dw_pcie_ep_set_msi() wrote all bits in the Message Control register, thus overwriting the PCI_MSI_FLAGS_64BIT bit. By clearing the PCI_MSI_FLAGS_64BIT bit, we break MSI on systems where the RC has set a 64 bit MSI address. Signed-off-by: Niklas Cassel --- V3: * No change.

[PATCH v3 08/17] PCI: dwc: dra7xx: Assign pp->ops in dra7xx_add_pcie_port() rather than in probe

2017-10-31 Thread Niklas Cassel
This matches how other drivers like exynos, imx7, keystone, armada8k, artpec6, designware-plat, hisi, kirin and spear13xx does it. This is probably a remainder since when dev and ops were assigned as members to pp. Since we now assign them as members to struct dw_pcie, the pp->ops assignment

[PATCH v3 03/17] PCI: designware-ep: Read-only registers need DBI_RO_WR_EN to be writable

2017-10-31 Thread Niklas Cassel
Certain registers that pcie-designware-ep tries to write are read-only registers. However, these registers can become read/write if we first enable the DBI_RO_WR_EN bit. Signed-off-by: Niklas Cassel --- V3: * No change. drivers/pci/dwc/pcie-designware-ep.c | 8 1 file changed, 8

[PATCH v3 06/17] PCI: designware-ep: Add generic function for raising MSI irq

2017-10-31 Thread Niklas Cassel
This function can be used by all DWC based controllers to raise a MSI irq. However, certain controllers, like DRA7xx, has a special convenience register for raising MSI irqs that doesn't require you to explicitly map the MSI address. Signed-off-by: Niklas Cassel --- V3: * No change.

[PATCH v3 12/17] PCI: dwc: artpec6: Split artpec6_pcie_establish_link to smaller functions

2017-10-31 Thread Niklas Cassel
This is done to better match other drivers such as dra7xx and imx6, but also to prepare for endpoint mode support. Signed-off-by: Niklas Cassel --- V3: * No change. drivers/pci/dwc/pcie-artpec6.c | 53 +++--- 1 file changed, 29 insertions(+), 24 deletions(-)

[PATCH v3 05/17] PCI: designware-ep: Remove static keyword from dw_pcie_ep_reset_bar()

2017-10-31 Thread Niklas Cassel
This way pci-dra7xx.c does not need its own copy of dw_pcie_ep_reset_bar(). Signed-off-by: Niklas Cassel Acked-by: Kishon Vijay Abraham I --- V3: * Added Kishon's ack. drivers/pci/dwc/pci-dra7xx.c | 9 - drivers/pci/dwc/pcie-designware-ep.c | 2 +-

[PATCH v3 09/17] PCI: dwc: dra7xx: Add ifdefs for host/ep specific code

2017-10-31 Thread Niklas Cassel
This way you will not build and include unused code when only building for one mode. Moved dra7xx_pcie_enable_wrapper_interrupts() and dra7xx_add_pcie_port() in order to keep all host specific code inside a single ifdef block. Moved dra7xx_pcie_ep_unaligned_memaccess() in order to keep all ep

[PATCH v3 14/17] PCI: dwc: artpec6: Add support for endpoint mode

2017-10-31 Thread Niklas Cassel
Signed-off-by: Niklas Cassel --- V3: * Removed ifdefs around match table and match table data. * Removed ifdefs in probe, use dummy implementations instead. drivers/pci/dwc/Kconfig| 23 -- drivers/pci/dwc/pcie-artpec6.c | 162 +++-- 2 files

[PATCH v3 16/17] bindings: PCI: artpec: Add support for the ARTPEC-7 SoC

2017-10-31 Thread Niklas Cassel
The ARTPEC-6 SoC and the ARTPEC-7 SoC are very similar. Unfortunately, some fields in the PCIECFG and PCIESTAT register have changed. Signed-off-by: Niklas Cassel Acked-by: Rob Herring --- V3: * No change. Documentation/devicetree/bindings/pci/axis,artpec6-pcie.txt | 2 ++ 1 file changed, 2

[PATCH v3 10/17] PCI: dwc: artpec6: Remove unused defines

2017-10-31 Thread Niklas Cassel
Commit b015b37e6693 ("PCI: artpec6: Stop enabling writes to DBI read-only registers") removed the only write using these defines, but it did not remove the defines. Remove the defines since they are now unused. Signed-off-by: Niklas Cassel --- V3: * No change. drivers/pci/dwc/pcie-artpec6.c |

[PATCH v3 17/17] PCI: dwc: artpec6: Add support for the ARTPEC-7 SoC

2017-10-31 Thread Niklas Cassel
The ARTPEC-6 SoC and the ARTPEC-7 SoC are very similar. Unfortunately, some fields in the PCIECFG and PCIESTAT register have changed. Signed-off-by: Niklas Cassel --- V3: * Now when there are no ifdefs around the match table entries, sort them by SoC. drivers/pci/dwc/pcie-artpec6.c | 162

[PATCH 8/9] iscsi: rename iscsi_bus_flash_* to iscsi_flash_*

2017-10-31 Thread Chris Leech
cleanups after the bus to class conversion Signed-off-by: Chris Leech --- drivers/scsi/qla4xxx/ql4_os.c | 52 +- drivers/scsi/scsi_transport_iscsi.c | 102 ++-- include/scsi/scsi_transport_iscsi.h | 48 + 3 files changed,

[PATCH 1/9] iscsi: create per-net iscsi netlink kernel sockets

2017-10-31 Thread Chris Leech
Prepare iSCSI netlink to operate in multiple namespaces. Signed-off-by: Chris Leech --- drivers/scsi/scsi_transport_iscsi.c | 67 +++-- 1 file changed, 57 insertions(+), 10 deletions(-) diff --git a/drivers/scsi/scsi_transport_iscsi.c

[PATCH 9/9] iscsi: filter flashnode sysfs by net namespace

2017-10-31 Thread Chris Leech
Finished the net namespace support for flashnode sysfs devices Signed-off-by: Chris Leech --- drivers/scsi/scsi_transport_iscsi.c | 33 + 1 file changed, 33 insertions(+) diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c

[PATCH 6/9] iscsi: check net namespace for all iscsi lookups

2017-10-31 Thread Chris Leech
All internal lookups of iSCSI transport objects need to be filtered by net namespace. Signed-off-by: Chris Leech --- drivers/infiniband/ulp/iser/iscsi_iser.c | 5 +- drivers/scsi/be2iscsi/be_iscsi.c | 4 +- drivers/scsi/bnx2i/bnx2i_iscsi.c | 4 +-

[PATCH 7/9] iscsi: convert flashnode devices from bus to class

2017-10-31 Thread Chris Leech
The flashnode session and connection devices should be filtered by net namespace along with the iscsi_host, but we can't do that with a bus device. As these don't use any of the bus matching functionality, they make more sense as a class device anyway. Signed-off-by: Chris Leech ---

linux-next: build warning after merge of the xfs tree

2017-10-31 Thread Stephen Rothwell
Hi all, After merging the xfs tree, today's linux-next build (powerpc ppc64_defconfig) produced this warning: fs/xfs/libxfs/xfs_bmap.c: In function 'xfs_bmap_del_extent_delay': fs/xfs/libxfs/xfs_bmap.c:4648:20: warning: unused variable 'ifp' [-Wunused-variable] struct xfs_ifork *ifp =

[PATCH 5/9] iscsi: set netns for iscsi_tcp hosts

2017-10-31 Thread Chris Leech
This lets iscsi_tcp operate in multiple namespaces. It uses current during session creation to find the net namespace, but it might be better to manage to pass it along from the iscsi netlink socket. Signed-off-by: Chris Leech --- drivers/scsi/iscsi_tcp.c| 7 +++

[PATCH 4/9] iscsi: make all iSCSI netlink multicast namespace aware

2017-10-31 Thread Chris Leech
Make use of the per-net netlink sockets. Responses are sent back on the same socket/namespace the request was received on. Async events are reported on the socket/namespace stored in the iscsi_cls_host associated with the event. Signed-off-by: Chris Leech ---

<    4   5   6   7   8   9   10   11   12   13   >