Re: [PATCH 0/4] arm64/mm: migrate swapper_pg_dir

2018-06-01 Thread Robin Murphy
On 01/06/18 09:08, Jun Yao wrote: Currently, The offset between swapper_pg_dir and _text is fixed. When attackers know the address of _text(no KASLR or breaking KASLR), they can caculate the address of swapper_pg_dir. Then KSMA(Kernel Space Mirroring Attack) can be applied. The principle of KSMA

Re: [PATCH 4/4] arm64/mm: migrate swapper_pg_dir and tramp_pg_dir

2018-06-01 Thread Robin Murphy
On 01/06/18 09:09, Jun Yao wrote: Migrate swapper_pg_dir and tramp_pg_dir. And their virtual addresses do not correlate with kernel's address. I think this might break software PAN, which IIRC depends on the reserved TTBR0 PGD being physically adjacent to the live swapper PGD for the trickery

Re: [PATCH v3 0/8] gnss: add new GNSS subsystem

2018-06-01 Thread Johan Hovold
On Fri, Jun 01, 2018 at 11:33:11AM +0200, Pavel Machek wrote: > Hi! > > > This series adds a new subsystem for GNSS receivers (e.g. GPS > > receivers). > > > > While GNSS receivers are typically accessed using a UART interface they > > often also support other I/O interfaces such as I2C, SPI and

[PATCH] perf tools: Fix hist_entry__tui_annotate declaration for !HAVE_SLANG_SUPPORT

2018-06-01 Thread Jiri Olsa
The compilation is broken if there's no slang support: builtin-annotate.c: In function ‘hists__find_annotations’: builtin-annotate.c:344:10: error: too many arguments to function ‘hist_entry__tui_annotate’ key = hist_entry__tui_annotate(he, evsel, NULL, &ann->opts); Adding the missing

Re: [PATCH 4.16 269/272] pinctrl: msm: Use dynamic GPIO numbering

2018-06-01 Thread Timur Tabi
On 5/31/18 11:57 AM, Bjorn Andersson wrote: (Although that would probably break if Timur's customers move their user space to the new platform as "the first instance" isn't deterministic). Users of platforms that have multiple TLMMs should be required to use gpiolib instead of sysfs. I've alr

Re: [PATCH v1 1/2] ACPI / APEI: Add SEI notification type support for ARMv8

2018-06-01 Thread gengdongjiu
Hi Mark, Thanks for the comments. On 2018/5/31 18:52, Mark Rutland wrote: > On Thu, May 31, 2018 at 08:41:45PM +0800, Dongjiu Geng wrote: >> +#ifdef CONFIG_ACPI_APEI_SEI >> +static LIST_HEAD(ghes_sei); >> + >> +/* >> + * Return 0 only if one of the SEI error sources successfully reported an >>

Re: [PATCH v3] PCI: mediatek: Add system pm support for MT2712

2018-06-01 Thread Andy Shevchenko
On Fri, Jun 1, 2018 at 6:04 AM, wrote: > From: Honghui Zhang > +#ifdef CONFIG_PM_SLEEP > +static int mtk_pcie_suspend_noirq(struct device *dev) __maybe_unused -- With Best Regards, Andy Shevchenko

Re: [RFC 2/6] dmaengine: xilinx_dma: Pass AXI4-Stream control words to netdev dma client

2018-06-01 Thread Peter Ujfalusi
Hi Radhey, On 2018-05-30 20:29, Radhey Shyam Pandey wrote: >> In couple of days I can update the metadata patches I have atm and send >> as RFC. >> >> Is there anything from your side I should take into account when doing that? > I think a generic interface to attach/share metadata buffer b/w clie

Re: [PATCH v3 05/16] lib: overflow: Add memory allocation overflow tests

2018-06-01 Thread Andy Shevchenko
On Fri, Jun 1, 2018 at 3:42 AM, Kees Cook wrote: > Make sure that the memory allocators are behaving as expected in the face > of overflows. > #include > #include > #include > +#include > +#include > +#include A nit, can we keep it in order? -- With Best Regards, Andy Shevchenko

Re: [PATCH 01/19 v3] regulator: fixed: Convert to use GPIO descriptor only

2018-06-01 Thread Mark Brown
On Fri, Jun 01, 2018 at 11:35:11AM +0200, Thierry Reding wrote: > > cfg.ena_gpio_invert = !config->enable_high; > Change this line to: > cfg.ena_gpio_invert = false; > fixes the regression and is pretty much the implementation of my above > suggestion to ignore enable-active-high, tho

mlock() confusing 1 half of system RAM limit

2018-06-01 Thread Alex Richman
Hi, I'm seeing a 1/2 of system RAM limit when calling mlock().  mlock(2) says: > ENOMEM (Linux 2.4 and earlier) the calling process tried to lock more than half of RAM. Which implies to me that the 1 half of system RAM limit should be only Linux 2.4 and earlier, but I'm running linux 4.4.127 an

[PATCH] virtio: update the comments for transport features

2018-06-01 Thread Tiwei Bie
Suggested-by: Michael S. Tsirkin Signed-off-by: Tiwei Bie --- This patch is generated on top of below patch: https://lists.oasis-open.org/archives/virtio-dev/201805/msg00212.html include/uapi/linux/virtio_config.h | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/incl

[RFC] dmaengine: Add metadat_ops for dma_async_tx_descriptor

