Re: [PATCH 5.1 00/98] 5.1.13-stable review

2019-06-21 Thread Greg Kroah-Hartman
On Fri, Jun 21, 2019 at 05:45:58PM -0700, Guenter Roeck wrote: > On 6/20/19 10:56 AM, Greg Kroah-Hartman wrote: > > This is the start of the stable review cycle for the 5.1.13 release. > > There are 98 patches in this series, all will be posted as a response > > to this one. If anyone has any

Re: [GIT] Networking

2019-06-21 Thread Bhaskar Chowdhury
ROFL bots gets confused ...we are blurring the boundaries Linus...:) On 22:36 Fri 21 Jun , Linus Torvalds wrote: On Fri, Jun 21, 2019 at 10:30 PM wrote: The pull request you sent on Fri, 21 Jun 2019 21:21:37 -0400 (EDT): > (unable to parse the git remote) This "unable to parse the git

Re: [PATCH 15/15] kbuild: compile test UAPI headers to ensure they are self-contained

2019-06-21 Thread Masahiro Yamada
; > > GSYMS \ > > > > This change seems to have caused a minor regression: > > > > $ make clean ; make clean > > find: ‘*’: No such file or directory > > Hmm, I cannot reproduce this. > > I checked the latest linux-next. > > > masahiro@grover

Re: [GIT] Networking

2019-06-21 Thread Linus Torvalds
On Fri, Jun 21, 2019 at 10:30 PM wrote: > > The pull request you sent on Fri, 21 Jun 2019 21:21:37 -0400 (EDT): > > > (unable to parse the git remote) This "unable to parse the git remote" is apparently because the pull request had an extraneous ':' in the remote description

Re: [PATCH] staging: kpc2000: Fix: fix platform_no_drv_owner.cocci warnings

2019-06-21 Thread Greg Kroah-Hartman
On Sat, Jun 22, 2019 at 03:04:08AM +0800, kbuild test robot wrote: > From: kbuild test robot > > drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c:200:3-8: No need to set > .owner here. The core will do it. > > Remove .owner field if calls are used which set it automatically > > Generated by:

Re: [GIT] Networking

2019-06-21 Thread pr-tracker-bot
The pull request you sent on Fri, 21 Jun 2019 21:21:37 -0400 (EDT): > (unable to parse the git remote) has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/c356dc4b540edd6c02b409dd8cf3208ba2804c38 Thank you! -- Deet-doot-dot, I am a bot.

Re: Steam is broken on new kernels

2019-06-21 Thread Linus Torvalds
On Fri, Jun 21, 2019 at 6:03 PM Pierre-Loup A. Griffais wrote: > > I applied Eric's path to the tip of the branch and ran that kernel and > the bug didn't occur through several logout / login cycles, so things > look good at first glance. I'll keep running that kernel and report back > if

Re: [PATCH v2 13/28] drivers: Introduce class_find_device_by_of_node() helper

2019-06-21 Thread Peter Rosin
On 2019-06-14 19:54, Suzuki K Poulose wrote: > Add a wrapper to class_find_device() to search for a device > by the of_node pointer, reusing the generic match function. > Also convert the existing users to make use of the new helper. > > Cc: Alan Tull > Cc: Moritz Fischer > Cc:

Re: [PATCH V6 2/3] PCI: dwc: Cleanup DBI read and write APIs

2019-06-21 Thread Jingoo Han
On 6/21/19, 8:10 PM, Vidya Sagar wrote: > > Cleanup DBI read and write APIs by removing "__" (underscore) from their > names as there are no no-underscore versions and the underscore versions > are already doing what no-underscore versions typically do. It also removes > passing dbi/dbi2 base

Re: [PATCH 15/15] kbuild: compile test UAPI headers to ensure they are self-contained

2019-06-21 Thread Masahiro Yamada
e or directory Hmm, I cannot reproduce this. I checked the latest linux-next. masahiro@grover:~/ref/linux-next$ git describe next-20190621 masahiro@grover:~/ref/linux-next$ make clean; make clean masahiro@grover:~/ref/linux-next$ > Any idea? > > Arnd -- Best Regards Masahiro Yamada

PLEASE THIS IS VERY URGENT.

2019-06-21 Thread Mr. Karim Zongo
Compliment of the day, I am Mr. Karim Zongo Have a Business Proposal of $5.3 million For You. I am aware of the unsafe nature of the internet, and was compelled to use this medium due to the nature of this project. I have access to very vital information that can be used to transfer this huge

[PATCH v3 0/2] [v4.9.y] coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping

2019-06-21 Thread Ajay Kaher
coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping [PATCH v3 1/2]: Backporting of commit 04f5866e41fb70690e28397487d8bd8eea7d712a upstream. [PATCH v3 2/2]: Extension of commit 04f5866e41fb to fix the race condition between get_task_mm() and core dumping for

