Re: [PATCH] watchdog: convert remaining drivers to use SPDX license identifier

2019-06-22 Thread William Breathitt Gray
On Thu, Jun 20, 2019 at 09:28:46AM -0700, Guenter Roeck wrote: > This gets rid of the unnecessary license boilerplate, and avoids > having to deal with individual patches one by one. > > No functional changes. > > Signed-off-by: Guenter Roeck > --- > Note: Several drivers include a paragraph suc

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

2019-06-22 Thread Kees Cook
On Fri, Jun 21, 2019 at 05:03:44PM -0700, Matthew Garrett wrote: > 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-o

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

2019-06-22 Thread Kees Cook
On Fri, Jun 21, 2019 at 05:03:43PM -0700, Matthew Garrett wrote: > 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. > > Signe

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

2019-06-22 Thread Kees Cook
On Fri, Jun 21, 2019 at 05:03:45PM -0700, Matthew Garrett wrote: > 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

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

2019-06-22 Thread Kees Cook
On Fri, Jun 21, 2019 at 05:03:46PM -0700, Matthew Garrett wrote: > 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 Reviewed-by: Kees Cook -Kees > Signe

Re: [PATCH V34 18/29] Lock down TIOCSSERIAL

2019-06-22 Thread Kees Cook
On Fri, Jun 21, 2019 at 05:03:47PM -0700, Matthew Garrett wrote: > 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 drive

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

2019-06-22 Thread Kees Cook
On Fri, Jun 21, 2019 at 05:03:48PM -0700, Matthew Garrett wrote: > 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 > S

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

2019-06-22 Thread Kees Cook
On Fri, Jun 21, 2019 at 05:03:49PM -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. This is > a runtime check rather than buildtime in order to allow

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

2019-06-22 Thread Kees Cook
On Fri, Jun 21, 2019 at 05:03:50PM -0700, Matthew Garrett wrote: > 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. > > Sig

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

2019-06-22 Thread Kees Cook
On Fri, Jun 21, 2019 at 05:03:51PM -0700, Matthew Garrett wrote: > 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

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

2019-06-22 Thread Kees Cook
On Fri, Jun 21, 2019 at 05:03:52PM -0700, Matthew Garrett wrote: > 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

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

2019-06-22 Thread Kees Cook
On Fri, Jun 21, 2019 at 05:03:53PM -0700, Matthew Garrett wrote: > 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

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

2019-06-22 Thread Kees Cook
On Fri, Jun 21, 2019 at 05:03:58PM -0700, Matthew Garrett wrote: > 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: > >

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

2019-06-22 Thread Masami Hiramatsu
On Fri, 21 Jun 2019 17:03:51 -0700 Matthew Garrett wrote: > 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 stea

[PATCH v3] e1000e: Make watchdog use delayed work

2019-06-22 Thread Detlev Casanova
Use delayed work instead of timers to run the watchdog of the e1000e driver. Simplify the code with one less middle function. Signed-off-by: Detlev Casanova --- drivers/net/ethernet/intel/e1000e/e1000.h | 5 +- drivers/net/ethernet/intel/e1000e/netdev.c | 54 -- 2 files ch

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

2019-06-22 Thread Chanwoo Choi
Hi, 2019년 6월 23일 (일) 오전 6:42, Saravana Kannan 님이 작성: > > On Sat, Jun 22, 2019 at 4:50 AM Chanwoo Choi wrote: > > > > Hi, > > > > Absolutely, I like this approach. I think that it is necessary to make > > the connection > > between frequencies of devices. > > Happy to hear that. > > > But, I have

Re: [PATCH v3] arm64: defconfig: Enable Panfrost and Lima drivers

2019-06-22 Thread Chanwoo Choi
Hi Krzysztof, 2019년 6월 23일 (일) 오전 4:20, Krzysztof Kozlowski 님이 작성: > > Enable support for Mali GPU with Panfrost and Lima drivers for: > 1. Samsung Exynos5433 and Exynos7 (having Mali T760), > 2. Allwiner A64 and H5 (Mali 400/450). > > Signed-off-by: Krzysztof Kozlowski > > --- > > Changes since

[PATCH v3 2/9] clk: sunxi-ng: v3s: add the missing PLL_DDR1

2019-06-22 Thread Icenowy Zheng
The user manual of V3/V3s/S3 declares a PLL_DDR1, however it's forgot when developing the V3s CCU driver. Add back the missing PLL_DDR1. Fixes: d0f11d14b0bc ("clk: sunxi-ng: add support for V3s CCU") Signed-off-by: Icenowy Zheng --- No changes in v3/v2. drivers/clk/sunxi-ng/ccu-sun8i-v3s.c | 1

[PATCH v3 1/9] pinctrl: sunxi: v3s: introduce support for V3

2019-06-22 Thread Icenowy Zheng
Introduce the GPIO pins that is only available on V3 (not on V3s) to the V3s pinctrl driver. Signed-off-by: Icenowy Zheng --- Changes in v3: - Fixed code alignment. - Fixed LVDS function number. Changes in v2: - Dropped the driver rename patch and apply the changes directly on V3s driver. dr