2018-06-01 Thread Peter Ujfalusi
If the DMA supports per descriptor metadata it can implement the attach, get_ptr/set_len callbacks. Client drivers must only use either attach or get_ptr/set_len to avoid miss configuration. Wrappers are also added for the metadata_ops: dmaengine_desc_attach_metadata() dmaengine_desc_get_metadata

[PATCH] fixup! gcc-plugins: test plugin support in Kconfig and clean up Makefile

2018-06-01 Thread Masahiro Yamada
Signed-off-by: Masahiro Yamada --- arch/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/Kconfig b/arch/Kconfig index e5ff804..3f93769 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -405,7 +405,7 @@ preferred-plugin-hostcc := $(if-success,[ $(gcc-version) -ge 40

Re: [PATCH v2 1/3] ASoC: topology: Improve backwards compatibility with v4 topology files

2018-06-01 Thread Mark Brown
On Thu, May 24, 2018 at 12:49:21PM -0700, Guenter Roeck wrote: > From: Guenter Roeck > > Commit dc31e741db49 ("ASoC: topology: ABI - Add the types for BE > DAI") introduced sound topology files version 5. Initially, this > change made the topology code incompatible with v4 topology files. No rev

Re: [PATCH v3 0/8] gnss: add new GNSS subsystem

2018-06-01 Thread Pavel Machek
On Fri 2018-06-01 11:49:59, Johan Hovold wrote: > On Fri, Jun 01, 2018 at 11:33:11AM +0200, Pavel Machek wrote: > > Hi! > > > > > This series adds a new subsystem for GNSS receivers (e.g. GPS > > > receivers). > > > > > > While GNSS receivers are typically accessed using a UART interface they > >

Re: deadlock during writeback when using f2fs filesystem

2018-06-01 Thread Michal Hocko
On Fri 01-06-18 15:02:35, Sahitya Tummala wrote: > Hi, > > We are observing a deadlock scenario during FS writeback under low-memory > condition with F2FS filesystem. > > Here is the callstack of this scenario - > > shrink_inactive_list() > shrink_node_memcg.isra.74() > shrink_node() > shrink_zo

Re: [PATCH 06/18] arm64: move sve_user_{enable, disable} to

2018-06-01 Thread Mark Rutland
On Wed, May 16, 2018 at 10:01:32AM +0100, Dave Martin wrote: > On Tue, May 15, 2018 at 05:33:52PM +0100, Mark Rutland wrote: > > On Tue, May 15, 2018 at 01:19:26PM +0100, Dave Martin wrote: > > > On Tue, May 15, 2018 at 11:39:36AM +0100, Mark Rutland wrote: > > > > Earlier I'd put BUILD_BUG() in th

Re: [PATCH v5 00/31] kconfig: move compiler capability tests to Kconfig

2018-06-01 Thread Masahiro Yamada
2018-06-01 17:31 GMT+09:00 Arnd Bergmann : > On Wed, May 30, 2018 at 2:38 AM, Masahiro Yamada > wrote: >> 2018-05-28 21:23 GMT+09:00 Masahiro Yamada : >>> 2018-05-28 18:21 GMT+09:00 Masahiro Yamada : > >> >> I pushed this series to the for-next branch. >> Unless a significant problem is reported,

ptrval hiding -- first kernel messages look rather "interesting"

2018-06-01 Thread Pavel Machek
Hi! v4.17 on n900: [0.00] Virtual kernel memory layout: [0.00] vector : 0x - 0x1000 ( 4 kB) [0.00] fixmap : 0xffc0 - 0xfff0 (3072 kB) [0.00] vmalloc : 0xd000 - 0xff80 ( 760 MB) [0.00] lowmem : 0xc00

Re: [PATCH 06/18] arm64: move sve_user_{enable, disable} to

2018-06-01 Thread Dave Martin
On Fri, Jun 01, 2018 at 11:29:13AM +0100, Mark Rutland wrote: > On Wed, May 16, 2018 at 10:01:32AM +0100, Dave Martin wrote: > > On Tue, May 15, 2018 at 05:33:52PM +0100, Mark Rutland wrote: > > > On Tue, May 15, 2018 at 01:19:26PM +0100, Dave Martin wrote: > > > > On Tue, May 15, 2018 at 11:39:36A

Re: [PATCH v3] PCI: mediatek: Add system pm support for MT2712

2018-06-01 Thread Honghui Zhang
On Fri, 2018-06-01 at 13:17 +0300, Andy Shevchenko wrote: > On Fri, Jun 1, 2018 at 6:04 AM, wrote: > > From: Honghui Zhang > > > +#ifdef CONFIG_PM_SLEEP > > +static int mtk_pcie_suspend_noirq(struct device *dev) > > __maybe_unused > Hi, Andy, thanks for your review. Bjorn had point this out

Re: ptrval hiding -- first kernel messages look rather "interesting"

2018-06-01 Thread Andy Shevchenko
On Fri, Jun 1, 2018 at 1:31 PM, Pavel Machek wrote: > Hi! > > v4.17 on n900: > > [0.00] Virtual kernel memory layout: > [0.00] vector : 0x - 0x1000 ( 4 kB) > [0.00] fixmap : 0xffc0 - 0xfff0 (3072 kB) > [0.00] vmalloc : 0xd

Re: [PATCH v4 2/6] mfd: bd71837: Devicetree bindings for ROHM BD71837 PMIC

2018-06-01 Thread Matti Vaittinen
On Thu, May 31, 2018 at 07:57:53AM -0700, Stephen Boyd wrote: > Quoting Rob Herring (2018-05-31 07:07:24) > > On Thu, May 31, 2018 at 5:23 AM, Matti Vaittinen > > wrote: > > > On Thu, May 31, 2018 at 10:17:17AM +0300, Matti Vaittinen wrote: > > >> Hello Rob, > > >> > > >> Thanks for the review! >

Re: [PATCH v3] PCI: mediatek: Add system pm support for MT2712

2018-06-01 Thread Andy Shevchenko
On Fri, Jun 1, 2018 at 1:49 PM, Honghui Zhang wrote: > On Fri, 2018-06-01 at 13:17 +0300, Andy Shevchenko wrote: >> On Fri, Jun 1, 2018 at 6:04 AM, wrote: >> > From: Honghui Zhang >> >> > +#ifdef CONFIG_PM_SLEEP >> > +static int mtk_pcie_suspend_noirq(struct device *dev) >> >> __maybe_unused >>

Re: [PATCH v2 13/21] ima: use match_string() helper

2018-06-01 Thread Andy Shevchenko
On Thu, May 31, 2018 at 6:02 PM, Mimi Zohar wrote: > On Thu, 2018-05-31 at 19:11 +0800, Yisheng Xie wrote: >> match_string() returns the index of an array for a matching string, >> which can be used instead of open coded variant. >> >> Reviewed-by: Mimi Zohar >> Reviewed-by: Andy Shevchenko >> C

linux-next: Tree for Jun 1

2018-06-01 Thread Stephen Rothwell
Hi all, Changes since 20180531: Removed tree: mips (by request) Renamed tree: mips-james to mips The cifs tree gained a build failure so I used the version from next-20180531. The vfs tree gained conflicts against Linus' and the ext3 trees. The net-next tree still had its build failure for whi

Re: ptrval hiding -- first kernel messages look rather "interesting"

2018-06-01 Thread Pavel Machek
On Fri 2018-06-01 13:49:41, Andy Shevchenko wrote: > On Fri, Jun 1, 2018 at 1:31 PM, Pavel Machek wrote: > > Hi! > > > > v4.17 on n900: > > > > [0.00] Virtual kernel memory layout: > > [0.00] vector : 0x - 0x1000 ( 4 kB) > > [0.00] fixmap : 0xffc00

[PULL REQUEST] i2c for 4.17

2018-06-01 Thread Wolfram Sang
Linus, I2C has a documentation bugfix and a MAINTAINERS addition for you. It would be great to have that in 4.17 proper already. Please pull. Thanks, Wolfram The following changes since commit 771c577c23bac90597c685971d7297ea00f99d11: Linux 4.17-rc6 (2018-05-20 15:31:38 -0700) are avai

[PATCH] coresight: Fix check in coresight_tmc_etr_buf_insert_barrier_packet

2018-06-01 Thread Suzuki K Poulose
We request for "CORESIGHT_BARRIER_PKT_SIZE" length and we should be happy when we get that size. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose --- Mathieu, Please could you pull this patch, if you are happy with it ? This fixes a problem in the ETR buf series, which I just noticed while

Re: [PATCH v3] lib/bch: Remove VLA usage

2018-06-01 Thread Ivan Djelic
On Thu, May 31, 2018 at 11:45:25AM -0700, Kees Cook wrote: > In the quest to remove all stack VLA usage from the kernel[1], this > allocates a fixed size stack array to cover the range needed for > bch. This was done instead of a preallocation on the SLAB due to > performance reasons, shown by Ivan

Re: [PATCH v5 00/31] kconfig: move compiler capability tests to Kconfig

2018-06-01 Thread Arnd Bergmann
On Fri, Jun 1, 2018 at 12:29 PM, Masahiro Yamada wrote: > 2018-06-01 17:31 GMT+09:00 Arnd Bergmann : >> On Wed, May 30, 2018 at 2:38 AM, Masahiro Yamada >> wrote: >>> 2018-05-28 21:23 GMT+09:00 Masahiro Yamada : 2018-05-28 18:21 GMT+09:00 Masahiro Yamada : > > In the original scripts/Makefil

Re: [PATCH] fixup! gcc-plugins: test plugin support in Kconfig and clean up Makefile

2018-06-01 Thread Arnd Bergmann
On Fri, Jun 1, 2018 at 12:24 PM, Masahiro Yamada wrote: > Signed-off-by: Masahiro Yamada Tested-by: Arnd Bergmann

Re: [NOMERGE] [RFC PATCH 00/12] erofs: introduce erofs file system

2018-06-01 Thread Gao Xiang
On 2018/6/1 17:28, Richard Weinberger wrote: > Am Freitag, 1. Juni 2018, 11:11:21 CEST schrieb Gao Xiang: >>> In which sense is it extendable? >> >> Actually, the meaning of an enhanced (means not just read-only, but with the >> scalable >> on-disk layout, compression, or fs-verify in the futur

Re: [PATCH v2 1/1] mmc: sdhci-pci-dwc-mshc: synopsys dwc mshc support

2018-06-01 Thread Prabu Thangamuthu
Hi Adrian, On 6/1/2018 2:06 PM, Adrian Hunter wrote: > Hi > > This patch is still corrupt. Your mail program is converting it to > quoted-printable - try saving and applying it yourself. I suggest you learn > to use git send-mail. I was using Thunderbird (GUI) with configuration mentioned as per

[PATCHv2 03/19] arm64: introduce sysreg_clear_set()

2018-06-01 Thread Mark Rutland
Currently we have a couple of helpers to manipulate bits in particular sysregs: * config_sctlr_el1(u32 clear, u32 set) * change_cpacr(u64 val, u64 mask) The parameters of these differ in naming convention, order, and size, which is unfortunate. They also differ slightly in behaviour, as change

[PATCHv2 15/19] arm64: remove in-kernel call to sys_personality()

2018-06-01 Thread Mark Rutland
With pt_regs syscall wrappers, the calling convention for sys_personality() will change. Use ksys_personality(), which is functionally equivalent. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/kernel/sys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCHv2 01/19] arm64: consistently use unsigned long for thread flags

2018-06-01 Thread Mark Rutland
In do_notify_resume, we manipulate thread_flags as a 32-bit unsigned int, whereas thread_info::flags is a 64-bit unsigned long, and elsewhere (e.g. in the entry assembly) we manipulate the flags as a 64-bit quantity. For consistency, and to avoid problems if we end up with more than 32 flags, let'

[PATCHv2 00/19] arm64: invoke syscalls with pt_regs

2018-06-01 Thread Mark Rutland
This series reworks arm64's syscall handling to minimize the propagation of user-controlled register values into speculated code paths. As with x86 [1], a wrapper is generated for each syscall, which extracts the argument from a struct pt_regs. During kernel entry from userspace, registers are zero

[no subject]

2018-06-01 Thread man...@ono.com
Hi dear. It is wonderful to contact you, I want us to have correspondence. I wish you will have the desire so that we can get acquainted to each other. Life itself is a mystery, you never know where it might lead you. I'm Tracy.William, a French American . I will be pleased if you reply me t

[PATCHv2 09/19] arm64: convert syscall trace logic to C

2018-06-01 Thread Mark Rutland
Currently syscall tracing is a tricky assembly state machine, which can be rather difficult to follow, and even harder to modify. Before we start fiddling with it for pt_regs syscalls, let's convert it to C. This is not intended to have any functional change. Signed-off-by: Mark Rutland Cc: Cata

[PATCHv2 18/19] arm64: convert compat wrappers to C

2018-06-01 Thread Mark Rutland
In preparation for converting to pt_regs syscall wrappers, convert our existing compat wrappers to C. This will allow the pt_regs wrappers to be automatically generated, and will allow for the compat register manipulation to be folded in with the pt_regs accesses. To avoid confusion with the upcom

[PATCHv2 19/19] arm64: implement syscall wrappers

2018-06-01 Thread Mark Rutland
To minimize the risk of userspace-controlled values being used under speculation, this patch adds pt_regs based syscall wrappers for arm64, which pass the minimum set of required userspace values to syscall implementations. For each syscall, a wrapper which takes a pt_regs argument is automatically

[PATCHv2 14/19] kernel: add kcompat_sys_{f,}statfs64()

2018-06-01 Thread Mark Rutland
Using this helper allows us to avoid the in-kernel calls to the compat_sys_{f,}statfs64() sycalls, as are necessary for parameter mangling in arm64's compat handling. Following the example of ksys_* functions, kcompat_sys_* functions are intended to be a drop-in replacement for their compat_sys_*

[PATCHv2 17/19] arm64: use SYSCALL_DEFINE6() for mmap

2018-06-01 Thread Mark Rutland
We don't currently annotate our mmap implementation as a syscall, as we need to do to use pt_regs syscall wrappers. Let's mark it as a real syscall. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/

[PATCHv2 16/19] arm64: use {COMPAT,}SYSCALL_DEFINE0 for sigreturn

2018-06-01 Thread Mark Rutland
We don't currently annotate our various sigreturn functions as syscalls, as we need to do to use pt_regs syscall wrappers. Let's mark them as real syscalls. For compat_sys_sigreturn and compat_sys_rt_sigreturn, this changes the return type from int to long, matching the prototypes in sys32.c. Si

[PATCHv2 13/19] kernel: add ksys_personality()

2018-06-01 Thread Mark Rutland
Using this helper allows us to avoid the in-kernel call to the sys_personality() syscall. The ksys_ prefix denotes that this function is meant as a drop-in replacement for the syscall. In particular, it uses the same calling convention as sys_personality(). Since ksys_personality is trivial, it is

[PATCHv2 12/19] arm64: zero GPRs upon entry from EL0

2018-06-01 Thread Mark Rutland
We can zero GPRs x0 - x29 upon entry from EL0 to make it harder for userspace to control values consumed by speculative gadgets. We don't blat x30, since this is stashed much later, and we'll blat it before invoking C code. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon --- a

[PATCHv2 10/19] arm64: convert native/compat syscall entry to C

2018-06-01 Thread Mark Rutland
Now that the syscall invocation logic is in C, we can migrate the rest of the syscall entry logic over, so that the entry assembly needn't look at the register values at all. The SVE reset across syscall logic now unconditionally clears TIF_SVE, but sve_user_disable() will only write back to CPACR

[PATCHv2 11/19] arm64: don't reload GPRs after apply_ssbd

2018-06-01 Thread Mark Rutland
Now that all of the syscall logic works on the saved pt_regs, apply_ssbd can safely corrupt x0-x3 in the entry paths, and we no longer need to restore them. So let's remotve the logic doing so. With that logic gone, we can fold the branch target into the macro, so that callers need not deal with t

[PATCHv2 05/19] arm64: kill change_cpacr()

2018-06-01 Thread Mark Rutland
Now that we have sysreg_clear_set(), we can use this instead of change_cpacr(). Note that the order of the set and clear arguments differs between change_cpacr() and sysreg_clear_set(), so these are flipped as part of the conversion. Also, sve_user_enable() redundantly clears CPACR_EL1_ZEN_EL0EN b

[PATCHv2 08/19] arm64: convert raw syscall invocation to C

2018-06-01 Thread Mark Rutland
As a first step towards invoking syscalls with a pt_regs argument, convert the raw syscall invocation logic to C. We end up with a bit more register shuffling, but the unified invocation logic means we can unify the tracing paths, too. Previously, assembly had to open-code calls to ni_sys() when t

Re: [RFC/RFT] [PATCH v3 0/4] Intel_pstate: HWP Dynamic performance boost

2018-06-01 Thread Giovanni Gherdovich
On Thu, May 31, 2018 at 03:51:39PM -0700, Srinivas Pandruvada wrote: > v3 > - Removed atomic bit operation as suggested. > - Added description of contention with user space. > - Removed hwp cache, boost utililty function patch and merged with util > callback > patch. This way any value set is us

[PATCHv2 07/19] arm64: remove sigreturn wrappers

2018-06-01 Thread Mark Rutland
The arm64 sigreturn* syscall handlers are non-standard. Rather than taking a number of user parameters in registers as per the AAPCS, they expect the pt_regs as their sole argument. To make this work, we override the syscall definitions to invoke wrappers written in assembly, which mov the SP into

[PATCHv2 04/19] arm64: kill config_sctlr_el1()

2018-06-01 Thread Mark Rutland
Now that we have sysreg_clear_set(), we can consistently use this instead of config_sctlr_el1(). Signed-off-by: Mark Rutland Reviewed-by: Dave Martin Cc: Catalin Marinas Cc: James Morse Cc: Will Deacon --- arch/arm64/include/asm/sysreg.h | 10 -- arch/arm64/kernel/armv8_deprecat

[PATCHv2 06/19] arm64: move sve_user_{enable,disable} to

2018-06-01 Thread Mark Rutland
In subsequent patches, we'll want to make use of sve_user_enable() and sve_user_disable() outside of kernel/fpsimd.c. Let's move these to where we can make use of them. To avoid ifdeffery in sequences like: if (system_supports_sve() && some_condition sve_user_disable(); ... empty stubs

[PATCHv2 02/19] arm64: move SCTLR_EL{1,2} assertions to

2018-06-01 Thread Mark Rutland
Currently we assert that the SCTLR_EL{1,2}_{SET,CLEAR} bits are self-consistent with an assertion in config_sctlr_el1(). This is a bit unusual, since config_sctlr_el1() doesn't make use of these definitions, and is far away from the definitions themselves. We can use the CPP #error directive to ha

[PATCH] x86/MCE: Get microcode revision from cpu_info instead of boot_cpu_data

2018-06-01 Thread Filippo Sironi
Commit fa94d0c6e0f3 ("x86/MCE: Save microcode revision in machine check records") extended MCE entries to report the microcode revision taken from boot_cpu_data. Unfortunately, boot_cpu_data isn't updated on late microcode loading, thus making MCE entries slightly incorrect. Use cpu_info instead, w

[PATCH net] kcm: Fix use-after-free caused by clonned sockets

2018-06-01 Thread Kirill Tkhai
(resend for properly queueing in patchwork) kcm_clone() creates kernel socket, which does not take net counter. Thus, the net may die before the socket is completely destructed, i.e. kcm_exit_net() is executed before kcm_done(). Reported-by: syzbot+5f1a04e374a635efc...@syzkaller.appspotmail.com S

Re: [PATCH v2 21/21] sparc64: use match_string() helper

2018-06-01 Thread Andy Shevchenko
On Thu, May 31, 2018 at 2:11 PM, Yisheng Xie wrote: > match_string() returns the index of an array for a matching string, > which can be used instead of open coded variant. > @@ -512,10 +512,9 @@ static unsigned long __init mdesc_cpu_hwcap_list(void) > break; >

linux-next: Signed-off-by missing for commit in the drivers-x86 tree

2018-06-01 Thread Stephen Rothwell
Hi all, Commit bba074f926d1 ("platform/x86: silead_dmi: Add entry for Chuwi Hi8 S806_206 tablet touchscreen") is missing a Signed-off-by from its author. -- Cheers, Stephen Rothwell pgpFtHG0Jixuv.pgp Description: OpenPGP digital signature

Re: linux-next: Signed-off-by missing for commit in the drivers-x86 tree

2018-06-01 Thread Andy Shevchenko
On Fri, Jun 1, 2018 at 2:36 PM, Stephen Rothwell wrote: > Hi all, > > Commit > > bba074f926d1 ("platform/x86: silead_dmi: Add entry for Chuwi Hi8 S806_206 > tablet touchscreen") > > is missing a Signed-off-by from its author. Oops. What is the proposed fix for that? It seems we can't rebase pu

Re: mlock() confusing 1 half of system RAM limit

2018-06-01 Thread Michal Hocko
On Fri 01-06-18 10:53:57, Alex Richman wrote: > Hi, > > I'm seeing a 1/2 of system RAM limit when calling mlock().  mlock(2) says: > > ENOMEM (Linux 2.4 and earlier) the calling process tried to lock more than > half of RAM. > Which implies to me that the 1 half of system RAM limit should be only

Re: [RFC] PM / devfreq: Add support for alerts

2018-06-01 Thread Akhil P Oommen
On 5/31/2018 11:47 AM, MyungJoo Ham wrote: Currently, DEVFREQ reevaluates the device state periodically and/or based on the OPP list changes. Private API has to be exposed to allow the device driver to alert/notify the governor to reevaluate when a new set of data is available. This makes the

[PATCH] mm: kvmalloc does not fallback to vmalloc for incompatible gfp flags

2018-06-01 Thread Michal Hocko
From: Michal Hocko kvmalloc warned about incompatible gfp_mask to catch abusers (mostly GFP_NOFS) with an intention that this will motivate authors of the code to fix those. Linus argues that this just motivates people to do even more hacks like if (gfp == GFP_KERNEL) kvma

Re: [RFC/RFT] [PATCH v3 4/4] cpufreq: intel_pstate: enable boost for SKX

2018-06-01 Thread Giovanni Gherdovich
On Thu, May 31, 2018 at 03:51:43PM -0700, Srinivas Pandruvada wrote: > Enable HWP boost on Skylake server platform. > > Signed-off-by: Srinivas Pandruvada > --- > drivers/cpufreq/intel_pstate.c | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/drivers/cpufreq/intel_pstate.c b/dr

Re: linux-next: Signed-off-by missing for commit in the drivers-x86 tree

2018-06-01 Thread Stephen Rothwell
Hi Andy, On Fri, 1 Jun 2018 14:40:35 +0300 Andy Shevchenko wrote: > > Oops. What is the proposed fix for that? It seems we can't rebase > published branches. It's unfixable without a rebase, so you could instead consider it an opportunity to improve your processes for the future. :-) -- Cheer

Re: [PATCH] x86/MCE: Get microcode revision from cpu_info instead of boot_cpu_data

2018-06-01 Thread Borislav Petkov
On Fri, Jun 01, 2018 at 01:30:26PM +0200, Filippo Sironi wrote: > Commit fa94d0c6e0f3 ("x86/MCE: Save microcode revision in machine check > records") extended MCE entries to report the microcode revision taken > from boot_cpu_data. Unfortunately, boot_cpu_data isn't updated on late > microcode load

Re: [PATCH v3 0/8] gnss: add new GNSS subsystem

2018-06-01 Thread Johan Hovold
On Fri, Jun 01, 2018 at 12:26:12PM +0200, Pavel Machek wrote: > On Fri 2018-06-01 11:49:59, Johan Hovold wrote: > > On Fri, Jun 01, 2018 at 11:33:11AM +0200, Pavel Machek wrote: > > This series adds an abstraction for GNSS receivers so that they can be > > detected by userspace without resorting t

[PATCH v2] objtool: Fix GCC 8 cold subfunction detection for aliased functions

2018-06-01 Thread Josh Poimboeuf
The kbuild test robot reported the following issue: kernel/time/posix-stubs.o: warning: objtool: sys_ni_posix_timers.cold.1()+0x0: unreachable instruction This file creates symbol aliases for the sys_ni_posix_timers() function. So there are multiple ELF function symbols for the same function:

Re: mlock() confusing 1 half of system RAM limit

2018-06-01 Thread Alex Richman
I am using a shm MAP_SHARED, along these lines: > shm_fd = shm_open(handle, (O_RDWR | O_CREAT), (S_IRWXU | S_IRWXG | S_IRWXO)); > ftruncate(shm_fd, channel->sled_size) > channel->sled = mmap(NULL, channel->sled_size, (PROT_READ | PROT_WRITE), (MAP_SHARED | MAP_NORESERVE), shm_fd, 0); > mlock(c

[PATCH] x86,switch_mm: skip atomic operations for init_mm

2018-06-01 Thread Rik van Riel
Song noticed switch_mm_irqs_off taking a lot of CPU time in recent kernels,using 2.4% of a 48 CPU system during a netperf to localhost run. Digging into the profile, we noticed that cpumask_clear_cpu and cpumask_set_cpu together take about half of the CPU time taken by switch_mm_irqs_off. However,

Spectre mitigation doesn't seem to work at all?!

2018-06-01 Thread Andreas Hartmann
Hello! I tested the spectre mitigation of different machines and kernels with https://github.com/crozone/SpectrePoC You can see the results below. My question: Did I miss something? My expectation was, that on base of the output of /sys/devices/system/cpu/vulnerabilities/spectre_v* as shown be

Re: [PATCH] x86/MCE: Get microcode revision from cpu_info instead of boot_cpu_data

2018-06-01 Thread Sironi, Filippo
> On 1. Jun 2018, at 14:19, Borislav Petkov wrote: > > On Fri, Jun 01, 2018 at 01:30:26PM +0200, Filippo Sironi wrote: >> Commit fa94d0c6e0f3 ("x86/MCE: Save microcode revision in machine check >> records") extended MCE entries to report the microcode revision taken >> from boot_cpu_data. Unfortu

Re: [PATCH 1/4] arm64/mm: pass swapper_pg_dir as an argument to __enable_mmu()

2018-06-01 Thread James Morse
Hi Jun Yao, On 01/06/18 09:08, Jun Yao wrote: > Introduce __pa_swapper_pg_dir to save physical address of > swapper_pg_dir. And pass it as an argument to __enable_mmu(). > diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S > index b0853069702f..e3bb44b4b6c6 100644 > --- a/arch/arm6

[PATCH v12 4/5] arm64: Implement page table free interfaces

2018-06-01 Thread Chintan Pandya
Implement pud_free_pmd_page() and pmd_free_pte_page(). Implementation requires, 1) Clearing off the current pud/pmd entry 2) Invalidate TLB which could have previously valid but not stale entry 3) Freeing of the un-used next level page tables Signed-off-by: Chintan Pandya --- arch/arm64/

