Re: [PATCH v2 0/5] mtd: spi-nor: Add support for Octal 8D-8D-8D mode

2020-05-10 Thread masonccyang
Hi Boris, > > > > > > > > To clarify a bit more, the idea is that we transmit the opcode MSB > > > > first, just we do for the address. Assume we want to issue the command > > > > 0x05. In 1S mode, we set cmd.opcode to 0x05. Here cmd.nbytes == 1. Treat > > > > > > > is as a 1-byte value

Re: [PATCH] lib: linear_ranges: Add missing MODULE_LICENSE()

2020-05-10 Thread Vaittinen, Matti
Morning folks, On Sun, 2020-05-10 at 21:50 +0200, Sebastian Reichel wrote: > Hi, > > On Sat, May 09, 2020 at 06:15:19PM +0300, Matti Vaittinen wrote: > > When linear_ranges is compiled as module we get warning > > about missing MODULE_LICENSE(). Fix it by adding > > MODULE_LICENSE("GPL") as is su

Re: [PATCH v2] ACPI: EC: s2idle: Avoid premature returns from acpi_s2idle_wake()

2020-05-10 Thread Chris Chiu
On Sat, May 9, 2020 at 4:44 PM Rafael J. Wysocki wrote: > > From: Rafael J. Wysocki > > If the EC GPE status is not set after checking all of the other GPEs, > acpi_s2idle_wake() returns 'false', to indicate that the SCI event > that has just triggered is not a system wakeup one, but it does that

Re: System fails to exit s2idle by a keystroke on my laptop

2020-05-10 Thread Chris Chiu
On Sat, May 9, 2020 at 12:50 AM Rafael J. Wysocki wrote: > > On Friday, May 8, 2020 10:22:09 AM CEST Chris Chiu wrote: > > On Fri, May 8, 2020 at 2:05 AM Rafael J. Wysocki wrote: > > > > Hi Rafael, > > Thanks for your patch. I tried it on my laptop and it's also > > working fine. Wake up by k

Re: net/sonic: Fix some resource leaks in error handling paths

2020-05-10 Thread Markus Elfring
> If you can't determine when the bug was introduced, I might be able to determine also this information. > how can you criticise a patch for the lack of a Fixes tag? I dared to point two details out for the discussed patch. >> To which commit would you like to refer to for the proposed adjus

Re: [PATCH] serial: Remove duplicated macro definition of port type

2020-05-10 Thread Jiri Slaby
On 07. 05. 20, 14:03, Tiezhu Yang wrote: > There exists the same macro definition of port type from 0 to 13 > in include/uapi/linux/serial.h, remove these duplicated code in > include/uapi/linux/serial_core.h which includes the former header. > > Signed-off-by: Tiezhu Yang Acked-by: Jiri Slaby

Re: [PATCH] vfio/pci: fix memory leaks in alloc_perm_bits()

2020-05-10 Thread Cornelia Huck
On Sun, 10 May 2020 12:16:56 -0400 Qian Cai wrote: > vfio_pci_disable() calls vfio_config_free() but forgets to call > free_perm_bits() resulting in memory leaks, > > unreferenced object 0xc00c4db2dee0 (size 16): > comm "qemu-kvm", pid 4305, jiffies 4295020272 (age 3463.780s) > hex dump

Re: [PATCH v4 02/14] arm: add support for folded p4d page tables

2020-05-10 Thread Marek Szyprowski
Hi Mike, On 08.05.2020 19:42, Mike Rapoport wrote: > On Fri, May 08, 2020 at 08:53:27AM +0200, Marek Szyprowski wrote: >> On 07.05.2020 18:11, Mike Rapoport wrote: >>> On Thu, May 07, 2020 at 02:16:56PM +0200, Marek Szyprowski wrote: On 14.04.2020 17:34, Mike Rapoport wrote: > From: Mike

Re: KASAN: use-after-free Write in config_item_get

2020-05-10 Thread Greg KH
On Mon, May 11, 2020 at 05:52:16AM +, Kyungtae Kim wrote: > We report a bug (in linux-5.6.8) found by FuzzUSB (a modified version > of syzkaller) > > kernel config: https://kt0755.github.io/etc/config_v5.6.8 > > > This bug happened when accessing a configfs_item instance right after being >

[PATCH] perf timechart: Remove redundant assignment

2020-05-10 Thread Wei Li
Remove redundant assignment, no functional change. Signed-off-by: Wei Li --- tools/perf/builtin-timechart.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c index 9e84fae9b096..5e4f809d7e5d 100644 --- a/tools/perf/builtin-timechar

Re: [PATCH 3/3] soundwire: bus_type: add sdw_master_device support

