[PATCH 22/27] Lock down kprobes

2019-03-25 Thread Matthew Garrett
From: David Howells Disallow the creation of kprobes when the kernel is locked down by preventing their registration. This prevents kprobes from being used to access kernel memory, either to make modifications or to steal crypto data. Reported-by: Alexei Starovoitov Signed-off-by: David Howell

[PATCH 14/27] acpi: Ignore acpi_rsdp kernel param when the kernel has been locked down

2019-03-25 Thread Matthew Garrett
From: Josh Boyer This option allows userspace to pass the RSDP address to the kernel, which makes it possible for a user to modify the workings of hardware . Reject the option when the kernel is locked down. Signed-off-by: Josh Boyer Signed-off-by: David Howells cc: Dave Young cc: linux-a...

[PATCH 19/27] Lock down module params that specify hardware parameters (eg. ioport)

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

[PATCH 18/27] Lock down TIOCSSERIAL

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

[PATCH 13/27] ACPI: Limit access to custom_method when the kernel is locked down

2019-03-25 Thread Matthew Garrett
From: Matthew Garrett custom_method effectively allows arbitrary access to system memory, making it possible for an attacker to circumvent restrictions on module loading. Disable it if the kernel is locked down. Signed-off-by: Matthew Garrett Signed-off-by: David Howells cc: linux-a...@vger.ke

[PATCH 11/27] x86: Lock down IO port access when the kernel is locked down

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

[PATCH 10/27] PCI: Lock down BAR access when the kernel is locked down

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

[PATCH 09/27] uswsusp: Disable when the kernel is locked down

2019-03-25 Thread Matthew Garrett
From: Matthew Garrett uswsusp allows a user process to dump and then restore kernel state, which makes it possible to modify the running kernel. Disable this if the kernel is locked down. Signed-off-by: Matthew Garrett Signed-off-by: David Howells Reviewed-by: James Morris cc: linux...@vger.

[PATCH 0/2] PCI/MSI: Remove unused interfaces

2019-03-25 Thread Bjorn Helgaas
From: Bjorn Helgaas pcie-xilinx-nwl.c is the only driver to use mask_msi_irq() and unmask_msi_irq(), which are trivial wrappers around PCI-specific functions. We obviously know we need the PCI versions in this driver, so use them directly, as all the other PCI host controller drivers do, and remo

[PATCH 06/27] kexec_file: split KEXEC_VERIFY_SIG into KEXEC_SIG and KEXEC_SIG_FORCE

2019-03-25 Thread Matthew Garrett
From: Jiri Bohac This is a preparatory patch for kexec_file_load() lockdown. A locked down kernel needs to prevent unsigned kernel images from being loaded with kexec_file_load(). Currently, the only way to force the signature verification is compiling with KEXEC_VERIFY_SIG. This prevents load

[PATCH 2/2] PCI/MSI: Remove unused mask_msi_irq() and unmask_msi_irq()

2019-03-25 Thread Bjorn Helgaas
From: Bjorn Helgaas Change pcie-xilinx-nwl.c to use pci_msi_mask_irq() and pci_msi_unmask_irq() like all other PCI host controller drivers. Remove the now-unused mask_msi_irq() and unmask_msi_irq(). Signed-off-by: Bjorn Helgaas CC: Michal Simek CC: linux-arm-ker...@lists.infradead.org --- dr

[PATCH 1/2] PCI/MSI: Remove unused __write_msi_msg() and write_msi_msg()

2019-03-25 Thread Bjorn Helgaas
From: Bjorn Helgaas Remove unused __write_msi_msg() and write_msi_msg(). These were added by 83a18912b0e8 ("PCI/MSI: Rename write_msi_msg() to pci_write_msi_msg()"), they served their purpose, and they're no longer needed. Signed-off-by: Bjorn Helgaas CC: Jiang Liu# 83a18912b0e8 author

[PATCH 01/27] Add the ability to lock down access to the running kernel image

2019-03-25 Thread Matthew Garrett
From: David Howells Provide a single call to allow kernel code to determine whether the system should be locked down, thereby disallowing various accesses that might allow the running kernel image to be changed including the loading of modules that aren't validly signed with a key we recognise, f

Re: KASAN: use-after-free Read in path_lookupat

2019-03-25 Thread Linus Torvalds
On Mon, Mar 25, 2019 at 3:04 PM Daniel Borkmann wrote: > > I'm fine either way, I think the rcu_destroy_inode would indeed simplify > it nicely. In any case fwiw, here's what I'd have ready for standby on bpf > side and tested as well. Decided to get rid of bpf_evict_inode() entirely > since the o

[PATCH v3] PCI: xilinx: Check for __get_free_pages() failure

2019-03-25 Thread Kangjie Lu
If __get_free_pages() fails, the patch returns -ENOMEM to avoid NULL pointer dereference. Signed-off-by: Kangjie Lu --- v3: remove "unlikely", as suggested by Bjorn Helgaas. v2: caller is redefined to accept the error code, as suggested by Steven Price --- drivers/pci/controller/pcie-xilinx.c |

Re: [PATCH] Bad file pattern in MAINTAINERS section 'SELINUX SECURITY MODULE'

2019-03-25 Thread Casey Schaufler
On 3/25/2019 3:02 PM, Joe Perches wrote: On Mon, 2019-03-25 at 14:58 -0700, Casey Schaufler wrote: The include/linux/selinux.h file has been removed. Remove the entry from the MAINTAINERS file. This looks like it doesn't apply correctly as there are one too many spaces before each context lines

[PATCH v6] tty: 8250: fix a missing check for pci_ioremap_bar