[PATCH v12 0/5] Fix issues with huge mapping in ioremap for ARM64

2018-06-01 Thread Chintan Pandya
This series of patches re-bring huge vmap back for arm64. Patch 1/4 has been taken by Toshi in his series of patches by name "[PATCH v3 0/3] fix free pmd/pte page handlings on x86" to avoid merge conflict with this series. These patches are tested on 4.16 kernel with Cortex-A75 based SoC. The te

[PATCH v12 5/5] arm64: Allow huge io mappings again

2018-06-01 Thread Chintan Pandya
Huge mappings have had stability issues due to stale TLB entry and memory leak issues. Since, those are addressed in this series of patches, it is now safe to allow huge mappings. Signed-off-by: Chintan Pandya --- arch/arm64/mm/mmu.c | 18 ++ 1 file changed, 2 insertions(+), 16 d

[PATCH v12 1/5] ioremap: Update pgtable free interfaces with addr

2018-06-01 Thread Chintan Pandya
From: Chintan Pandya The following kernel panic was observed on ARM64 platform due to a stale TLB entry. 1. ioremap with 4K size, a valid pte page table is set. 2. iounmap it, its pte entry is set to 0. 3. ioremap the same address with 2M size, update its pmd entry with a new value. 4. C

[PATCH v12 2/5] arm64: tlbflush: Introduce __flush_tlb_kernel_pgtable