2020-05-10 Thread Vinod Koul
On 30-04-20, 02:51, Bard Liao wrote: > @@ -24,9 +24,14 @@ int sdw_bus_master_add(struct sdw_bus *bus, struct device > *parent, > struct sdw_master_prop *prop = NULL; > int ret; > > - if (!bus->dev) { > - pr_err("SoundWire bus has no device\n"); > - return

[PATCH] mmc: sdhci: use FIELD_GET/PREP for current capabilities bit masks

2020-05-10 Thread Masahiro Yamada
Use FIELD_GET and FIELD_PREP to get access to the register fields. Delete the shift macros and use GENMASK() for the touched macros. Note that, this has the side-effect of changing the constants to 64-bit on 64-bit platforms. Signed-off-by: Masahiro Yamada --- drivers/mmc/host/sdhci-esdhc-imx.

[PATCH 1/2] mm: remove the specific name of arm64

2020-05-10 Thread Zong Li
UXN is the name of arm64 page-table descriptors. Signed-off-by: Zong Li CC: Will Deacon --- mm/Kconfig.debug | 2 -- 1 file changed, 2 deletions(-) diff --git a/mm/Kconfig.debug b/mm/Kconfig.debug index e19f94c6df90..b8cbe035247f 100644 --- a/mm/Kconfig.debug +++ b/mm/Kconfig.debug @@ -130,8 +

KASAN: vmalloc-out-of-bounds Write in drm_fb_helper_dirty_work (2)

2020-05-10 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:e99332e7 gcc-10: mark more functions __init to avoid secti.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=13de23a210 kernel config: https://syzkaller.appspot.com/x/.config?x=a45301b663dae85a das

[PATCH 0/2] Bugs fix up for DEBUG_WX

2020-05-10 Thread Zong Li
These patches fix some bugs of DEBUG_WX. The first one is removing the name of arm64 page talbe use. The second one is adding MMU dependency, otherwise, it causes build error on NOMMU system, which reported by kbuild test. Zong Li (2): mm: remove the specific name of arm64 mm: add MMU dependen

[PATCH 2/2] mm: add MMU dependency for DEBUG_WX

2020-05-10 Thread Zong Li
DEBUG_WX should be enabled on MMU system. It had got build error when enabling DEBUG_WX on NOMMU. Signed-off-by: Zong Li Reported-by: kbuild test robot --- mm/Kconfig.debug | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/Kconfig.debug b/mm/Kconfig.debug index b8cbe035247f..2409f7fc1567 1

Re: [PATCH] net/davicom: Add SOC to dm9000 to initialize SROM_BANK clock.

2020-05-10 Thread Sascha Hauer
On Sun, May 10, 2020 at 07:02:13PM +0800, zhoubo...@foxmail.com wrote: > From: To-run-away > > Increase the use of dm9000 to initialize the SROM_BANK clock in the SOC, > otherwise the chip will not work. The dm9000 doesn't have anything called SROM in it. You have to describe the clock input pin

[PATCH] mmc: uniphier-sd: call devm_request_irq() after tmio_mmc_host_probe()

2020-05-10 Thread Masahiro Yamada
Currently, tmio_mmc_irq() handler is registered before the host is fully initialized by tmio_mmc_host_probe(). I did not previously notice this problem. The boot ROM of a new Socionext SoC unmasks interrupts (CTL_IRQ_MASK) somehow. The handler is invoked before tmio_mmc_host_probe(), then emits no

KASAN: use-after-free Read in vc_do_resize

2020-05-10 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:ac935d22 Add linux-next specific files for 20200415 git tree: linux-next console output: https://syzkaller.appspot.com/x/log.txt?x=17b5fd3210 kernel config: https://syzkaller.appspot.com/x/.config?x=bc498783097e9019 dashboard

Re: [PATCH -next] soundwire: qcom: Use IRQF_ONESHOT

2020-05-10 Thread Vinod Koul
On 06-05-20, 11:25, Samuel Zou wrote: > Fixes coccicheck error: > > drivers/soundwire/qcom.c:815:7-32: ERROR: Threaded IRQ with > no primary handler requested without IRQF_ONESHOT Applied, thanks -- ~Vinod

[PATCH] f2fs: report delalloc reserve as non-free in statfs for project quota

2020-05-10 Thread Konstantin Khlebnikov
This reserved space isn't committed yet but cannot be used for allocations. For userspace it has no difference from used space. See the same fix in ext4 commit f06925c73942 ("ext4: report delalloc reserve as non-free in statfs for project quota"). Signed-off-by: Konstantin Khlebnikov Fixes: ddc3

[PATCH] MAINTAINERS: Update LIVE PATCHING file list

2020-05-10 Thread Kamalesh Babulal
The current list of livepatching files is incomplete, update the list with the missing files. Included files are ordered by the command: ./scripts/parse-maintainers.pl --input=MAINTAINERS --output=MAINTAINERS --order Signed-off-by: Kamalesh Babulal --- The patch applies on top of livepatching/fo

Re: [PATCH -next] s390: Remove two unused inline functions

2020-05-10 Thread Sven Schnelle
Hi, On Fri, May 08, 2020 at 10:07:24PM +0800, YueHaibing wrote: > commit 657480d9c015 ("s390: support KPROBES_ON_FTRACE") > left behind this, remove it. > > Signed-off-by: YueHaibing > --- > arch/s390/kernel/ftrace.c | 16 > 1 file changed, 16 deletions(-) > > diff --git a/arc

Re: [PATCH] tty: Replace zero-length array with flexible-array

2020-05-10 Thread Jiri Slaby
On 07. 05. 20, 21:25, Gustavo A. R. Silva wrote: > The current codebase makes use of the zero-length array language > extension to the C90 standard, but the preferred mechanism to declare > variable-length types such as these ones is a flexible array member[1][2], > introduced in C99: > > struct f

Re: [PATCH v14 04/11] soc: mediatek: Remove infracfg misc driver support

2020-05-10 Thread Weiyi Lu
On Wed, 2020-05-06 at 23:00 +0200, Enric Balletbo i Serra wrote: > Hi Weiyi, > > Thank you for your patch. > > On 6/5/20 10:15, Weiyi Lu wrote: > > The functions provided by infracfg misc driver have no other user except > > the scpsys driver so move those into scpsys driver directly. > > And th

Re: [PATCH v14 03/11] soc: mediatek: Add basic_clk_name to scp_power_data

2020-05-10 Thread Weiyi Lu
On Wed, 2020-05-06 at 23:01 +0200, Enric Balletbo i Serra wrote: > Hi Weiyi, > > Thank you for your patch. > > On 6/5/20 10:15, Weiyi Lu wrote: > > Try to stop extending the clk_id or clk_names if there are > > more and more new BASIC clocks. To get its own clocks by the > > basic_clk_name of ea

Re: [PATCH v14 01/11] dt-bindings: mediatek: Add property to mt8183 smi-common

2020-05-10 Thread Weiyi Lu
On Wed, 2020-05-06 at 22:59 +0200, Enric Balletbo i Serra wrote: > Hi Weiyi, > > Thank you for your patch. Don't forget to cc , > otherwise this patch could be silently ignored. > Thank you for reminding! > On 6/5/20 10:15, Weiyi Lu wrote: > > For scpsys driver using regmap based syscon driver

Re: [PATCH v14 02/11] dt-bindings: soc: Add MT8183 power dt-bindings

2020-05-10 Thread Weiyi Lu
On Wed, 2020-05-06 at 23:00 +0200, Enric Balletbo i Serra wrote: > Hi Weiyi, > > Thank you for your patch. You should cc devicet...@vger.kernel.org, otherwise > this patch might be ignored. > Got it. > On 6/5/20 10:15, Weiyi Lu wrote: > > Add power dt-bindings of MT8183 and introduces "BASIC"

Re: INFO: task hung in do_read_cache_page (3)

2020-05-10 Thread syzbot
syzbot has found a reproducer for the following crash on: HEAD commit:e99332e7 gcc-10: mark more functions __init to avoid secti.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=1344fb1410 kernel config: https://syzkaller.appspot.com/x/.config?x=8a96cf4

[PATCH v3 0/2] serial: lantiq: Make driver modular & console configurable

2020-05-10 Thread Rahul Tanwar
Patch 1 is to make lantiq UART driver's use as console selectable/configurable. Patch 2 adds changes so the driver can be compiled as module. v3: - Fix a section mismatch warning. Reported-by: kbuild test robot . v2: - Split into two patches. One for console configuration and two for modular d

[PATCH v3 1/2] serial: lantiq: Make UART's use as console selectable

2020-05-10 Thread Rahul Tanwar
Lantiq UART driver can be used for system console. Add changes to make this driver's use as console selectable/configurable. Signed-off-by: Rahul Tanwar --- drivers/tty/serial/Kconfig | 9 - drivers/tty/serial/lantiq.c | 11 ++- 2 files changed, 18 insertions(+), 2 deletions(-)

[PATCH v3 2/2] serial: lantiq: Make driver modular

2020-05-10 Thread Rahul Tanwar
Add changes so Lantiq serial driver can be compiled as a module. Signed-off-by: Rahul Tanwar --- drivers/tty/serial/Kconfig | 4 +++- drivers/tty/serial/lantiq.c | 29 + 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/drivers/tty/serial/Kconfig b/dri

Re: [net-next PATCH v3 4/5] net: phy: Introduce fwnode_get_phy_id()

2020-05-10 Thread Calvin Johnson
Thanks Andrew and Jeremy for the detailed discussion! On Fri, May 08, 2020 at 08:13:01PM +0200, Andrew Lunn wrote: > > > It does have a numeric version defined for EISA types. OTOH I suspect that > > > your right. If there were a "PHY\VEN_ID&ID_" definition, it may > > > not > > > be idea

[PATCH] mailbox: no error log in mbox_client_txdone() for tx done by irq

2020-05-10 Thread joe_zhuchg
From: Joe Zhu client does not know and not care about how controller implement tx done. mbox_client_txdone() may be called when controller uses irq method. Signed-off-by: Joe Zhu --- drivers/mailbox/mailbox.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mailbo

[PATCH v1 net-next 0/3] net: dsa: felix: tc taprio and CBS offload support

2020-05-10 Thread Xiaoliang Yang
This patch series support tc taprio and CBS hardware offload according to IEEE 802.1Qbv and IEEE-802.1Qav on VSC9959. Xiaoliang Yang (3): net: dsa: felix: qos classified based on pcp net: dsa: felix: Configure Time-Aware Scheduler via taprio offload net: dsa: felix: add support Credit Based

[PATCH v1 net-next 2/3] net: dsa: felix: Configure Time-Aware Scheduler via taprio offload

2020-05-10 Thread Xiaoliang Yang
Ocelot VSC9959 switch supports time-based egress shaping in hardware according to IEEE 802.1Qbv. This patch add support for TAS configuration on egress port of VSC9959 switch. Felix driver is an instance of Ocelot family, with a DSA front-end. The patch uses tc taprio hardware offload to setup TAS

[PATCH v1 net-next 3/3] net: dsa: felix: add support Credit Based Shaper(CBS) for hardware offload

2020-05-10 Thread Xiaoliang Yang
VSC9959 hardware support the Credit Based Shaper(CBS) which part of the IEEE-802.1Qav. This patch support sch_cbs set for VSC9959. Signed-off-by: Xiaoliang Yang --- drivers/net/dsa/ocelot/felix_vsc9959.c | 52 +- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git

[PATCH v1 net-next 1/3] net: dsa: felix: qos classified based on pcp

2020-05-10 Thread Xiaoliang Yang
Set the default QoS Classification based on PCP and DEI of vlan tag, after that, frames can be Classified to different Qos based on PCP tag. If there is no vlan tag or vlan ignored, use port default Qos. Signed-off-by: Xiaoliang Yang --- drivers/net/dsa/ocelot/felix.c | 6 ++ driver

Re: [PATCH] dmaengine: at_hdmac: Replace zero-length array with flexible-array

2020-05-10 Thread Ludovic Desroches
On Thu, May 07, 2020 at 02:00:38PM -0500, Gustavo A. R. Silva wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > The current codebase makes use of the zero-length array language > extension to the C90 standard, but the preferred mechanism to

Re: [PATCH] dmaengine: at_xdmac: Replace zero-length array with flexible-array

2020-05-10 Thread Ludovic Desroches
On Thu, May 07, 2020 at 02:00:46PM -0500, Gustavo A. R. Silva wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > The current codebase makes use of the zero-length array language > extension to the C90 standard, but the preferred mechanism to

Re: [PATCH 00/15][RFC] Add regulator devfreq support to Panfrost

2020-05-10 Thread Tomeu Vizoso
On 5/10/20 6:55 PM, Clément Péron wrote: Hi, This serie cleans and adds regulator support to Panfrost devfreq. This is mostly based on comment for the freshly introduced lima devfreq. We need to add regulator support because on Allwinner the GPU OPP table defines both frequencies and voltages.

[rcu:rcu/dev] BUILD SUCCESS 13e69ca01ce1621ce74248bda86cfad47fa5a0fa

2020-05-10 Thread kbuild test robot
g-a004-20200511 i386 randconfig-a002-20200511 i386 randconfig-a006-20200510 i386 randconfig-a005-20200510 i386 randconfig-a003-20200510 i386 randconfig-a001-20200510 i386 randconfig-a004-20200510

Re: [PATCH 11/15] maccess: remove strncpy_from_unsafe

2020-05-10 Thread Masami Hiramatsu
On Wed, 6 May 2020 08:22:19 +0200 Christoph Hellwig wrote: > All three callers really should try the explicit kernel and user > copies instead. One has already deprecated the somewhat dangerous > either kernel or user address concept, the other two still need to > follow up eventually. > > Sig

Re: [PATCH 12/15] maccess: always use strict semantics for probe_kernel_read

2020-05-10 Thread Masami Hiramatsu
On Mon, 11 May 2020 14:05:36 +0900 Masami Hiramatsu wrote: > Hi Christoph, > > At first, thank you for your work on cleaning up these functions! > > On Wed, 6 May 2020 08:22:20 +0200 > Christoph Hellwig wrote: > > > Except for historical confusion in the kprobes/uprobes and bpf tracers > > t

Re: [PATCH 00/14] Modularize schedutil

2020-05-10 Thread Viresh Kumar
On 08-05-20, 13:26, Peter Zijlstra wrote: > At the very least there's that interactive governor that's really > popular with Android. But IIRC there's a whole scala of home-brew > governors and tweaks out there. I removed interactive governor from Android long time back :) -- viresh

Re: [PATCH 12/15] maccess: always use strict semantics for probe_kernel_read

2020-05-10 Thread Masami Hiramatsu
Hi Christoph, At first, thank you for your work on cleaning up these functions! On Wed, 6 May 2020 08:22:20 +0200 Christoph Hellwig wrote: > Except for historical confusion in the kprobes/uprobes and bpf tracers > there is no good reason to ever allow user memory accesses from > probe_kernel_r

Re: [PATCH v10 00/18] Enable FSGSBASE instructions

2020-05-10 Thread Sasha Levin
On Sun, May 10, 2020 at 05:50:28PM -0700, Andi Kleen wrote: So this is a check that checks if you're running in user mode if you have a debug trap with single step, but somehow it triggered for a user segment. Probably the regs got corrupted. Sasha, I suspect you're missing a mov %rsp,%rdi some

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

2020-05-10 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the keys tree got a conflict in: fs/splice.c between commit: 90da2e3f25c8 ("splice: move f_mode checks to do_{splice,tee}()") from Linus' tree and commit: 549d46d3827d ("pipe: Add general notification queue support") from the keys tree. I fixed it u

[PATCH v12 13/18] x86/fsgsbase/64: Use FSGSBASE instructions on thread copy and ptrace

2020-05-10 Thread Sasha Levin
From: "Chang S. Bae" When FSGSBASE is enabled, copying threads and reading FS/GS base using ptrace must read the actual values. When copying a thread, use fsgs_save() and copy the saved values. For ptrace, the bases must be read from memory regardless of the selector if FSGSBASE is enabled. Sug

[PATCH v12 06/18] x86/entry/64: Introduce the FIND_PERCPU_BASE macro

2020-05-10 Thread Sasha Levin
From: "Chang S. Bae" GS base is used to find per-CPU data in the kernel. But when GS base is unknown, the per-CPU base can be found from the per_cpu_offset table with a CPU NR. The CPU NR is extracted from the limit field of the CPUNODE entry in GDT, or by the RDPID instruction. This is a prereq

[PATCH v12 01/18] x86/ptrace: Prevent ptrace from clearing the FS/GS selector

2020-05-10 Thread Sasha Levin
From: "Chang S. Bae" When a ptracer writes a ptracee's FS/GS base with a different value, the selector is also cleared. While this behavior is incorrect as the selector should be preserved, most userspace applications did not notice that as they do not use non-zero segments to begin with. Instea

[PATCH v12 14/18] x86/speculation/swapgs: Check FSGSBASE in enabling SWAPGS mitigation

2020-05-10 Thread Sasha Levin
From: Tony Luck Before enabling FSGSBASE the kernel could safely assume that the content of GS base was a user address. Thus any speculative access as the result of a mispredicted branch controlling the execution of SWAPGS would be to a user address. So systems with speculation-proof SMAP did not

[PATCH v12 02/18] selftests/x86/fsgsbase: Test GS selector on ptracer-induced GS base write

2020-05-10 Thread Sasha Levin
From: "Chang S. Bae" The test validates that the selector is not changed when a ptracer writes the ptracee's GS base. Originally-by: Andy Lutomirski Signed-off-by: Chang S. Bae Signed-off-by: Sasha Levin Reviewed-by: Tony Luck Cc: Thomas Gleixner Cc: Borislav Petkov Cc: Andy Lutomirski Cc

[PATCH v12 08/18] x86/entry/64: Document GSBASE handling in the paranoid path

2020-05-10 Thread Sasha Levin
From: "Chang S. Bae" On FSGSBASE systems, the way to handle GS base in the paranoid path is different from the existing SWAPGS-based entry/exit path handling. Document the reason and what has to be done for FSGSBASE enabled systems. Signed-off-by: Chang S. Bae Signed-off-by: Sasha Levin Review

[PATCH v2] spi: sun6i: Add support for GPIO chip select lines

2020-05-10 Thread Alistair Francis
Set use_gpio_descriptors as true to support using generic GPIO lines for the chip select. Signed-off-by: Alistair Francis --- v2: - Use use_gpio_descriptors instead of spi_setup drivers/spi/spi-sun6i.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/spi/spi-sun6i.c b/drivers/spi/sp

[PATCH v12 09/18] x86/fsgsbase/64: Add intrinsics for FSGSBASE instructions

2020-05-10 Thread Sasha Levin
From: Andi Kleen [ luto: Rename the variables from FS and GS to FSBASE and GSBASE and make safe to include on 32-bit kernels. ] Signed-off-by: Andi Kleen Signed-off-by: Andy Lutomirski Signed-off-by: Chang S. Bae Signed-off-by: Thomas Gleixner Signed-off-by: Sasha Levin Reviewed-by: Andy

[PATCH v12 11/18] x86/fsgsbase/64: Use FSGSBASE in switch_to() if available

2020-05-10 Thread Sasha Levin
From: Andy Lutomirski With the new FSGSBASE instructions, FS/GS base can be efficiently read and written in __switch_to(). Use that capability to preserve the full state. This will enable user code to do whatever it wants with the new instructions without any kernel-induced gotchas. (There can

[PATCH v12 16/18] x86/fsgsbase/64: Enable FSGSBASE on 64bit by default and add a chicken bit

2020-05-10 Thread Sasha Levin
From: Andy Lutomirski Now that FSGSBASE is fully supported, remove unsafe_fsgsbase, enable FSGSBASE by default, and add nofsgsbase to disable it. While this changes userspace visible ABI, we could not find a project that would be affected by this. Few projects were contacted for input and ack:

[PATCH v12 15/18] selftests/x86/fsgsbase: Test ptracer-induced GS base write with FSGSBASE

2020-05-10 Thread Sasha Levin
From: "Chang S. Bae" This validates that GS selector and base are independently preserved in ptrace commands. Suggested-by: Andy Lutomirski Signed-off-by: Chang S. Bae Signed-off-by: Sasha Levin Reviewed-by: Tony Luck Cc: Thomas Gleixner Cc: Borislav Petkov Cc: Andy Lutomirski Cc: H. Pete

[PATCH v12 05/18] x86/entry/64: Switch CR3 before SWAPGS in paranoid entry

2020-05-10 Thread Sasha Levin
From: "Chang S. Bae" When FSGSBASE is enabled, the GS base handling in paranoid entry will need to retrieve the kernel GS base which requires that the kernel page table is active. As the CR3 switch to the kernel page tables (PTI is active) does not depend on kernel GS base, move the CR3 switch i

[PATCH v12 07/18] x86/entry/64: Handle FSGSBASE enabled paranoid entry/exit

2020-05-10 Thread Sasha Levin
From: "Chang S. Bae" Without FSGSBASE, user space cannot change GS base other than through a PRCTL. The kernel enforces that the user space GS base value is positive as negative values are used for detecting the kernel space GS base value in the paranoid entry code. If FSGSBASE is enabled, user

[PATCH v12 10/18] x86/fsgsbase/64: Enable FSGSBASE instructions in helper functions

2020-05-10 Thread Sasha Levin
From: "Chang S. Bae" Add CPU feature conditional FS/GS base access to the relevant helper functions. That allows accelerating certain FS/GS base operations in subsequent changes. Note, that while possible, the user space entry/exit GS base operations are not going to use the new FSGSBASE instruc

[PATCH v12 12/18] x86/fsgsbase/64: move save_fsgs to header file

2020-05-10 Thread Sasha Levin
Given copy_thread_tls() is now shared between 32 and 64 bit and we need to use save_fsgs() there, move it to a header file. Signed-off-by: Sasha Levin --- arch/x86/kernel/process.h| 72 arch/x86/kernel/process_64.c | 68 --

[PATCH v12 17/18] x86/elf: Enumerate kernel FSGSBASE capability in AT_HWCAP2

2020-05-10 Thread Sasha Levin
From: Andi Kleen The kernel needs to explicitly enable FSGSBASE. So, the application needs to know if it can safely use these instructions. Just looking at the CPUID bit is not enough because it may be running in a kernel that does not enable the instructions. One way for the application would b

[PATCH v12 04/18] x86/entry/64: Clean up paranoid exit

2020-05-10 Thread Sasha Levin
From: Andy Lutomirski All that paranoid exit needs to do is to disable IRQs, handle IRQ tracing, then restore CR3, and restore GS base. Simply do those actions in that order. Cleaning up the spaghetti code. Signed-off-by: Andy Lutomirski Signed-off-by: Chang S. Bae Signed-off-by: Sasha Levin

[PATCH v12 03/18] x86/cpu: Add 'unsafe_fsgsbase' to enable CR4.FSGSBASE

2020-05-10 Thread Sasha Levin
From: Andy Lutomirski This is temporary. It will allow the next few patches to be tested incrementally. Setting unsafe_fsgsbase is a root hole. Don't do it. Signed-off-by: Andy Lutomirski Signed-off-by: Chang S. Bae Signed-off-by: Sasha Levin Reviewed-by: Tony Luck Cc: Thomas Gleixner Cc

[PATCH v12 18/18] Documentation/x86/64: Add documentation for GS/FS addressing mode

2020-05-10 Thread Sasha Levin
From: Thomas Gleixner Explain how the GS/FS based addressing can be utilized in user space applications along with the differences between the generic prctl() based GS/FS base control and the FSGSBASE version available on newer CPUs. Originally-by: Andi Kleen Signed-off-by: Thomas Gleixner Sig

[PATCH v12 00/18] Enable FSGSBASE instructions

2020-05-10 Thread Sasha Levin
Benefits: Currently a user process that wishes to read or write the FS/GS base must make a system call. But recent X86 processors have added new instructions for use in 64-bit mode that allow direct access to the FS and GS segment base addresses. The operating system controls whether applications

Re: [PATCH] spi: sun6i: Add support for GPIO chip select lines

2020-05-10 Thread Alistair
On Wed, May 6, 2020, at 1:27 AM, Geert Uytterhoeven wrote: > Hi Alistair, > > On Wed, May 6, 2020 at 3:41 AM Alistair Francis > wrote: > > Add a setup function that can be used to support using generic GPIO > > lines for the chip select. > > > > Signed-off-by: Alistair Francis > > --- > > drive

[PATCH 06/19] ipv4: do compat setsockopt for MCAST_MSFILTER directly

2020-05-10 Thread Al Viro
From: Al Viro Parallel to what the native setsockopt() does, except that unlike the native setsockopt() we do not use memdup_user() - we want the sockaddr_storage fields properly aligned, so we allocate 4 bytes more and copy compat_group_filter at the offset 4, which yields the proper alignments.

Re: [PATCH v11 00/18] Enable FSGSBASE instructions

2020-05-10 Thread Sasha Levin
On Sun, May 10, 2020 at 05:53:19PM -0700, Andi Kleen wrote: My interest in this is that we have a few workloads that value the ability to access FS/GS base directly and show nice performance Can you please share some rough numbers, Sasha? I don't have any recent numbers around these - this se

[PATCH 04/19] get rid of compat_mc_getsockopt()

2020-05-10 Thread Al Viro
From: Al Viro now we can do MCAST_MSFILTER in compat ->getsockopt() without playing silly buggers with copying things back and forth. We can form a native struct group_filter (sans the variable-length tail) on stack, pass that + pointer to the tail of original request to the helper doing the bulk

[PATCH 03/19] ip*_mc_gsfget(): lift copyout of struct group_filter into callers

2020-05-10 Thread Al Viro
From: Al Viro pass the userland pointer to the array in its tail, so that part gets copied out by our functions; copyout of everything else is done in the callers. Rationale: reuse for compat; the array is the same in native and compat, the layout of parts before it is different for compat. Sig

Re: [PATCH] selftests:mptcp: fix empty optstring

2020-05-10 Thread Li Zhijian
ping On 4/2/20 2:52 PM, Li Zhijian wrote: From: Li Zhijian Signed-off-by: Li Zhijian --- tools/testing/selftests/net/mptcp/pm_netlink.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/pm_netlink.sh b/tools/testing/selftests/net/mpt

[PATCH 01/19] lift compat definitions of mcast [sg]etsockopt requests into net/compat.h

2020-05-10 Thread Al Viro
From: Al Viro We want to get rid of compat_mc_[sg]etsockopt() and to have that stuff handled without compat_alloc_user_space(), extra copying through userland, etc. To do that we'll need ipv4 and ipv6 instances of ->compat_[sg]etsockopt() to manipulate the 32bit variants of mcast requests, so we

[PATCH 07/19] ip6_mc_msfilter(): pass the address list separately

2020-05-10 Thread Al Viro
From: Al Viro that way we'll be able to reuse it for compat case Signed-off-by: Al Viro --- include/net/ipv6.h | 3 ++- net/ipv6/ipv6_sockglue.c | 2 +- net/ipv6/mcast.c | 7 --- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/net/ipv6.h b/include/net/i

[PATCH 09/19] ipv[46]: do compat setsockopt for MCAST_{JOIN,LEAVE}_GROUP directly

2020-05-10 Thread Al Viro
From: Al Viro direct parallel to the way these two are handled in the native ->setsockopt() instances - the helpers that do the real work are already separated and can be reused as-is in this case. Signed-off-by: Al Viro --- net/ipv4/ip_sockglue.c | 31 +++ net/ip

[PATCH 11/19] ipv6: take handling of group_source_req options into a helper

2020-05-10 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- net/ipv6/ipv6_sockglue.c | 65 +++- 1 file changed, 36 insertions(+), 29 deletions(-) diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index b386a2b3668c..fc525ad9ed3c 100644 --- a/net/ipv6/ipv

[PATCH 19/19] atm: switch do_atmif_sioc() to direct use of atm_dev_ioctl()

2020-05-10 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- net/atm/ioctl.c | 25 - 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/net/atm/ioctl.c b/net/atm/ioctl.c index 52f2c77e656f..838ebf0cabbf 100644 --- a/net/atm/ioctl.c +++ b/net/atm/ioctl.c @@ -286,30 +286,13 @@ sta

[PATCH 10/19] ipv4: take handling of group_source_req options into a helper

2020-05-10 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- net/ipv4/ip_sockglue.c | 83 ++ 1 file changed, 44 insertions(+), 39 deletions(-) diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c index 937f39906419..4f412b0bdda4 100644 --- a/net/ipv4/ip_sock

[PATCH 14/19] batadv_socket_read(): get rid of pointless access_ok()

2020-05-10 Thread Al Viro
From: Al Viro address is passed only to copy_to_user() Signed-off-by: Al Viro --- net/batman-adv/icmp_socket.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/net/batman-adv/icmp_socket.c b/net/batman-adv/icmp_socket.c index ccb535c77e5d..8bdabc03b0b2 100644 --- a/net/batman-adv/icmp_soc

[PATCH 13/19] get rid of compat_mc_setsockopt()

2020-05-10 Thread Al Viro
From: Al Viro not used anymore Signed-off-by: Al Viro --- include/net/compat.h | 4 --- net/compat.c | 90 2 files changed, 94 deletions(-) diff --git a/include/net/compat.h b/include/net/compat.h index b6043e759cde..2de4dfcdc11f 1

[PATCH 15/19] atm: separate ATM_GETNAMES handling from the rest of atm_dev_ioctl()

2020-05-10 Thread Al Viro
From: Al Viro atm_dev_ioctl() does copyin in two different ways - one for ATM_GETNAMES, another for everything else. Start with separating the former into a new helper (atm_getnames()). The next step will be to lift the copyin into the callers. Signed-off-by: Al Viro --- net/atm/ioctl.c

[PATCH 12/19] handle the group_source_req options directly

2020-05-10 Thread Al Viro
From: Al Viro Native ->setsockopt() handling of these options (MCAST_..._SOURCE_GROUP and MCAST_{,UN}BLOCK_SOURCE) consists of copyin + call of a helper that does the actual work. The only change needed for ->compat_setsockopt() is a slightly different copyin - the helpers can be reused as-is.

[PATCH 18/19] atm: lift copyin from atm_dev_ioctl()

2020-05-10 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- net/atm/ioctl.c | 25 - net/atm/resources.c | 35 +-- net/atm/resources.h | 4 ++-- 3 files changed, 31 insertions(+), 33 deletions(-) diff --git a/net/atm/ioctl.c b/net/atm/ioctl.c index fdd0

[PATCH 17/19] atm: switch do_atm_iobuf() to direct use of atm_getnames()

2020-05-10 Thread Al Viro
From: Al Viro ... and sod the compat_alloc_user_space() with its complications Signed-off-by: Al Viro --- net/atm/ioctl.c | 25 +++-- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/net/atm/ioctl.c b/net/atm/ioctl.c index e239cebf48da..fdd0e3434523 100644 ---

[PATCH 05/19] set_mcast_msfilter(): take the guts of setsockopt(MCAST_MSFILTER) into a helper

2020-05-10 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- net/ipv4/ip_sockglue.c | 73 +++--- 1 file changed, 40 insertions(+), 33 deletions(-) diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c index 6bdaf43236ea..8c14a474870d 100644 --- a/net/ipv4/ip_sock

[PATCH 08/19] ipv6: do compat setsockopt for MCAST_MSFILTER directly

2020-05-10 Thread Al Viro
From: Al Viro similar to the ipv4 counterpart of that patch - the same trick used to align the tail array properly. Signed-off-by: Al Viro --- net/ipv6/ipv6_sockglue.c | 48 +++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/net/ipv6/

[PATCH 16/19] atm: move copyin from atm_getnames() into the caller

2020-05-10 Thread Al Viro
From: Al Viro Signed-off-by: Al Viro --- net/atm/ioctl.c | 19 ++- net/atm/resources.c | 19 +-- net/atm/resources.h | 2 +- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/net/atm/ioctl.c b/net/atm/ioctl.c index 0b4b07740fe4..e239cebf48da 1

[PATCH 02/19] compat_ip{,v6}_setsockopt(): enumerate MCAST_... options explicitly

2020-05-10 Thread Al Viro
From: Al Viro We want to check if optname is among the MCAST_... ones; do that as an explicit switch. Signed-off-by: Al Viro --- net/ipv4/ip_sockglue.c | 10 +- net/ipv6/ipv6_sockglue.c | 10 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/net/ipv4/ip_sockg

[RFC][PATCHES] uaccess-related stuff in net/*

2020-05-10 Thread Al Viro
Assorted uaccess-related work in net/*. First, there's getting rid of compat_alloc_user_space() mess in MCAST_... [gs]etsockopt() - no need to play with copying to/from temporary object on userland stack, etc., when ->compat_[sg]etsockopt() instances in question can easly do everything wit

[PATCH] vfio/pci: fix memory leaks of eventfd ctx

2020-05-10 Thread Qian Cai
Finished a qemu-kvm (-device vfio-pci,host=0001:01:00.0) triggers a few memory leaks after a while because vfio_pci_set_ctx_trigger_single() calls eventfd_ctx_fdget() without the matching eventfd_ctx_put() later. Fix it by calling eventfd_ctx_put() for those memory in vfio_pci_release() before vfio

Re: [patch V4 part 3 12/29] x86/entry/common: Provide idtentry_enter/exit()

2020-05-10 Thread Andy Lutomirski
On Tue, May 5, 2020 at 7:15 AM Thomas Gleixner wrote: > > Provide functions which handle the low level entry and exit similiar to > enter/exit from user mode. > > + > +/** > + * idtentry_exit - Common code to handle return from exceptions > + * @regs: Pointer to pt_regs (exception entry regs

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

2020-05-10 Thread Stephen Rothwell
Hi all, After merging the block tree, today's linux-next build (x86_64 allmodconfig) failed like this: drivers/block/aoe/aoeblk.c: In function 'aoeblk_gdalloc': drivers/block/aoe/aoeblk.c:410:21: error: 'struct backing_dev_info' has no member named 'name' 410 | q->backing_dev_info->name = "ao

[PATCH] kbuild: make module name conflict fatal error

2020-05-10 Thread Masahiro Yamada
I think all the warnings have been fixed by now. Make it a fatal error. Check it before modpost because we need to stop building *.ko files. Also, pass modules.order via a script parameter. Signed-off-by: Masahiro Yamada --- Makefile | 7 +-- scripts/modules-check.sh | 16

Re: [LKP] Re: [pipe] f2af7d90e2: xfstests.btrfs.052.fail

2020-05-10 Thread Li Zhijian
Hi Matthew with a quick look into the dmesg looks this commit broke the preparation of LKP tests [   32.677588] install debs round two: dpkg -i --force-confdef --force-depends /opt/deb/gawk_1%3a4.1.4+dfsg-1_amd64.deb [ 32.677593]- [   32.697180] tar: ./control: Cannot write: Invalid argument [

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

2020-05-10 Thread Randy Dunlap
On 5/10/20 8:47 PM, Stephen Rothwell wrote: > Hi all, > > After merging the drm tree, today's linux-next build (x86_64 allmodconfig) > produced this warning: > > WARNING: modpost: missing MODULE_LICENSE() in > drivers/gpu/drm/panel/panel-visionox-rm69299.o > > Introduced by commit > > c7f66d

Re: [PATCH V3 1/3] arm64/mm: Drop __HAVE_ARCH_HUGE_PTEP_GET

2020-05-10 Thread Anshuman Khandual
On 05/09/2020 03:39 AM, Mike Kravetz wrote: > On 5/7/20 8:07 PM, Anshuman Khandual wrote: >> Platform specific huge_ptep_get() is required only when fetching the huge >> PTE involves more than just dereferencing the page table pointer. This is >> not the case on arm64 platform. Hence huge_ptep_p

[PATCH 1/2] kbuild: add this-makefile as a shorthand for $(lastword $(MAKEFILE_LIST))

2020-05-10 Thread Masahiro Yamada
Make it clearer, and self-documenting. Signed-off-by: Masahiro Yamada --- Makefile | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 119a08c90abb..1a4977ad7cd9 100644 --- a/Makefile +++ b/Makefile @@ -157,12 +157,14 @@ MAKEFLAGS += --include-dir

[PATCH 2/2] kbuild: error out if targets prefixed with '__' are directly run

2020-05-10 Thread Masahiro Yamada
Some targets are internal-use only. It is tedious to care about "what if __build_one_by_one is contained in $(MAKECMDGOALS)?" etc. Prefix internal targets with double underscores. Stop parsing Makefile if they are directly run. Signed-off-by: Masahiro Yamada --- Makefile | 23 +---

  1   2   3   4   5   6   >