[PATCH v3 0/9] Support for Allwinner V3/S3L and Sochip S3

2019-06-22 Thread Icenowy Zheng
This patchset tries to add support for Allwinner V3/S3L and Sochip S3. Allwinner V3/V3s/S3L and Sochip S3 share the same die, but with different package. V3 is BGA w/o co-packaged DDR, V3s is QFP w/ DDR2, S3L is BGA w/ DDR2 and S3 is BGA w/ DDR3. (S3 and S3L is compatible for pinout, but because o

[PATCH v3 7/9] dt-bindings: vendor-prefixes: add Sipeed

2019-06-22 Thread Icenowy Zheng
Shenzhen Sipeed Technology Co., Ltd. is a company focused on development kits, which also contains rebranded Lichee Pi series. Add its vendor prefix binding. Signed-off-by: Icenowy Zheng --- Changes in v3: - Rebased because of the addition of sinlinx and sinovoip. Patch introduced in v2. Docu

[PATCH v3 3/9] dt-bindings: clk: sunxi-ccu: add compatible string for V3 CCU

2019-06-22 Thread Icenowy Zheng
Despite Allwinner V3 and V3s shares the same die, one peripheral (I2S) is only available on V3, and thus the clocks is not declared for V3s CCU. Add a V3 CCU compatible string to the binding to prepare for a CCU driver that provide I2S clock on V3, but not on V3s. Signed-off-by: Icenowy Zheng Re

[PATCH v3 6/9] ARM: sunxi: dts: s3/s3l/v3: add DTSI files for S3/S3L/V3 SoCs

2019-06-22 Thread Icenowy Zheng
The Allwinner S3/S3L/V3 SoCs all share the same die with the V3s SoC, but with more GPIO wired out of the package. Add DTSI files for these SoCs. The DTSI file for V3 just replaces the pinctrl compatible string, and the S3/S3L DTSI files just include the V3 DTSI file. Signed-off-by: Icenowy Zheng

[PATCH v3 5/9] dt-bindings: vendor-prefixes: add SoChip

2019-06-22 Thread Icenowy Zheng
Shenzhen SoChip Technology Co., Ltd. is a hardware vendor that produces EVBs with Allwinner chips. There's also a SoC named S3 that is developed by Allwinner (based on Allwinner V3/V3s) but branded SoChip. Add the vendor prefix for SoChip. Signed-off-by: Icenowy Zheng Reviewed-by: Rob Herring -

[PATCH v3 4/9] clk: sunxi-ng: v3s: add Allwinner V3 support

2019-06-22 Thread Icenowy Zheng
Allwinner V3 has the same main die with V3s, but with more pins wired. There's a I2S bus on V3 that is not available on V3s. Add the V3-only peripheral's clocks and reset to the V3s CCU driver, bound to a new V3 compatible string. The driver name is not changed because it's part of the device tree

[PATCH v3 8/9] dt-bindings: arm: sunxi: add binding for Lichee Zero Plus core board

2019-06-22 Thread Icenowy Zheng
The Lichee Zero Plus is a core board made by Sipeed, with a microUSB connector on it, TF slot or WSON8 SD chip, optional eMMC or SPI Flash. It has a gold finger connector for expansion, and UART is available from reserved pins w/ 2.54mm pitch. The board can use either SoChip S3 or Allwinner V3L SoC

[PATCH v3 9/9] ARM: dts: sun8i: s3: add devicetree for Lichee zero plus w/ S3

2019-06-22 Thread Icenowy Zheng
Lichee zero plus is a core board made by Sipeed, which includes on-board TF slot or SMT SD NAND, and optional SPI NOR or eMMC, a UART debug header, a microUSB slot and a gold finger connector for expansion. It can use either Sochip S3 or Allwinner S3L SoC. Add the basic device tree for the core bo

Re: [PATCH v5.2-rc5] Bluetooth: Fix regression with minimum encryption key size alignment

2019-06-22 Thread Greg KH
On Sat, Jun 22, 2019 at 08:21:07PM +0200, Marcel Holtmann wrote: > Hi Sasha, > > > [This is an automated email] > > > > This commit has been processed because it contains a "Fixes:" tag, > > fixing commit: d5bb334a8e17 Bluetooth: Align minimum encryption key size > > for LE and BR/EDR connection

Re: [PATCH][next] lkdtm: remove redundant initialization of ret

2019-06-22 Thread Greg Kroah-Hartman
On Fri, Jun 21, 2019 at 09:26:05AM -0700, Kees Cook wrote: > On Fri, Jun 21, 2019 at 04:05:09PM +0200, Greg Kroah-Hartman wrote: > > On Fri, Jun 21, 2019 at 04:03:47PM +0200, Greg Kroah-Hartman wrote: > > > On Fri, Jun 14, 2019 at 10:43:11AM +0100, Colin King wrote: > > > > From: Colin Ian King >

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

2019-06-22 Thread Andrei Vagin
On Fri, Jun 14, 2019 at 04:13:31PM +0200, Thomas Gleixner wrote: > On Wed, 12 Jun 2019, Dmitry Safonov wrote: > > > From: Andrei Vagin > > > > After performance testing VDSO patches a noticeable 20% regression was > > found on gettime_perf selftest with a cold cache. > > As it turns to be, befor

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

2019-06-22 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 droppi

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

2019-06-22 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 deletion

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

2019-06-22 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() Signed-off-by: Song Liu --- mm/khugepaged.c | 23 +++

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

2019-06-22 Thread Song Liu
Changes v6 => v7: 1. Avoid accessing vma without holding mmap_sem (Hillf Dayton) 2. In collapse_file() use readahead API instead of gup API. This matches better with existing logic for shmem. 3. Add inline documentation for @nr_thps (kbuild test robot) Changes v5 => v6: 1. Improve THP stats in

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

2019-06-22 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 in

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

2019-06-22 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 v7 3/6] mm,thp: stats for file backed THP