2018-06-01 Thread Chintan Pandya
Add an interface to invalidate intermediate page tables from TLB for kernel. Signed-off-by: Chintan Pandya --- arch/arm64/include/asm/tlbflush.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/arm64/include/asm/tlbflush.h b/arch/arm64/include/asm/tlbflush.h index dfc61d7..a4a190

[PATCH 8/8] serial: core: Mask mctrl with TIOCM_RTS too if rs485 on and RTS_AFTER_SEND set.

2018-06-01 Thread Giulio Benetti
If rs485 is enabled and RTS_AFTER_SEND is set on startup need to keep TIOCM_RTS asserted to keep rs485 transceiver in RX when idle. Check if rs485 is on and RTS_AFTER_SEND is set and mask port->mctrl with TIOCM_RTS too and not only TIOCM_DTR. Signed-off-by: Giulio Benetti --- drivers/tty/serial

[PATCH 1/8] serial: 8250_dw: add em485 support

2018-06-01 Thread Giulio Benetti
Need to use rs485 transceiver so let's use existing em485 485 emulation layer on top of 8250. Add rs485_config callback to port. Signed-off-by: Giulio Benetti --- drivers/tty/serial/8250/8250_dw.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/drivers/tty/s

[PATCH 7/8] serial: 8250: Make em485_rts_after_send() set mctrl according to rts state.