2019-03-25 Thread Aditya Pakki
pci_ioremap_bar could fail. The patch returns in case of failure to acquire IOMEM. It also releases the acquired resource in the exit path. Signed-off-by: Aditya Pakki --- v5: change pci_iounmap to iounmap to pass kbuild errors in other arch v4: Missed resource release in dma_probe failure. v3:

Re: [PATCH v2] PCI/LINK: bw_notification: Do not leave interrupt handler NULL

2019-03-25 Thread Bjorn Helgaas
On Fri, Mar 22, 2019 at 07:36:51PM -0500, Alexandru Gagniuc wrote: > A threaded IRQ with a NULL handler does not work with level-triggered > interrupts. request_threaded_irq() will return an error: > > genirq: Threaded irq requested with handler=NULL and !ONESHOT for irq 16 > pcie_bw_notificat

Re: [PATCH v2] PCI/LINK: bw_notification: Do not leave interrupt handler NULL

2019-03-25 Thread Alex G.
On 3/25/19 5:25 PM, Bjorn Helgaas wrote: On Fri, Mar 22, 2019 at 07:36:51PM -0500, Alexandru Gagniuc wrote: A threaded IRQ with a NULL handler does not work with level-triggered interrupts. request_threaded_irq() will return an error: genirq: Threaded irq requested with handler=NULL and !ONE

Re: [PATCH V2] dt-bindings: imx: update scu resource id headfile

2019-03-25 Thread Rob Herring
On Wed, 20 Feb 2019 12:01:59 +, Anson Huang wrote: > Update i.MX SCU resource ID table according to latest > system controller firmware. > > Latest system controller firmware removes below resources > which are never be used: > IMX_SC_R_DC_0_CAPTURE0 > IMX_SC_R_DC_0_CAPTURE1 >

Re: [PATCH 2/3] soc: qcom: rpmpd: Add QCS404 corners

2019-03-25 Thread Rob Herring
On Wed, 20 Feb 2019 22:44:33 -0800, Bjorn Andersson wrote: > Add the shared cx/mx and the low-power-island's cx and mx power-domains > found on QCS404. > > Signed-off-by: Bjorn Andersson > --- > .../devicetree/bindings/power/qcom,rpmpd.txt | 1 + > drivers/soc/qcom/rpmpd.c

Re: [PATCH] parport: daisy: do not try to load lowlevel driver

2019-03-25 Thread Sudip Mukherjee
Hi Linus, On Mon, Mar 25, 2019 at 9:49 PM Linus Torvalds wrote: > > On Mon, Mar 25, 2019 at 2:13 PM Sudip Mukherjee > wrote: > > > > We do not need to search for ports and bind the initial list of ports > > to daisy driver as daisy driver is always the first driver to use the > > new found parpo

Re: [PATCH 0/4] pid: add pidctl()

2019-03-25 Thread Jonathan Kowalski
On Mon, Mar 25, 2019 at 10:07 PM Daniel Colascione wrote: > > On Mon, Mar 25, 2019 at 2:55 PM Jonathan Kowalski wrote: > > > > On Mon, Mar 25, 2019 at 9:43 PM Joel Fernandes > > wrote: > > > > > > On Mon, Mar 25, 2019 at 10:19:26PM +0100, Jann Horn wrote: > > > > On Mon, Mar 25, 2019 at 10:11 P

Re: [Fix PATCH] cpu/hotplug: Fix bug report when add "nosmt" parameter with CONFIG_HOTPLUG_CPU=N

2019-03-25 Thread Thomas Gleixner
On Mon, 25 Mar 2019, Thomas Gleixner wrote: > That has nothing to do with 'nosmt'. It's a general bug in the rollback > code when HOTPLUG_CPU=n. 'nosmt' is using the rollback mechanism and is > just a reliable way to trigger the problem. This happens in the same way > when the bringup of a CPU fail

Re: [PATCH] rcutorture: Select from only online CPUs

2019-03-25 Thread Joel Fernandes
On Mon, Mar 25, 2019 at 12:42 PM Paul E. McKenney wrote: > > On Mon, Mar 25, 2019 at 12:33:37PM -0400, Joel Fernandes wrote: > > On Mon, Mar 25, 2019 at 11:02 AM Paul E. McKenney > > wrote: > > > > > > On Fri, Mar 22, 2019 at 11:46:19PM -0400, Joel Fernandes (Google) wrote: > > > > The rcutortur

Re: KASAN: use-after-free Read in path_lookupat

2019-03-25 Thread Daniel Borkmann
On 03/25/2019 11:13 PM, Linus Torvalds wrote: > On Mon, Mar 25, 2019 at 3:04 PM Daniel Borkmann wrote: >> >> I'm fine either way, I think the rcu_destroy_inode would indeed simplify >> it nicely. In any case fwiw, here's what I'd have ready for standby on bpf >> side and tested as well. Decided to

Re: [PATCH v2] hv: utils: enhance code for human read

2019-03-25 Thread Jesús Castro
On Mon, Mar 11, 2019 at 06:29:49PM -0600, Jesús Castro wrote: > The if/else block from hvt_op_open function can be written > as a switch/case block, and the bool issue_reset variable > is avoided. > > No functional change made. > > Suggested-by: Joe Perches > Signed-off-by: Jesús Castro > ---

Re: KASAN: use-after-free Read in path_lookupat

2019-03-25 Thread Dave Chinner
On Mon, Mar 25, 2019 at 07:43:32PM +, Al Viro wrote: > On Mon, Mar 25, 2019 at 11:36:01AM -0700, Linus Torvalds wrote: > > Right. Not just move the existing destroy_inode() - because as you > > say, people may not be able to to do that in RCU contect, but split it > > up, and add a "final_free_