[PATCH v3 2/2][v4.9.y] coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping

2019-06-21 Thread Ajay Kaher
This patch is the extension of following upstream commit to fix the race condition between get_task_mm() and core dumping for IB->mlx4 and IB->mlx5 drivers: commit 04f5866e41fb ("coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping")' Thanks to Jason for pointing

[PATCH v3 1/2] [v4.9.y] coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping

2019-06-21 Thread Ajay Kaher
From: Andrea Arcangeli commit 04f5866e41fb70690e28397487d8bd8eea7d712a upstream. The core dumping code has always run without holding the mmap_sem for writing, despite that is the only way to ensure that the entire vma layout will not change from under it. Only using some signal serialization

Re: [PATCH v6 4/6] khugepaged: rename collapse_shmem() and khugepaged_scan_shmem()

2019-06-21 Thread Song Liu
> On Jun 21, 2019, at 8:11 PM, Hillf Danton wrote: > > > Hello > > On Fri, 21 Jun 2019 17:05:10 -0700 Song Liu wrote: >> Next patch will add khugepaged support of non-shmem files. This patch >> renames these two functions to reflect the new functionality: >> >>collapse_shmem()

[PATCH v2] tomoyo: Don't check open/getattr permission on sockets.

2019-06-21 Thread Tetsuo Handa
On 2019/06/19 5:49, Al Viro wrote: > On Sun, Jun 16, 2019 at 03:49:00PM +0900, Tetsuo Handa wrote: >> Hello, Al. >> >> Q1: Do you agree that we should fix TOMOYO side rather than SOCKET_I()->sk >> management. > > You do realize that sockets are not unique in that respect, right? > All kinds

Re: [PATCH v5 0/2] Two-stagged initial page table setup

2019-06-21 Thread Anup Patel
On Fri, Jun 7, 2019 at 11:31 AM Anup Patel wrote: > > This patchset implements two-stagged initial page table setup using fixmap > to avoid mapping non-existent RAM and also reduce high_memory consumed by > initial page tables. > > The patchset is based on Linux-5.2-rc3 and tested on SiFive

Re: [PATCH] cpuidle/drivers/mobile: Add new governor for mobile/embedded systems

2019-06-21 Thread kbuild test robot
Hi Daniel, I love your patch! Perhaps something to improve: [auto build test WARNING on pm/linux-next] [also build test WARNING on v5.2-rc5 next-20190621] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci

Re: [PATCH 7/7] powerpc/kprobes: Allow probing on any ftrace address

2019-06-21 Thread Joe Perches
On Fri, 2019-06-21 at 23:50 +0900, Masami Hiramatsu wrote: > On Tue, 18 Jun 2019 20:17:06 +0530 > "Naveen N. Rao" wrote: trivia: > > diff --git a/arch/powerpc/kernel/kprobes-ftrace.c > > b/arch/powerpc/kernel/kprobes-ftrace.c [] > > @@ -57,6 +82,11 @@ NOKPROBE_SYMBOL(kprobe_ftrace_handler); >

RE: [PATCH v3 0/5] net: macb: cover letter

2019-06-21 Thread Parshuram Raju Thombare
Hi Andrew, >On Fri, Jun 21, 2019 at 09:33:57AM +0100, Parshuram Thombare wrote: >> Hello ! >> >> 2. 0002-net-macb-add-support-for-sgmii-MAC-PHY-interface.patch >>This patch add support for SGMII mode. > >Hi Parshuram > >What PHYs are using to test this? You mention TI PHY DP83867, but that

Re: [PATCH-next] mm, memcg: Add ":deact" tag for reparented kmem caches in memcg_slabinfo

2019-06-21 Thread Shakeel Butt
On Fri, Jun 21, 2019 at 10:30 AM Waiman Long wrote: > > With Roman's kmem cache reparent patch, multiple kmem caches of the same > type can be seen attached to the same memcg id. All of them, except > maybe one, are reparent'ed kmem caches. It can be useful to tag those > reparented caches by

Re: [PATCH v2] riscv: dts: Add DT node for SiFive FU540 Ethernet controller driver

2019-06-21 Thread Troy Benjegerdes
> On Jun 21, 2019, at 7:33 PM, Troy Benjegerdes > wrote: > > > >> On Jun 21, 2019, at 4:59 PM, Atish Patra wrote: >> >> On Fri, 2019-06-21 at 14:46 -0700, Atish Patra wrote: >>> On Fri, 2019-06-21 at 14:18 -0500, Troy Benjegerdes wrote: Can you post the fsbl and other images you

Re: [PATCH] ARM: dts: msm8974-FP2: add reboot-mode node