2018-06-01 Thread Giulio Benetti
When rs485 enabled and RTS_AFTER_SEND set on startup, need to preserve mctrl status, because later functions will call set_mctrl passing port->mctrl=0 overriding rts status, resulting in rts pin in transmission when idle. Make mctrl reflect rts pin state. Signed-off-by: Giulio Benetti --- drive

[PATCH 0/8] serial: 8250: Add 485 emulation to 8250_dw.

2018-06-01 Thread Giulio Benetti
Need to handle rs485 with 8250_dw port. Use existing em485 emulation layer for 8250 taking care to fix some bug and taking care especially of RTS_AFTER_SEND case. Giulio Benetti (8): serial: 8250_dw: add em485 support serial: 8250_dw: allow enable rs485 at boot time serial: 8250: Copy em485

[PATCH 5/8] serial: 8250_dw: treat rpm suspend with -EBUSY if RS485 ON and RTS_AFTER_SEND

2018-06-01 Thread Giulio Benetti
If rs485 is on and RTS_AFTER_SEND it means that in idle state rts pin must be asserted, othwerwise rs485 transceiver will enter tx state. dw8250 when clocks are stopped keeps rts line de-asserted(high), resulting in keeping rs485 transceiver in tx state when port is idle. Check if rs485 is on with