2019-06-22 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 Signed-off-

[PATCH v6 0/6] THP aware uprobe

2019-06-22 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 up

[PATCH v6 2/6] uprobe: use original page when all uprobes are removed

2019-06-22 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 uprobe

[PATCH v6 1/6] mm: move memcmp_pages() and pages_identical()

2019-06-22 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(+), 1

[PATCH v6 4/6] uprobe: use FOLL_SPLIT_PMD instead of FOLL_SPLIT

2019-06-22 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 b/kern

[PATCH v6 6/6] uprobe: collapse THP pmd after removing all uprobes

2019-06-22 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 by setting AS_COLLAPSE_PMD. khugepage would retrace the page table. A check for vma->anon_vma is removed from retract_page_tables(). The

[PATCH v6 3/6] mm, thp: introduce FOLL_SPLIT_PMD

2019-06-22 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 suc

[PATCH v6 5/6] khugepaged: enable collapse pmd for pte-mapped THP

2019-06-22 Thread Song Liu
khugepaged needs exclusive mmap_sem to access page table. When it fails to lock mmap_sem, the page will fault in as pte-mapped THP. As the page is already a THP, khugepaged will not handle this pmd again. This patch enables the khugepaged to retry retract_page_tables(). A new flag AS_COLLAPSE_PMD

Re: [Patch 1/1] Input: edt-ft5x06 - disable irq handling during suspend

2019-06-22 Thread Dmitry Torokhov
On Sat, Jun 22, 2019 at 01:37:10PM +0300, Andy Shevchenko wrote: > On Fri, Jun 21, 2019 at 9:53 PM Benoit Parrot wrote: > > > > As a wakeup source when the system is in suspend there is little point > > trying to access a register across the i2c bus as it is probably still > > inactive. We need to

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

2019-06-22 Thread Saravana Kannan
On Sat, Jun 22, 2019 at 9:28 PM Chanwoo Choi wrote: > > Hi, > > 2019년 6월 23일 (일) 오전 6:42, Saravana Kannan 님이 작성: > > > > On Sat, Jun 22, 2019 at 4:50 AM Chanwoo Choi wrote: > > > > > > Hi, > > > > > > Absolutely, I like this approach. I think that it is necessary to make > > > the connection > >

Re: [PATCH v8 1/5] Input: elan_i2c: Export the device id whitelist

2019-06-22 Thread Dmitry Torokhov
On Fri, Jun 21, 2019 at 07:50:42AM -0700, Jeffrey Hugo wrote: > Elan_i2c and hid-quirks work in conjunction to decide which devices each > driver will handle. Elan_i2c has a whitelist of devices that should be > consumed by hid-quirks so that there is one master list of devices to > handoff betwee

[PATCH 1/2] Input: edt-ft5x06 - use get_unaligned_be16()

2019-06-22 Thread Dmitry Torokhov
Instead of doing conversion by hand, let's use the proper accessors. Signed-off-by: Dmitry Torokhov --- drivers/input/touchscreen/edt-ft5x06.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c

[PATCH 2/2] Input: edt-ft5x06 - simplify event reporting code

2019-06-22 Thread Dmitry Torokhov
Now that input_mt_report_slot_state() returns true if slot is active we no longer need a temporary for the slot state. Signed-off-by: Dmitry Torokhov --- drivers/input/touchscreen/edt-ft5x06.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/input/touchsc

Re: [PATCH] Input: gpio_keys_polled - use struct_size() in devm_kzalloc()

2019-06-22 Thread Dmitry Torokhov
On Wed, Jun 19, 2019 at 09:26:55AM -0500, Gustavo A. R. Silva wrote: > One of the more common cases of allocation size calculations is finding > the size of a structure that has a zero-sized array at the end, along > with memory for some number of elements for that array. For example: > > struct g

<    1   2   3