2019-06-21 Thread Brian Masney
On Fri, Jun 21, 2019 at 09:25:17PM +0200, Luca Weiss wrote: > On Freitag, 21. Juni 2019 02:01:22 CEST you wrote: > > I think that it makes sense to put this snippet in qcom-msm8974.dtsi > > with a status of disabled, and then enable it in > > qcom-msm8974-fairphone-fp2.dts like so: > > > >

[PATCH 2/2] remoteproc: qcom: q6v5-mss: Support loading non-split images

2019-06-21 Thread Bjorn Andersson
In some software releases the firmware images are not split up with each loadable segment in it's own file. Check the size of the loaded firmware to see if it still contains each segment to be loaded, before falling back to the split-out segments. Signed-off-by: Bjorn Andersson ---

[PATCH 1/2] soc: qcom: mdt_loader: Support loading non-split images

2019-06-21 Thread Bjorn Andersson
In some software releases the firmware images are not split up with each loadable segment in it's own file. Check the size of the loaded firmware to see if it still contains each segment to be loaded, before falling back to the split-out segments. Signed-off-by: Bjorn Andersson ---

[PATCH 0/2] soc: qcom: mdt_loader: Support loading non-split firmware

2019-06-21 Thread Bjorn Andersson
Typically the firmware files for the various remoteprocs is split in a number of files. But in some releases these files are available in their unsplit form. Extend the mdt loader to detect the unsplit firmware and load it transparently. Also expose the function that compose the metadata header

[GIT] Networking

2019-06-21 Thread David Miller
1) Fix leak of unqueued fragments in ipv6 nf_defrag, from Guillaume Nault. 2) Don't access the DDM interface unless the transceiver implements it in bnx2x, from Mauro S. M. Rodrigues. 3) Don't double fetch 'len' from userspace in sock_getsockopt(), from JingYi Hou. 4) Sign extension

[Linux-kernel-mentees] [PATCH v4 RESEND] Media: Radio: Change devm_k*alloc to k*alloc

2019-06-21 Thread Luke Nowakowski-Krijger
Change devm_k*alloc to k*alloc to manually allocate memory The manual allocation and freeing of memory is necessary because when the USB radio is disconnected, the memory associated with devm_k*alloc is freed. Meaning if we still have unresolved references to the radio device, then we get

Re: [PATCH 2/4] null_blk: add zone open, close, and finish support

2019-06-21 Thread Damien Le Moal
On 2019/06/21 22:07, Matias Bjørling wrote: > From: Ajay Joshi > > Implement REQ_OP_ZONE_OPEN, REQ_OP_ZONE_CLOSE and REQ_OP_ZONE_FINISH > support to allow explicit control of zone states. > > Signed-off-by: Ajay Joshi > Signed-off-by: Matias Bjørling > --- > drivers/block/null_blk.h |

Re: Steam is broken on new kernels

2019-06-21 Thread Pierre-Loup A. Griffais
On 6/21/19 5:19 PM, Eric Dumazet wrote: On Fri, Jun 21, 2019 at 7:54 PM Linus Torvalds wrote: Eric is talking about this patch, I think: https://patchwork.ozlabs.org/patch/1120222/ That is correct. I am about to take a flight from Boston to Paris, so I can not really follow

[PATCH] platform/chrome: cros_ec_lpc: fix semicolon.cocci warnings

2019-06-21 Thread kbuild test robot
From: kbuild test robot drivers/platform/chrome/wilco_ec/event.c:161:3-4: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: 22c040fa21b6 ("platform/chrome: cros_ec_lpc: Choose Microchip EC at runtime") Signed-off-by: kbuild test

[PATCH] platform/chrome: cros_ec_lpc: fix stream_open.cocci warnings