[PATCH 4/8] serial: 8250: Handle case port doesn't have TEMT interrupt using em485.

2018-06-01 Thread Giulio Benetti
Some 8250 ports only have TEMT interrupt, so current implementation can't work for ports without it. The only chance to make it work is to loop-read on LSR register. With NO TEMT interrupt check if both TEMT and THRE are set looping on LSR register. Signed-off-by: Giulio Benetti --- drivers/tty

[PATCH 6/8] serial: 8250: Copy mctrl when register port.

2018-06-01 Thread Giulio Benetti
RS485 can modify mctrl on startup, especially when RTS_AFTER_SEND is on TIOCM_RTS is set, then need to keep it set when registering port. Copy mctrl to new port too. Signed-off-by: Giulio Benetti --- drivers/tty/serial/8250/8250_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers

Re: [PATCH] x86/MCE: Get microcode revision from cpu_info instead of boot_cpu_data

2018-06-01 Thread Borislav Petkov
On Fri, Jun 01, 2018 at 12:32:02PM +, Sironi, Filippo wrote: > I've that patch in my tree already, I can post it. > I'm still curious on why you'd prefer to use boot_cpu_data for all > CPUs instead of using cpu_data(m->extcpu) though. Well, for starters, boot_cpu_data having stale revision is