Re: KASAN: use-after-free Read in path_lookupat

2019-03-25 Thread Al Viro
On Mon, Mar 25, 2019 at 11:04:53PM +0100, Daniel Borkmann wrote: > +static void bpf_destroy_inode_deferred(struct rcu_head *head) > +{ > + struct inode *inode = container_of(head, struct inode, i_rcu); > + enum bpf_type type; > + > + if (S_ISLNK(inode->i_mode)) > + kfree(in

Re: [PATCH 03/17] fpga: dfl: fme: support 512bit data width PR

2019-03-25 Thread Scott Wood
On Mon, 2019-03-25 at 11:07 +0800, Wu Hao wrote: > In early partial reconfiguration private feature, it only > supports 32bit data width when writing data to hardware for > PR. 512bit data width PR support is an important optimization > for some specific solutions (e.g. XEON with FPGA integrated),

[PATCH v2] ata: dwc_460ex: Avoid potential NULL pointer dereference

2019-03-25 Thread Aditya Pakki
dma_async_tx_descriptor can contain a NULL variable and using it in dmaengine_submit without checking can crash the process. This patch avoids such a scenario. Signed-off-by: Aditya Pakki --- v1: Return error in case of failure to desc variable to avoid hang up. --- drivers/ata/sata_dwc_460ex.c

Re: [PATCH 1/1] x86/mm: Fix limit mmap() of /dev/mem to valid physical addresses

2019-03-25 Thread Thomas Gleixner
Ralph, On Mon, 25 Mar 2019, Ralph Campbell wrote: > On 3/23/19 12:02 PM, Thomas Gleixner wrote: > > > --- a/arch/x86/mm/mmap.c > > > +++ b/arch/x86/mm/mmap.c > > > @@ -230,7 +230,7 @@ bool mmap_address_hint_valid(unsigned long addr, > > > unsigned long len) > > > /* Can we access it for direct r

Re: [PATCH 03/17] fpga: dfl: fme: support 512bit data width PR

2019-03-25 Thread Scott Wood
On Mon, 2019-03-25 at 17:53 -0500, Scott Wood wrote: > On Mon, 2019-03-25 at 11:07 +0800, Wu Hao wrote: > > In early partial reconfiguration private feature, it only > > supports 32bit data width when writing data to hardware for > > PR. 512bit data width PR support is an important optimization > >

Re: [PATCH v2] PCI/LINK: bw_notification: Do not leave interrupt handler NULL

2019-03-25 Thread Bjorn Helgaas
[+cc Borislav] Hi Borislav, sorry; I meant to cc: you when I applied the patch below. I did add a Reported-by for you. On Mon, Mar 25, 2019 at 05:25:02PM -0500, Bjorn Helgaas wrote: > On Fri, Mar 22, 2019 at 07:36:51PM -0500, Alexandru Gagniuc wrote: > > A threaded IRQ with a NULL handler does no

linux-next: build warning after merge of the sound-asoc tree

2019-03-25 Thread Stephen Rothwell
Hi all, After merging the sound-asoc tree, today's linux-next build (x86_64 allmodconfig) produced this warning: sound/soc/codecs/tlv320aic32x4-clk.c: In function 'clk_aic32x4_pll_recalc_rate': sound/soc/codecs/tlv320aic32x4-clk.c:149:38: warning: 'settings.d' may be used uninitialized in this f

Re: KASAN: use-after-free Read in path_lookupat

2019-03-25 Thread Al Viro
On Tue, Mar 26, 2019 at 09:48:23AM +1100, Dave Chinner wrote: > And when it comes to VFS inode reclaim, XFS does not implement > ->evict_inode because there is nothing at the VFS level to do. > And ->destroy_inode ends up doing cleanup work (e.g. freeing on-disk > inodes) which is non-trivial, blo

Re: linux-next: build warning after merge of the vfs tree

2019-03-25 Thread Stephen Rothwell
Hi all, On Mon, 18 Mar 2019 11:00:50 +1100 Stephen Rothwell wrote: > > On Mon, 4 Feb 2019 09:33:34 +1100 Stephen Rothwell > wrote: > > > > After merging the vfs tree, today's linux-next build (arm > > multi_v7_defconfig) produced this warning: > > > > In file included from include/linux/print

Re: linux-next: build warning after merge of the sunxi tree

2019-03-25 Thread Stephen Rothwell
Hi all, On Fri, 22 Mar 2019 08:30:48 +1100 Stephen Rothwell wrote: > > After merging the sunxi tree, today's linux-next build (x86_64 > allmodconfig) produced this warning: > > WARNING: unmet direct dependencies detected for MFD_SUN6I_PRCM > Depends on [n]: HAS_IOMEM [=y] && ARCH_SUNXI > Se

Re: [RFC PATCH 0/10] Another Approach to Use PMEM as NUMA Node

2019-03-25 Thread Brice Goglin
Le 25/03/2019 à 20:29, Dan Williams a écrit : > Perhaps "path" might be a suitable replacement identifier rather than > type. I.e. memory that originates from an ACPI.NFIT root device is > likely "pmem". Could work. What kind of "path" would we get for other types of memory? (DDR, non-ACPI-bas

Re: [PATCH 0/4] pid: add pidctl()

2019-03-25 Thread Daniel Colascione
On Mon, Mar 25, 2019 at 3:37 PM Jonathan Kowalski wrote: > > On Mon, Mar 25, 2019 at 10:07 PM Daniel Colascione wrote: > > > > On Mon, Mar 25, 2019 at 2:55 PM Jonathan Kowalski > > wrote: > > > > > > On Mon, Mar 25, 2019 at 9:43 PM Joel Fernandes > > > wrote: > > > > > > > > On Mon, Mar 25, 2

Re: [PATCH 8/8] vfio/mdev: Improve the create/remove sequence

2019-03-25 Thread Alex Williamson
On Fri, 22 Mar 2019 18:20:35 -0500 Parav Pandit wrote: > There are five problems with current code structure. > 1. mdev device is placed on the mdev bus before it is created in the > vendor driver. Once a device is placed on the mdev bus without creating > its supporting underlying vendor device,

Re: [PATCH 01/10] mm: control memory placement by nodemask for two tier main memory

2019-03-25 Thread Dan Williams
On Mon, Mar 25, 2019 at 12:28 PM Yang Shi wrote: > > > > On 3/23/19 10:21 AM, Dan Williams wrote: > > On Fri, Mar 22, 2019 at 9:45 PM Yang Shi wrote: > >> When running applications on the machine with NVDIMM as NUMA node, the > >> memory allocation may end up on NVDIMM node. This may result in s

[PATCH] Bad file pattern in 'SELINUX SECURITY MODULE'

2019-03-25 Thread Casey Schaufler
The include/linux/selinux.h file has been removed. Remove the entry from the MAINTAINERS file. Signed-off-by: Casey Schaufler --- MAINTAINERS | 1 - 1 file changed, 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 3e5a5d263f29..1039c34dff3c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @

[PATCH] MAINTAINERS: Update entry for EDAC-SKYLAKE

2019-03-25 Thread Luck, Tony
Code refactoring to share some source code with a new EDAC driver resulted in renaming one file (skx_edac.c became skx_base.c) and adding a new file (skx_common.c). Update the file pattern in MAINTAINERS to take account of this change. Reported-by: Joe Perches Fixes: 98f2fc829e3b ("EDAC, skx_eda

Bad file pattern in MAINTAINERS section 'ARM KOMEDA DRM-KMS DRIVER'

2019-03-25 Thread Joe Perches
A file pattern line in this section of the MAINTAINERS file in linux-next does not have a match in the linux source files. This could occur because a matching filename was never added, was deleted or renamed in some other commit. The commits that added and if found renamed or removed the file pat

Re: [RFC PATCH v2 1/3] resource: Request IO port regions from children of ioport_resource

2019-03-25 Thread Bjorn Helgaas
Hi John, On Thu, Mar 21, 2019 at 02:14:08AM +0800, John Garry wrote: > Currently when we request an IO port region, the request is made directly > to the top resource, ioport_resource. Let's be explicit here, e.g., Currently request_region() requests an IO port region directly from the top r

RE: [PATCH 8/8] vfio/mdev: Improve the create/remove sequence

2019-03-25 Thread Parav Pandit
> -Original Message- > From: Alex Williamson > Sent: Monday, March 25, 2019 6:19 PM > To: Parav Pandit > Cc: k...@vger.kernel.org; linux-kernel@vger.kernel.org; > kwankh...@nvidia.com > Subject: Re: [PATCH 8/8] vfio/mdev: Improve the create/remove sequence > > On Fri, 22 Mar 2019 18:2

[PATCH] MAINTAINERS: Fix file pattern for X86 MCE INFRASTRUCTURE

2019-03-25 Thread Luck, Tony
Code restructuring renamed arch/x86/kernel/cpu/mcheck/ to be arch/x86/kernel/cpu/mce/ Update the MAINTAINERS file pattern to account for this change. Fixes: 21afaf181362 ("x86/mce: Streamline MCE subsystem's naming") Reported-by: Joe Perches Signed-off-by: Tony Luck --- MAINTAINERS | 2 +- 1 f

Re: [PATCH 20/27] x86/mmiotrace: Lock down the testmmiotrace module

2019-03-25 Thread Steven Rostedt
On Mon, 25 Mar 2019 15:09:47 -0700 Matthew Garrett wrote: > From: David Howells > > The testmmiotrace module shouldn't be permitted when the kernel is locked > down as it can be used to arbitrarily read and write MMIO space. > > Suggested-by: Thomas Gleixner > Signed-off-by: David Howells cc

Re: [PATCH 01/10] mm: control memory placement by nodemask for two tier main memory

2019-03-25 Thread Yang Shi
On 3/25/19 4:18 PM, Dan Williams wrote: On Mon, Mar 25, 2019 at 12:28 PM Yang Shi wrote: On 3/23/19 10:21 AM, Dan Williams wrote: On Fri, Mar 22, 2019 at 9:45 PM Yang Shi wrote: When running applications on the machine with NVDIMM as NUMA node, the memory allocation may end up on NVDIMM

Re: [RFC PATCH 0/10] Another Approach to Use PMEM as NUMA Node

2019-03-25 Thread Dan Williams
On Mon, Mar 25, 2019 at 4:09 PM Brice Goglin wrote: > > > Le 25/03/2019 à 20:29, Dan Williams a écrit : > > Perhaps "path" might be a suitable replacement identifier rather than > > type. I.e. memory that originates from an ACPI.NFIT root device is > > likely "pmem". > > > Could work. > > What kin

Re: KASAN: use-after-free Read in path_lookupat

2019-03-25 Thread Al Viro
On Mon, Mar 25, 2019 at 02:45:00PM -0700, Linus Torvalds wrote: > On Mon, Mar 25, 2019 at 2:14 PM Al Viro wrote: > > > > Maybe, but we really need to come up with sane documentation on the > > entire drop_inode/evict_inode/destroy_inode/rcu_destroy_inode > > group ;-/ > > Yeah. > > I actually th

Re: [PATCH 0/4] pid: add pidctl()

2019-03-25 Thread Andy Lutomirski
On Mon, Mar 25, 2019 at 9:56 AM David Howells wrote: > > Daniel Colascione wrote: > > > System calls are cheap. > > Only to a point. x86_64 will have an issue when we hit syscall 512. We're > currently at 427. > I don't consider this to be a problem. I have patches to make this problem go awa

Re: [PATCH 12/27] x86/msr: Restrict MSR access when the kernel is locked down

2019-03-25 Thread Thomas Gleixner
Matthew, On Mon, 25 Mar 2019, Matthew Garrett wrote: > From: Matthew Garrett > > Writing to MSRs should not be allowed if the kernel is locked down, since > it could lead to execution of arbitrary code in kernel mode. Based on a > patch by Kees Cook. > > MSR accesses are logged for the purpos

Re: [PATCH 01/10] mm: control memory placement by nodemask for two tier main memory

2019-03-25 Thread Dan Williams
On Mon, Mar 25, 2019 at 4:36 PM Yang Shi wrote: [..] > >>> Hmm, no, I don't think we should do this. Especially considering > >>> current generation NVDIMMs are energy backed DRAM there is no > >>> performance difference that should be assumed by the non-volatile > >>> flag. > >> Actually, here I

Re: pidfd design

2019-03-25 Thread Andy Lutomirski
On Mon, Mar 25, 2019 at 1:23 PM Daniel Colascione wrote: > > On Mon, Mar 25, 2019 at 1:14 PM Jann Horn wrote: > > > > On Mon, Mar 25, 2019 at 8:44 PM Andy Lutomirski wrote: > > One ioctl on procfs roots to translate pidfds into that procfs, > > subject to both the normal lookup permission check

Re: KASAN: use-after-free Read in path_lookupat

2019-03-25 Thread Alexei Starovoitov
On Mon, Mar 25, 2019 at 11:37:32PM +, Al Viro wrote: > > For debugfs it's clearly "use default ->evict_inode(), have explicit > ->destroy_inode() using free_inode_nonrcu()" - there we have nothing > else done in ->evict_inode() and kfree is obviously safe in softirq. > I'll post that (or push

Re: pidfd design

2019-03-25 Thread Christian Brauner
On Mon, Mar 25, 2019 at 04:42:14PM -0700, Andy Lutomirski wrote: > On Mon, Mar 25, 2019 at 1:23 PM Daniel Colascione wrote: > > > > On Mon, Mar 25, 2019 at 1:14 PM Jann Horn wrote: > > > > > > On Mon, Mar 25, 2019 at 8:44 PM Andy Lutomirski wrote: > > > > One ioctl on procfs roots to translate

[PATCH 0/1] RFC: security: add SECURE_KEEP_FSUID to preserve fsuid/fsgid across execve

2019-03-25 Thread Igor Lubashev
This patch introduces SECURE_KEEP_FSUID to allow fsuid/fsgid to be preserved across execve. I ran into a need for a patch trying to implement a set-uid-root wrapper for perf. My set-uid-root wrapper implements local policies, allowing only certain users to run perf and only with certain arguments.

Re: [PATCH] Bad file pattern in 'SELINUX SECURITY MODULE'

2019-03-25 Thread Paul Moore
On Mon, Mar 25, 2019 at 7:21 PM Casey Schaufler wrote: > The include/linux/selinux.h file has been removed. > Remove the entry from the MAINTAINERS file. > > Signed-off-by: Casey Schaufler > --- > MAINTAINERS | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/MAINTAINERS b/MAINTAINERS > ind

Re: [PATCH v19,RESEND 24/27] x86/vdso: Add __vdso_sgx_enter_enclave() to wrap SGX enclave transitions

2019-03-25 Thread Andy Lutomirski
On Sun, Mar 24, 2019 at 1:59 AM Xing, Cedric wrote: > > Hi Andy, > > Thank you for your valuable feedbacks! > > Per what you have been saying, your feedbacks come from different angles - > i.e. functionality vs. security, but they are mixed up somehow. I think you're misunderstanding me. I'm no

[PATCH] MAINTAINERS: Add entry for EDAC-I10NM

2019-03-25 Thread Luck, Tony
We forgot to update the MAINTAINERS file when adding this new driver. Fixes: d4dc89d069aa ("EDAC, i10nm: Add a driver for Intel 10nm server processors") Signed-off-by: Tony Luck --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index e5f3230d3f1

[PATCH] regulator: sc2731: Constify regulators

2019-03-25 Thread Axel Lin
The regulators array should never need to be modified, make it const so compiler can put it to .rodata. Signed-off-by: Axel Lin --- drivers/regulator/sc2731-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/sc2731-regulator.c b/drivers/regulator/s

Re: [PATCH v19,RESEND 24/27] x86/vdso: Add __vdso_sgx_enter_enclave() to wrap SGX enclave transitions

2019-03-25 Thread Andy Lutomirski
On Mon, Mar 25, 2019 at 11:03 AM Sean Christopherson wrote: > > On Sun, Mar 24, 2019 at 01:59:48AM -0700, Xing, Cedric wrote: > > As said in my previous email, this vDSO API isn't even compliant to > > x86_64 ABI and is absolutely NOT for average developers. Instead, > > host/enclave communication

Re: pidfd design

2019-03-25 Thread Andy Lutomirski
On Mon, Mar 25, 2019 at 4:45 PM Christian Brauner wrote: > > On Mon, Mar 25, 2019 at 04:42:14PM -0700, Andy Lutomirski wrote: > > On Mon, Mar 25, 2019 at 1:23 PM Daniel Colascione wrote: > > > > > > On Mon, Mar 25, 2019 at 1:14 PM Jann Horn wrote: > > > > > > > > On Mon, Mar 25, 2019 at 8:44 PM

Re: [PATCH V3 01/23] perf/x86: Support outputting XMM registers

2019-03-25 Thread Thomas Gleixner
On Mon, 25 Mar 2019, Liang, Kan wrote: > On 3/23/2019 5:56 AM, Peter Zijlstra wrote: > > On Fri, Mar 22, 2019 at 10:22:50AM -0700, Andi Kleen wrote: > > > > > diff --git a/arch/x86/include/uapi/asm/perf_regs.h > > > > > b/arch/x86/include/uapi/asm/perf_regs.h > > > > > index f3329cabce5c..b33995313

Re: [PATCH 8/8] vfio/mdev: Improve the create/remove sequence

2019-03-25 Thread Alex Williamson
On Mon, 25 Mar 2019 23:34:28 + Parav Pandit wrote: > > -Original Message- > > From: Alex Williamson > > Sent: Monday, March 25, 2019 6:19 PM > > To: Parav Pandit > > Cc: k...@vger.kernel.org; linux-kernel@vger.kernel.org; > > kwankh...@nvidia.com > > Subject: Re: [PATCH 8/8] vfio/md

[PATCH 1/1] RFC: security: add SECURE_KEEP_FSUID to preserve fsuid/fsgid across execve

2019-03-25 Thread Igor Lubashev
Many kernel interfaces require real and/or effective root uid instead of relying solely of capabilities. An executable that uses such interfaces has to be set-uid-root or be executed by a thread with effective root uid. Presently, fsuid and saved uid will reset to the effective uid during execve. A

Re: [PATCH V3 01/23] perf/x86: Support outputting XMM registers

2019-03-25 Thread Thomas Gleixner
On Fri, 22 Mar 2019, kan.li...@linux.intel.com wrote: > > + PERF_REG_X86_XMM15 = 62, > + > + /* All registers include the XMMX registers */ > + PERF_REG_X86_MAX = PERF_REG_X86_XMM15 + 2, Ergo: PERF_REG_X86_MAX == 64 > -#define REG_RESERVED (~((1ULL << PERF_REG_X86_MAX) - 1ULL)) > +#d

Re: pidfd design

2019-03-25 Thread Christian Brauner
On Mon, Mar 25, 2019 at 05:00:17PM -0700, Andy Lutomirski wrote: > On Mon, Mar 25, 2019 at 4:45 PM Christian Brauner > wrote: > > > > On Mon, Mar 25, 2019 at 04:42:14PM -0700, Andy Lutomirski wrote: > > > On Mon, Mar 25, 2019 at 1:23 PM Daniel Colascione > > > wrote: > > > > > > > > On Mon, Mar

[PATCH v2 1/1] x86/mm: Fix limit mmap() of /dev/mem to valid physical addresses

2019-03-25 Thread rcampbell
From: Ralph Campbell valid_phys_addr_range() is used to sanity check the physical address range of an operation, e.g., access to /dev/mem. It uses __pa(high_memory) internally. If memory is populated at the end of the physical address space, then __pa(high_memory) is outside of the physical addr

[PATCH v2 0/1] x86/mm: Fix limit mmap() of /dev/mem to valid physical

2019-03-25 Thread rcampbell
From: Ralph Campbell I was debugging with v5.1.0-rc1 and while booting I hit a kernel BUG at arch/x86/mm/physaddr.c:27 which I fixed with the following patch but now I can't seem to reproduce the exact setup that triggered it. Still, it seems like a valid problem and maybe my difficulty in reprod

Re: KASAN: use-after-free Read in path_lookupat

2019-03-25 Thread Al Viro
On Mon, Mar 25, 2019 at 04:44:40PM -0700, Alexei Starovoitov wrote: > On Mon, Mar 25, 2019 at 11:37:32PM +, Al Viro wrote: > > > > For debugfs it's clearly "use default ->evict_inode(), have explicit > > ->destroy_inode() using free_inode_nonrcu()" - there we have nothing > > else done in ->ev

Re: pidfd design

2019-03-25 Thread Andy Lutomirski
On Mon, Mar 25, 2019 at 5:12 PM Christian Brauner wrote: > > On Mon, Mar 25, 2019 at 05:00:17PM -0700, Andy Lutomirski wrote: > > On Mon, Mar 25, 2019 at 4:45 PM Christian Brauner > > wrote: > > > > > > On Mon, Mar 25, 2019 at 04:42:14PM -0700, Andy Lutomirski wrote: > > > > On Mon, Mar 25, 2019

Re: [PATCH 25/27] debugfs: Restrict debugfs when the kernel is locked down

2019-03-25 Thread Greg Kroah-Hartman
On Mon, Mar 25, 2019 at 03:09:52PM -0700, Matthew Garrett wrote: > From: David Howells > > Disallow opening of debugfs files that might be used to muck around when > the kernel is locked down as various drivers give raw access to hardware > through debugfs. Given the effort of auditing all 2000

Re: [PATCH 25/27] debugfs: Restrict debugfs when the kernel is locked down

2019-03-25 Thread Matthew Garrett
On Mon, Mar 25, 2019 at 5:35 PM Greg Kroah-Hartman wrote: > On Mon, Mar 25, 2019 at 03:09:52PM -0700, Matthew Garrett wrote: > > Normal device interaction should be done through configfs, sysfs or a > > miscdev, not debugfs. > > Then why not just not allow debugfs at all if it is such a "big > pro

Re: [RESEND PATCH v6 04/12] x86/fsgsbase/64: Enable FSGSBASE instructions in the helper functions

2019-03-25 Thread Andi Kleen
>So on user space to kernel space transitions swapping in kernel GS should >simply do: > userGS = RDGSBASE() > WRGSBASE(kernelGS) This would also need to find kernelGS first, by doing RDPID and then reading it from memory in the right index (which might be a full cache miss if y

Re: [RESEND PATCH v6 00/12] x86: Enable FSGSBASE instructions

2019-03-25 Thread Andy Lutomirski
On Fri, Mar 15, 2019 at 1:07 PM Chang S. Bae wrote: > > Updates from v5 [5]: > * Drop the new tain flag (TAINT_INSECURE) > * Cleanup copy_thread_tls(), some changelog, and unnecessary comments on > assembly macros > * Rearrange some helper updates appropriately (from patch 4 to 6) I think this

Re: [PATCH 02/17] fpga: dfl: fme: align PR buffer size per PR datawidth

2019-03-25 Thread Wu Hao
On Mon, Mar 25, 2019 at 12:50:40PM -0500, Alan Tull wrote: > On Sun, Mar 24, 2019 at 10:23 PM Wu Hao wrote: > > Hi Hao, > > Looks good, one question below. > > > > > Current driver checks if input bitstream file size is aligned or > > not per PR data width (default 32bits). It requires one addi

Re: [PATCH 25/27] debugfs: Restrict debugfs when the kernel is locked down

2019-03-25 Thread Greg Kroah-Hartman
On Mon, Mar 25, 2019 at 05:38:09PM -0700, Matthew Garrett wrote: > On Mon, Mar 25, 2019 at 5:35 PM Greg Kroah-Hartman > wrote: > > On Mon, Mar 25, 2019 at 03:09:52PM -0700, Matthew Garrett wrote: > > > Normal device interaction should be done through configfs, sysfs or a > > > miscdev, not debugfs

[PATCH v2 bpf-next 01/21] bpf: Add base proto function for cgroup-bpf programs

2019-03-25 Thread Andrey Ignatov
Currently kernel/bpf/cgroup.c contains only one program type and one proto function cgroup_dev_func_proto(). It'd be useful to have base proto function that can be reused for new cgroup-bpf program types coming soon. Introduce cgroup_base_func_proto(). Signed-off-by: Andrey Ignatov --- kernel/b

Re: "cat /proc/lockdep" after "rmmod " when !debug_locks will crash the system

2019-03-25 Thread Bart Van Assche
On 3/25/19 5:27 PM, shenghui wrote: On 3/26/19 1:06 AM, Bart Van Assche wrote: On Mon, 2019-03-25 at 17:45 +0800, shenghui wrote: [ 47.103637] vboxdrv: loading out-of-tree module taints kernel. [ 47.111919] vboxdrv: Found 2 processor cores [ 47.119013] vboxdrv: fAsync=0 offMin=0x2ee offMa

RE: [PATCH V9 1/5] dt-bindings: pwm: Add i.MX TPM PWM binding

2019-03-25 Thread Anson Huang
Hi, Rob Best Regards! Anson Huang > -Original Message- > From: Rob Herring [mailto:r...@kernel.org] > Sent: 2019年3月26日 4:42 > To: Anson Huang > Cc: thierry.red...@gmail.com; mark.rutl...@arm.com; > shawn...@kernel.org; s.ha...@pengutronix.de; ker...@pengutronix.de; > feste...@gmail.com;

Re: [RFC PATCH 3/3] arch/x86/acrn: add hypercall for acrn_hypervisor

2019-03-25 Thread Zhao, Yakui
On 2019年03月25日 16:30, Thomas Gleixner wrote: On Mon, 25 Mar 2019, Zhao, Yakui wrote: -Original Message- From: Thomas Gleixner [mailto:t...@linutronix.de] Sent: Saturday, March 23, 2019 12:02 AM To: Zhao, Yakui Cc: linux-kernel@vger.kernel.org; x...@kernel.org; Chen, Jason CJ Subje

Re: [RFC PATCH 2/3] arch/x86/acrn: Use HYPERVISOR_CALLBACK_VECTOR for Acrn upcall vector

2019-03-25 Thread Zhao, Yakui
On 2019年03月25日 16:27, Thomas Gleixner wrote: On Mon, 25 Mar 2019, Zhao, Yakui wrote: +/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _ASM_X86_ACRNHYPER_H +#define _ASM_X86_ACRNHYPER_H + +#include +#include + +#ifdef CONFIG_ACRN +/* ACRN Hypervisor callback */ +void acrn_hv_callback_vector(v

Re: [BACKPORT 4.4.y 02/25] ALSA: compress: add support for 32bit calls in a 64bit kernel

2019-03-25 Thread Greg KH
On Fri, Mar 22, 2019 at 04:43:53PM +0100, Arnd Bergmann wrote: > From: Ravindra Lokhande > > Compress offload does not support ioctl calls from a 32bit userspace > in a 64 bit kernel. This patch adds support for ioctls from a 32bit > userspace in a 64bit kernel > > Signed-off-by: Ravindra Lokhan

Re: [BACKPORT 4.4.y 01/25] mmc: pwrseq: constify mmc_pwrseq_ops structures

2019-03-25 Thread Greg KH
On Fri, Mar 22, 2019 at 04:43:52PM +0100, Arnd Bergmann wrote: > From: Julia Lawall > > The mmc_pwrseq_ops structures are never modified, so declare them as const. > > Done with the help of Coccinelle. > > Signed-off-by: Julia Lawall > Signed-off-by: Ulf Hansson > (cherry picked from commit f

Re: [BACKPORT 4.4.y 19/25] serial: sprd: adjust TIMEOUT to a big value

2019-03-25 Thread Greg KH
On Fri, Mar 22, 2019 at 04:44:10PM +0100, Arnd Bergmann wrote: > From: Wei Qiao > > SPRD_TIMEOUT was 256, which is too small to wait until the status > switched to workable in a while loop, so that the earlycon could > not work correctly. > > Signed-off-by: Wei Qiao > Signed-off-by: Chunyan Zha

Re: [BACKPORT 4.4.y 04/25] USB: iowarrior: fix oops with malicious USB descriptors

2019-03-25 Thread Greg Kroah-Hartman
On Fri, Mar 22, 2019 at 04:43:55PM +0100, Arnd Bergmann wrote: > From: Josh Boyer > > The iowarrior driver expects at least one valid endpoint. If given > malicious descriptors that specify 0 for the number of endpoints, > it will crash in the probe function. Ensure there is at least > one endp

Re: [BACKPORT 4.4.y 17/25] mmc: core: don't try to switch block size for dual rate mode

2019-03-25 Thread Greg KH
On Fri, Mar 22, 2019 at 04:44:08PM +0100, Arnd Bergmann wrote: > From: Ziyuan Xu > > Per spec, block size should always be 512 bytes for dual rate mode, > so any attempts to switch the block size under dual rate mode should > be neglected. > > Signed-off-by: Ziyuan Xu > Signed-off-by: Shawn Lin

Re: [BACKPORT 4.4.y 20/25] Hang/soft lockup in d_invalidate with simultaneous calls

2019-03-25 Thread Greg KH
On Fri, Mar 22, 2019 at 04:44:11PM +0100, Arnd Bergmann wrote: > From: Al Viro > > It's not hard to trigger a bunch of d_invalidate() on the same > dentry in parallel. They end up fighting each other - any > dentry picked for removal by one will be skipped by the rest > and we'll go for the next

Re: [RFC PATCH] mm: readahead: add readahead_shift into backing device

2019-03-25 Thread Fengguang Wu
On Mon, Mar 25, 2019 at 09:59:31AM -0700, Mark Salyzyn wrote: On 03/25/2019 05:16 AM, Fengguang Wu wrote: Martin, On Fri, Mar 22, 2019 at 11:46:11PM +0800, Martin Liu wrote: As the discussion https://lore.kernel.org/patchwork/patch/334982/ We know an open file's ra_pages might run out of sync

Re: [BACKPORT 4.4.y 21/25] arm64: traps: disable irq in die()

2019-03-25 Thread Greg KH
On Fri, Mar 22, 2019 at 04:44:12PM +0100, Arnd Bergmann wrote: > From: Qiao Zhou > > In current die(), the irq is disabled for __die() handle, not > including the possible panic() handling. Since the log in __die() > can take several hundreds ms, new irq might come and interrupt > current die().

Re: [BACKPORT 4.4.y 23/25] serial: sprd: clear timeout interrupt only rather than all interrupts

2019-03-25 Thread Greg KH
On Fri, Mar 22, 2019 at 04:44:14PM +0100, Arnd Bergmann wrote: > From: Lanqing Liu > > On Spreadtrum's serial device, nearly all of interrupts would be cleared > by hardware except timeout interrupt. This patch removed the operation > of clearing all interrupt in irq handler, instead added an if

Re: [PATCH -next] ring-buffer: Fix ring buffer size in rb_write_something

2019-03-25 Thread Steven Rostedt
On Sun, 23 Sep 2018 12:11:33 + YueHaibing wrote: > 'cnt' should be used to calculate ring buffer size rather than data->cnt I just found this patch in my inbox (was traveling at the time. But now I have patchwork attached to my INBOX so patches like these shouldn't be missed anymore!) Yes,

Re: [BACKPORT 4.4.y 24/25] lib/int_sqrt: optimize small argument

2019-03-25 Thread Greg KH
On Fri, Mar 22, 2019 at 04:44:15PM +0100, Arnd Bergmann wrote: > From: Peter Zijlstra > > The current int_sqrt() computation is sub-optimal for the case of small > @x. Which is the interesting case when we're going to do cumulative > distribution functions on idle times, which we assume to be a

ceph: fix use-after-free on symlink traversal

2019-03-25 Thread Al Viro
free the symlink body after the same RCU delay we have for freeing the struct inode itself, so that traversal during RCU pathwalk wouldn't step into freed memory. Signed-off-by: Al Viro --- diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index e3346628efe2..2d61ddda9bf5 100644 --- a/fs/ceph/inode.

jffs2: fix use-after-free on symlink traversal

2019-03-25 Thread Al Viro
free the symlink body after the same RCU delay we have for freeing the struct inode itself, so that traversal during RCU pathwalk wouldn't step into freed memory. Signed-off-by: Al Viro --- diff --git a/fs/jffs2/readinode.c b/fs/jffs2/readinode.c index 389ea53ea487..bccfc40b3a74 100644 --- a/fs

[PATCH 0/3] tracing: introduce TRACE_EVENT_NONE and use it

2019-03-25 Thread Yafang Shao
In this patchset, I introduce a new macro TRACE_EVENT_NONE(), which will define a tracepoint as a do-nothing inline function. #define TRACE_EVENT_NONE(name, proto) \ static inline void trace_##name(proto) \ { }

[PATCH 1/3] tracing: introduce TRACE_EVENT_NONE()

2019-03-25 Thread Yafang Shao
Sometimes we want define a tracepoint as a do-nothing function. So I introduce this TRACE_EVENT_NONE() for this kind of usage. Signed-off-by: Yafang Shao --- include/linux/tracepoint.h | 8 include/trace/define_trace.h | 4 2 files changed, 12 insertions(+) diff --git a/include/

<    5   6   7   8   9   10   11   12   >