2019-06-21 Thread kbuild test robot
From: kbuild test robot drivers/platform/chrome/wilco_ec/event.c:270:1-17: WARNING: event_fops: .read() has stream semantic; safe to change nonseekable_open -> stream_open. Generated by: scripts/coccinelle/api/stream_open.cocci Fixes: 22c040fa21b6 ("platform/chrome: cros_ec_lpc: Choose

Re: [PATCH 5.1 00/98] 5.1.13-stable review

2019-06-21 Thread Guenter Roeck
On 6/20/19 10:56 AM, Greg Kroah-Hartman wrote: This is the start of the stable review cycle for the 5.1.13 release. There are 98 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. Responses should be made

Re: [PATCH 4.19 00/61] 4.19.54-stable review

2019-06-21 Thread Guenter Roeck
On 6/20/19 10:56 AM, Greg Kroah-Hartman wrote: This is the start of the stable review cycle for the 4.19.54 release. There are 61 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. Responses should be

Re: [PATCH 4.14 00/45] 4.14.129-stable review

2019-06-21 Thread Guenter Roeck
On 6/20/19 10:57 AM, Greg Kroah-Hartman wrote: This is the start of the stable review cycle for the 4.14.129 release. There are 45 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. Responses should be

Re: [PATCH 4.9 000/117] 4.9.183-stable review

2019-06-21 Thread Guenter Roeck
On 6/20/19 10:55 AM, Greg Kroah-Hartman wrote: This is the start of the stable review cycle for the 4.9.183 release. There are 117 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. Responses should be

Re: [PATCH 4.4 00/84] 4.4.183-stable review

2019-06-21 Thread Guenter Roeck
On 6/20/19 10:55 AM, Greg Kroah-Hartman wrote: This is the start of the stable review cycle for the 4.4.183 release. There are 84 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. Responses should be

[PATCH v1 3/3] PM / devfreq: Add required OPPs support to passive governor

2019-06-21 Thread Saravana Kannan
Look at the required OPPs of the "parent" device to determine the OPP that is required from the slave device managed by the passive governor. This allows having mappings between a parent device and a slave device even when they don't have the same number of OPPs. Signed-off-by: Saravana Kannan

[PATCH v1 0/3] Add required-opps support to devfreq passive gov

2019-06-21 Thread Saravana Kannan
The devfreq passive governor scales the frequency of a "child" device based on the current frequency of a "parent" device (not parent/child in the sense of device hierarchy). As of today, the passive governor requires one of the following to work correctly: 1. The parent and child device have the

[PATCH v1 2/3] OPP: Add function to look up required OPP's for a given OPP

2019-06-21 Thread Saravana Kannan
Add a function that allows looking up required OPPs given a source OPP table, destination OPP table and the source OPP. Signed-off-by: Saravana Kannan --- drivers/opp/core.c | 54 ++ include/linux/pm_opp.h | 11 + 2 files changed, 65

[PATCH v1 1/3] OPP: Allow required-opps even if the device doesn't have power-domains

2019-06-21 Thread Saravana Kannan
A Device-A can have a (minimum) performance requirement on another Device-B to be able to function correctly. This performance requirement on Device-B can also change based on the current performance level of Device-A. The existing required-opps feature fits well to describe this need. So,

Re: [PATCH v2] riscv: dts: Add DT node for SiFive FU540 Ethernet controller driver

2019-06-21 Thread Troy Benjegerdes
> On Jun 21, 2019, at 4:59 PM, Atish Patra wrote: > > On Fri, 2019-06-21 at 14:46 -0700, Atish Patra wrote: >> On Fri, 2019-06-21 at 14:18 -0500, Troy Benjegerdes wrote: >>> Can you post the fsbl and other images you used to boot/test this? >>> >> > > Resending it without the attachment.

Re: [RFC PATCH RT 3/4] rcu: unlock special: Treat irq and preempt disabled the same

2019-06-21 Thread Paul E. McKenney
On Thu, Jun 20, 2019 at 06:08:19PM -0500, Scott Wood wrote: > On Thu, 2019-06-20 at 15:25 -0700, Paul E. McKenney wrote: > > On Thu, Jun 20, 2019 at 04:59:30PM -0500, Scott Wood wrote: > > > On Thu, 2019-06-20 at 14:10 -0700, Paul E. McKenney wrote: > > > > On Tue, Jun 18, 2019 at 08:19:07PM

[v2 PATCH 0/2] mm: mempolicy: fix mbind()'s inconsistent behavior for unmovable pages

2019-06-21 Thread Yang Shi
Changelog v2: * Fixed the inconsistent behavior by not aborting !vma_migratable() immediately by a separate patch (patch 1/2), and this is also the preparation for patch 2/2. For the details please see the commit log. Per Vlastimil. * Not abort immediately if unmovable

[v2 PATCH 2/2] mm: mempolicy: handle vma with unmovable pages mapped correctly in mbind

2019-06-21 Thread Yang Shi
When running syzkaller internally, we ran into the below bug on 4.9.x kernel: kernel BUG at mm/huge_memory.c:2124! invalid opcode: [#1] SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 0 PID: 1518 Comm: syz-executor107 Not tainted 4.9.168+ #2 Hardware name:

[v2 PATCH 1/2] mm: mempolicy: make the behavior consistent when MPOL_MF_MOVE* and MPOL_MF_STRICT were specified

2019-06-21 Thread Yang Shi
When both MPOL_MF_MOVE* and MPOL_MF_STRICT was specified, mbind() should try best to migrate misplaced pages, if some of the pages could not be migrated, then return -EIO. There are three different sub-cases: 1. vma is not migratable 2. vma is migratable, but there are unmovable pages 3. vma is

Re: Steam is broken on new kernels

2019-06-21 Thread Eric Dumazet
On Fri, Jun 21, 2019 at 7:54 PM Linus Torvalds wrote: > > Eric is talking about this patch, I think: > >https://patchwork.ozlabs.org/patch/1120222/ > That is correct. I am about to take a flight from Boston to Paris, so I can not really follow discussions/tests for the following hours.

[PATCH V34 14/29] ACPI: Limit access to custom_method when the kernel is locked down

2019-06-21 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:

[PATCH V34 16/29] acpi: Disable ACPI table override if the kernel is locked down

2019-06-21 Thread Matthew Garrett
From: Linn Crosetto >From the kernel documentation (initrd_table_override.txt): If the ACPI_INITRD_TABLE_OVERRIDE compile option is true, it is possible to override nearly any ACPI table provided by the BIOS with an instrumented, modified one. When lockdown is enabled, the kernel should

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

2019-06-21 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 ---

[PATCH V34 13/29] x86/msr: Restrict MSR access when the kernel is locked down

2019-06-21 Thread Matthew Garrett
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. Signed-off-by: Matthew Garrett Signed-off-by: David Howells Acked-by: Kees Cook Reviewed-by: Thomas

[PATCH V34 22/29] Lock down tracing and perf kprobes when in confidentiality mode

2019-06-21 Thread Matthew Garrett
From: David Howells Disallow the creation of perf and ftrace kprobes when the kernel is locked down in confidentiality mode by preventing their registration. This prevents kprobes from being used to access kernel memory to steal crypto data, but continues to allow the use of kprobes from signed

[PATCH v6 3/6] mm,thp: stats for file backed THP

2019-06-21 Thread Song Liu
In preparation for non-shmem THP, this patch adds a few stats and exposes them in /proc/meminfo, /sys/bus/node/devices//meminfo, and /proc//task//smaps. This patch is mostly a rewrite of Kirill A. Shutemov's earlier version: https://lkml.org/lkml/2017/1/26/284. Acked-by: Rik van Riel

[PATCH v6 5/6] mm,thp: add read-only THP support for (non-shmem) FS

2019-06-21 Thread Song Liu
This patch is (hopefully) the first step to enable THP for non-shmem filesystems. This patch enables an application to put part of its text sections to THP via madvise, for example: madvise((void *)0x60, 0x20, MADV_HUGEPAGE); We tried to reuse the logic for THP on tmpfs. Currently,

[PATCH v6 4/6] khugepaged: rename collapse_shmem() and khugepaged_scan_shmem()

2019-06-21 Thread Song Liu
Next patch will add khugepaged support of non-shmem files. This patch renames these two functions to reflect the new functionality: collapse_shmem()=> collapse_file() khugepaged_scan_shmem() => khugepaged_scan_file() Acked-by: Rik van Riel Signed-off-by: Song Liu ---

[PATCH V34 27/29] tracefs: Restrict tracefs when the kernel is locked down

2019-06-21 Thread Matthew Garrett
Tracefs may release more information about the kernel than desirable, so restrict it when the kernel is locked down in confidentiality mode by preventing open(). Signed-off-by: Matthew Garrett Cc: Steven Rostedt --- fs/tracefs/inode.c | 43 +++-

[PATCH v6 6/6] mm,thp: avoid writes to file with THP in pagecache

2019-06-21 Thread Song Liu
In previous patch, an application could put part of its text section in THP via madvise(). These THPs will be protected from writes when the application is still running (TXTBSY). However, after the application exits, the file is available for writes. This patch avoids writes to file THP by

[PATCH V34 26/29] debugfs: Restrict debugfs when the kernel is locked down

2019-06-21 Thread Matthew Garrett
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 or so files and manually fixing each one as necessary, I've chosen to

[PATCH v6 1/6] filemap: check compound_head(page)->mapping in filemap_fault()

2019-06-21 Thread Song Liu
Currently, filemap_fault() avoids trace condition with truncate by checking page->mapping == mapping. This does not work for compound pages. This patch let it check compound_head(page)->mapping instead. Acked-by: Rik van Riel Signed-off-by: Song Liu --- mm/filemap.c | 2 +- 1 file changed, 1

[PATCH V34 29/29] lockdown: Print current->comm in restriction messages

2019-06-21 Thread Matthew Garrett
Print the content of current->comm in messages generated by lockdown to indicate a restriction that was hit. This makes it a bit easier to find out what caused the message. The message now patterned something like: Lockdown: : is restricted; see man kernel_lockdown.7 Signed-off-by:

[PATCH v6 0/6] Enable THP for text section of non-shmem files

2019-06-21 Thread Song Liu
Changes v5 => v6: 1. Improve THP stats in 3/6, (Kirill). Changes v4 => v5: 1. Move the logic to drop THP from pagecache to open() path (Rik). 2. Revise description of CONFIG_READ_ONLY_THP_FOR_FS. Changes v3 => v4: 1. Put the logic to drop THP from pagecache in a separate function (Rik). 2. Move

[PATCH v6 2/6] filemap: update offset check in filemap_fault()

2019-06-21 Thread Song Liu
With THP, current check of offset: VM_BUG_ON_PAGE(page->index != offset, page); is no longer accurate. Update it to: VM_BUG_ON_PAGE(page_to_pgoff(page) != offset, page); Acked-by: Rik van Riel Signed-off-by: Song Liu --- mm/filemap.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH V34 28/29] efi: Restrict efivar_ssdt_load when the kernel is locked down

2019-06-21 Thread Matthew Garrett
efivar_ssdt_load allows the kernel to import arbitrary ACPI code from an EFI variable, which gives arbitrary code execution in ring 0. Prevent that when the kernel is locked down. Signed-off-by: Matthew Garrett Cc: Ard Biesheuvel Cc: linux-...@vger.kernel.org --- drivers/firmware/efi/efi.c | 6

[PATCH V34 10/29] hibernate: Disable when the kernel is locked down

2019-06-21 Thread Matthew Garrett
From: Josh Boyer There is currently no way to verify the resume image when returning from hibernate. This might compromise the signed modules trust model, so until we can work with signed hibernate images we disable it when the kernel is locked down. Signed-off-by: Josh Boyer Signed-off-by:

[PATCH V34 15/29] acpi: Ignore acpi_rsdp kernel param when the kernel has been locked down

2019-06-21 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 Signed-off-by: Matthew

[PATCH V34 12/29] x86: Lock down IO port access when the kernel is locked down

2019-06-21 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

[PATCH V34 06/29] kexec_load: Disable at runtime if the kernel is locked down

2019-06-21 Thread Matthew Garrett
From: Matthew Garrett The kexec_load() syscall permits the loading and execution of arbitrary code in ring 0, which is something that lock-down is meant to prevent. It makes sense to disable kexec_load() in this situation. This does not affect kexec_file_load() syscall which can check for a

[PATCH V34 18/29] Lock down TIOCSSERIAL

2019-06-21 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.

[PATCH V34 24/29] Lock down perf when in confidentiality mode

2019-06-21 Thread Matthew Garrett
From: David Howells Disallow the use of certain perf facilities that might allow userspace to access kernel data. Signed-off-by: David Howells Signed-off-by: Matthew Garrett Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo --- include/linux/security.h | 1 +

[PATCH V34 08/29] kexec_file: split KEXEC_VERIFY_SIG into KEXEC_SIG and KEXEC_SIG_FORCE

2019-06-21 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

[PATCH V34 23/29] bpf: Restrict bpf when kernel lockdown is in confidentiality mode

2019-06-21 Thread Matthew Garrett
From: David Howells There are some bpf functions can be used to read kernel memory: bpf_probe_read, bpf_probe_write_user and bpf_trace_printk. These allow private keys in kernel memory (e.g. the hibernation image signing key) to be read by an eBPF program and kernel memory to be altered without

[PATCH V34 17/29] Prohibit PCMCIA CIS storage when the kernel is locked down

2019-06-21 Thread Matthew Garrett
From: David Howells Prohibit replacement of the PCMCIA Card Information Structure when the kernel is locked down. Suggested-by: Dominik Brodowski Signed-off-by: David Howells Signed-off-by: Matthew Garrett --- drivers/pcmcia/cistpl.c | 5 + include/linux/security.h | 1 +

[PATCH V34 25/29] kexec: Allow kexec_file() with appropriate IMA policy when locked down

2019-06-21 Thread Matthew Garrett
Systems in lockdown mode should block the kexec of untrusted kernels. For x86 and ARM we can ensure that a kernel is trustworthy by validating a PE signature, but this isn't possible on other architectures. On those platforms we can use IMA digital signatures instead. Add a function to determine

[PATCH V34 21/29] Lock down /proc/kcore

2019-06-21 Thread Matthew Garrett
From: David Howells Disallow access to /proc/kcore when the kernel is locked down to prevent access to cryptographic data. This is limited to lockdown confidentiality mode and is still permitted in integrity mode. Signed-off-by: David Howells Signed-off-by: Matthew Garrett ---

[PATCH V34 20/29] x86/mmiotrace: Lock down the testmmiotrace module

2019-06-21 Thread Matthew Garrett
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. This is a runtime check rather than buildtime in order to allow configurations where the same kernel may be run in both locked down or

[PATCH V34 11/29] PCI: Lock down BAR access when the kernel is locked down

2019-06-21 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

[PATCH V34 05/29] Restrict /dev/{mem,kmem,port} when the kernel is locked down

2019-06-21 Thread Matthew Garrett
From: Matthew Garrett Allowing users to read and write to core kernel memory makes it possible for the kernel to be subverted, avoiding module loading restrictions, and also to steal cryptographic information. Disallow /dev/mem and /dev/kmem from being opened this when the kernel has been

[PATCH V34 03/29] security: Add a static lockdown policy LSM

2019-06-21 Thread Matthew Garrett
While existing LSMs can be extended to handle lockdown policy, distributions generally want to be able to apply a straightforward static policy. This patch adds a simple LSM that can be configured to reject either integrity or all lockdown queries, and can be configured at runtime (through

[PATCH V34 04/29] Enforce module signatures if the kernel is locked down

2019-06-21 Thread Matthew Garrett
From: David Howells If the kernel is locked down, require that all modules have valid signatures that we can verify. I have adjusted the errors generated: (1) If there's no signature (ENODATA) or we can't check it (ENOPKG, ENOKEY), then: (a) If signatures are enforced then

[PATCH V34 02/29] security: Add a "locked down" LSM hook

2019-06-21 Thread Matthew Garrett
Add a mechanism to allow LSMs to make a policy decision around whether kernel functionality that would allow tampering with or examining the runtime state of the kernel should be permitted. Signed-off-by: Matthew Garrett --- include/linux/lsm_hooks.h | 2 ++ include/linux/security.h | 11

[PATCH V34 01/29] security: Support early LSMs

2019-06-21 Thread Matthew Garrett
The lockdown module is intended to allow for kernels to be locked down early in boot - sufficiently early that we don't have the ability to kmalloc() yet. Add support for early initialisation of some LSMs, and then add them to the list of names when we do full initialisation later. Early LSMs are

[PATCH V34 00/29] Lockdown as an LSM

2019-06-21 Thread Matthew Garrett
Minor updates over V33 - security_is_locked_down renamed to security_locked_down, return value of security_locked_down is returned in most cases, one unnecessary patch was dropped, couple of minor nits fixed.

[PATCH v5 4/5] uprobe: use FOLL_SPLIT_PMD instead of FOLL_SPLIT

2019-06-21 Thread Song Liu
This patches uses newly added FOLL_SPLIT_PMD in uprobe. This enables easy regroup of huge pmd after the uprobe is disabled (in next patch). Signed-off-by: Song Liu --- kernel/events/uprobes.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/kernel/events/uprobes.c

[PATCH v5 2/5] uprobe: use original page when all uprobes are removed

2019-06-21 Thread Song Liu
Currently, uprobe swaps the target page with a anonymous page in both install_breakpoint() and remove_breakpoint(). When all uprobes on a page are removed, the given mm is still using an anonymous page (not the original page). This patch allows uprobe to use original page when possible (all

[PATCH v5 1/5] mm: move memcmp_pages() and pages_identical()

2019-06-21 Thread Song Liu
This patch moves memcmp_pages() to mm/util.c and pages_identical() to mm.h, so that we can use them in other files. Signed-off-by: Song Liu --- include/linux/mm.h | 7 +++ mm/ksm.c | 18 -- mm/util.c | 13 + 3 files changed, 20 insertions(+),

[PATCH v5 5/5] uprobe: collapse THP pmd after removing all uprobes

2019-06-21 Thread Song Liu
After all uprobes are removed from the huge page (with PTE pgtable), it is possible to collapse the pmd and benefit from THP again. This patch does the collapse. An issue on earlier version was discovered by kbuild test robot. Reported-by: kbuild test robot Signed-off-by: Song Liu ---

[PATCH v5 3/5] mm, thp: introduce FOLL_SPLIT_PMD

2019-06-21 Thread Song Liu
This patches introduces a new foll_flag: FOLL_SPLIT_PMD. As the name says FOLL_SPLIT_PMD splits huge pmd for given mm_struct, the underlining huge page stays as-is. FOLL_SPLIT_PMD is useful for cases where we need to use regular pages, but would switch back to huge page and huge pmd on. One of

[PATCH v5 0/5] THP aware uprobe

2019-06-21 Thread Song Liu
This set makes uprobe aware of THPs. Currently, when uprobe is attached to text on THP, the page is split by FOLL_SPLIT. As a result, uprobe eliminates the performance benefit of THP. This set makes uprobe THP-aware. Instead of FOLL_SPLIT, we introduces FOLL_SPLIT_PMD, which only split PMD for

Re: [RFC PATCH RT 4/4] rcutorture: Avoid problematic critical section nesting

2019-06-21 Thread Paul E. McKenney
On Fri, Jun 21, 2019 at 06:38:21PM +0200, Sebastian Andrzej Siewior wrote: > On 2019-06-20 14:18:26 [-0700], Paul E. McKenney wrote: > > > Example #1: > > > > > > 1. preempt_disable() > > > 2. local_bh_disable() > > > 3. preempt_enable() > > > 4. local_bh_enable() > > > > > > Example #2: > > >

[PATCH v4 0/7] vfs: make immutable files actually immutable

2019-06-21 Thread Darrick J. Wong
Hi all, The chattr(1) manpage has this to say about the immutable bit that system administrators can set on files: "A file with the 'i' attribute cannot be modified: it cannot be deleted or renamed, no link can be created to this file, most of the file's metadata can not be modified, and the

[PATCH 3/7] vfs: flush and wait for io when setting the immutable flag via FSSETXATTR

2019-06-21 Thread Darrick J. Wong
From: Darrick J. Wong When we're using FS_IOC_FSSETXATTR to set the immutable flag on a file, we need to ensure that userspace can't continue to write the file after the file becomes immutable. To make that happen, we have to flush all the dirty pagecache pages to disk to ensure that we can

[RFC V1 RESEND 1/6] PCI/MSI: New structures/macros for dynamic MSI-X allocation

2019-06-21 Thread Megha Dey
This is a preparatory patch to introduce the dynamic allocation of MSI-X vectors. In this patch, we add new structure members and macros which will be consumed by the API that will dynamically allocate MSI-X vectors. Cc: Jacob Pan Cc: Ashok Raj Signed-off-by: Megha Dey ---

[PATCH 1/7] mm/fs: don't allow writes to immutable files

2019-06-21 Thread Darrick J. Wong
From: Darrick J. Wong The chattr manpage has this to say about immutable files: "A file with the 'i' attribute cannot be modified: it cannot be deleted or renamed, no link can be created to this file, most of the file's metadata can not be modified, and the file can not be opened in write

RE: [PATCH v2] PCI: hv: Fix a use-after-free bug in hv_eject_device_work()

2019-06-21 Thread Michael Kelley
From: Dexuan Cui Sent: Friday, June 21, 2019 4:45 PM > > The commit 05f151a73ec2 itself is correct, but it exposes this > use-after-free bug, which is caught by some memory debug options. > > Add a Fixes tag to indicate the dependency. > > Fixes: 05f151a73ec2 ("PCI: hv: Fix a memory leak in

[RFC V1 RESEND 3/6] x86: Introduce the dynamic teardown function

2019-06-21 Thread Megha Dey
This is a preparatory patch to introduce disabling of MSI-X vectors belonging to a particular group. In this patch, we introduce a x86 specific mechanism to teardown the IRQ vectors belonging to a particular group. Cc: Jacob Pan Cc: Ashok Raj Signed-off-by: Megha Dey ---

[RFC V1 RESEND 4/6] PCI/MSI: Introduce new structure to manage MSI-x entries

2019-06-21 Thread Megha Dey
This is a preparatory patch to introduce disabling of MSI-X vectors belonging to a particular group. In this patch, we introduce a new structure msix_sysfs, which manages sysfs entries for dynamically allocated MSI-X vectors belonging to a particular group. Cc: Jacob Pan Cc: Ashok Raj

[PATCH 2/4] vfs: create a generic checking function for FS_IOC_FSSETXATTR

2019-06-21 Thread Darrick J. Wong
From: Darrick J. Wong Create a generic checking function for the incoming FS_IOC_FSSETXATTR fsxattr values so that we can standardize some of the implementation behaviors. Signed-off-by: Darrick J. Wong Reviewed-by: Jan Kara --- fs/btrfs/ioctl.c | 21 +--- fs/ext4/ioctl.c

[RFC V1 RESEND 6/6] Documentation: PCI/MSI: Document dynamic MSI-X infrastructure

2019-06-21 Thread Megha Dey
Add Documentation for the newly introduced dynamic allocation and deallocation of MSI-X vectors. Cc: Jacob Pan Cc: Ashok Raj Signed-off-by: Megha Dey --- Documentation/PCI/MSI-HOWTO.txt | 38 ++ 1 file changed, 38 insertions(+) diff --git

[RFC V1 RESEND 5/6] PCI/MSI: Free MSI-X resources by group

2019-06-21 Thread Megha Dey
Currently, the pci_free_irq_vectors() frees all the allocated resources associated with a PCIe device when the device is being shut down. With the introduction of dynamic allocation of MSI-X vectors by group ID, there should exist an API which can free the resources allocated only to a particular

[RFC V1 RESEND 2/6] PCI/MSI: Dynamic allocation of MSI-X vectors by group

2019-06-21 Thread Megha Dey
Currently, MSI-X vector enabling and allocation for a PCIe device is static i.e. a device driver gets only one chance to enable a specific number of MSI-X vectors, usually during device probe. Also, in many cases, drivers usually reserve more than required number of vectors anticipating their use,

  1   2   3   4   5   6   7   8   9   >