[PATCH v12 3/5] arm64: pgtable: Add p*d_page_vaddr helper macros

2018-06-01 Thread Chintan Pandya
Add helper macros to give virtual references to page tables. These will be used while freeing dangling page tables. Signed-off-by: Chintan Pandya --- arch/arm64/include/asm/pgtable.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/

[PATCH 2/8] serial: 8250_dw: allow enable rs485 at boot time

2018-06-01 Thread Giulio Benetti
If "linux,rs485-enabled-at-boot-time" is specified need to setup 485 in probe function. Call uart_get_rs485_mode() to get rs485 configuration, then call rs485_config() callback directly to setup port as rs485. Signed-off-by: Giulio Benetti --- drivers/tty/serial/8250/8250_dw.c | 5 - 1 file

[PATCH 3/8] serial: 8250: Copy em485 from port to real port.

2018-06-01 Thread Giulio Benetti
em485 gets lost during serial8250_register_8250_port(). Copy em485 to final uart port. Signed-off-by: Giulio Benetti --- drivers/tty/serial/8250/8250_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c index 9342f

[PATCH 0/4] Small cleanup for memoryhotplug

2018-06-01 Thread osalvador
From: Oscar Salvador Hi, I wanted to give it a try and do a small cleanup in the memhotplug's code. A lot more could be done, but I wanted to start somewhere. I tried to unify/remove duplicated code. The following is what this patchset does: 1) add_memory_resource() has code to allocate a nod

[PATCH 3/4] mm/memory_hotplug: Get rid of link_mem_sections

2018-06-01 Thread osalvador
From: Oscar Salvador link_mem_sections() and walk_memory_range() share most of the code, so we can use walk_memory_range() with a callback to register_mem_sect_under_node() instead of using link_mem_sections(). To control whether the node id must be check, two new functions has been added: reg

[PATCH 4/4] mm/memory_hotplug: Drop unnecessary checks from register_mem_sect_under_node

2018-06-01 Thread osalvador
From: Oscar Salvador Callers of register_mem_sect_under_node() are always passing a valid memory_block (not NULL), so we can safely drop the check for NULL. In the same way, register_mem_sect_under_node() is only called in case the node is online, so we can safely remove that check as well. Sig

[PATCH 1/4] mm/memory_hotplug: Make add_memory_resource use __try_online_node

2018-06-01 Thread osalvador
From: Oscar Salvador add_memory_resource() contains code to allocate a new node in case it is necessary. Since try_online_node() also hast some code for this purpose, let us make use of that and remove duplicate code. This introduces __try_online_node(), which is called by add_memory_resource()

[PATCH 2/4] mm/memory_hotplug: Call register_mem_sect_under_node

2018-06-01 Thread osalvador
From: Oscar Salvador When hotpluging memory, it is possible that two calls are being made to register_mem_sect_under_node(). One comes from __add_section()->hotplug_memory_register() and the other from add_memory_resource()->link_mem_sections() if we had to register a new node. In case we had to

4.13..4.14 scheduling overhead regression (bisected - b956575bed91)

2018-06-01 Thread Mike Galbraith
Greetings, While dusting off regression testing trees, I noticed a substantial pipe-test dent at 4.14, and bisected it to b956575bed91. Log below. skew_tick=1 audit=0 nodelayacct cgroup_disable=memory nopti nospectre_v2 nospec_store_bypass_disable gov performance taskset 0xc pipe-test 1 4.4.13

Re: mlock() confusing 1 half of system RAM limit

2018-06-01 Thread Michal Hocko
On Fri 01-06-18 13:26:59, Alex Richman wrote: > I am using a shm MAP_SHARED, along these lines: > > shm_fd = shm_open(handle, (O_RDWR | O_CREAT), (S_IRWXU | S_IRWXG | > S_IRWXO)); > > ftruncate(shm_fd, channel->sled_size) > > channel->sled = mmap(NULL, channel->sled_size, (PROT_READ | PROT_WRITE),

[PATCH] cpufreq: ACPI: make function acpi_cpufreq_fast_switch static

2018-06-01 Thread Colin King
From: Colin Ian King The function acpi_cpufreq_fast_switch is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: drivers/cpufreq/acpi-cpufreq.c:468:14: warning: symbol 'acpi_cpufreq_fast_switch' was not declared. Should it be static? Signed

[GIT PULL 14/18] lightnvm: pblk: fix smeta write error path

2018-06-01 Thread Matias Bjørling
From: Hans Holmberg Smeta write errors were previously ignored. Skip these lines instead and throw them back on the free list, so the chunks will go through a reset cycle before we attempt to use the line again. Signed-off-by: Hans Holmberg Reviewed-by: Javier González Signed-off-by: Matias Bj

<    1   2   3   4   5   6   >