[PATCH v5 08/14] arm: Use generic mmap top-down layout and brk randomization

2019-07-30 Thread Alexandre Ghiti
arm uses a top-down mmap layout by default that exactly fits the generic functions, so get rid of arch specific code and use the generic version by selecting ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT. As ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT selects ARCH_HAS_ELF_RANDOMIZE, use the generic version of

[PATCH] ARM: dts: aspeed: Add Mihawk BMC platform

2019-07-30 Thread Ben Pai
The Mihawk BMC is an ASPEED ast2500 based BMC that is part of an OpenPower Power9 server. This adds the device tree description for most upstream components. It is a squashed commit from the OpenBMC kernel tree. Signed-off-by: Ben Pai --- arch/arm/boot/dts/Makefile | 1 +

Re: [PATCH net-next 1/2] net: phy: broadcom: set features explicitly for BCM54616S

2019-07-30 Thread Heiner Kallweit
On 30.07.2019 07:05, Tao Ren wrote: > On 7/29/19 8:35 PM, Andrew Lunn wrote: >> On Mon, Jul 29, 2019 at 05:25:32PM -0700, Tao Ren wrote: >>> BCM54616S feature "PHY_GBIT_FEATURES" was removed by commit dcdecdcfe1fc >>> ("net: phy: switch drivers to use dynamic feature detection"). As dynamic >>>

[PATCH v5 09/14] mips: Properly account for stack randomization and stack guard gap

2019-07-30 Thread Alexandre Ghiti
This commit takes care of stack randomization and stack guard gap when computing mmap base address and checks if the task asked for randomization. This fixes the problem uncovered and not fixed for arm here: https://lkml.kernel.org/r/20170622200033.25714-1-r...@redhat.com Signed-off-by: Alexandre

[PATCH v5 10/14] mips: Use STACK_TOP when computing mmap base address

2019-07-30 Thread Alexandre Ghiti
mmap base address must be computed wrt stack top address, using TASK_SIZE is wrong since STACK_TOP and TASK_SIZE are not equivalent. Signed-off-by: Alexandre Ghiti Acked-by: Kees Cook Acked-by: Paul Burton Reviewed-by: Luis Chamberlain --- arch/mips/mm/mmap.c | 4 ++-- 1 file changed, 2

[PATCH v5 11/14] mips: Adjust brk randomization offset to fit generic version

2019-07-30 Thread Alexandre Ghiti
This commit simply bumps up to 32MB and 1GB the random offset of brk, compared to 8MB and 256MB, for 32bit and 64bit respectively. Suggested-by: Kees Cook Signed-off-by: Alexandre Ghiti Acked-by: Paul Burton Reviewed-by: Kees Cook Reviewed-by: Luis Chamberlain --- arch/mips/mm/mmap.c | 7

Re: [Xen-devel] [PATCH v4 8/9] xen/gntdev.c: Convert to use vm_map_pages()

2019-07-30 Thread Souptick Joarder
On Mon, Jul 29, 2019 at 7:06 PM Marek Marczykowski-Górecki wrote: > > On Mon, Jul 29, 2019 at 02:02:54PM +0530, Souptick Joarder wrote: > > On Mon, Jul 29, 2019 at 1:35 PM Souptick Joarder > > wrote: > > > > > > On Sun, Jul 28, 2019 at 11:36 PM Marek Marczykowski-Górecki > > > wrote: > > > > >

[PATCH v5 12/14] mips: Replace arch specific way to determine 32bit task with generic version

2019-07-30 Thread Alexandre Ghiti
Mips uses TASK_IS_32BIT_ADDR to determine if a task is 32bit, but this define is mips specific and other arches do not have it: instead, use !IS_ENABLED(CONFIG_64BIT) || is_compat_task() condition. Signed-off-by: Alexandre Ghiti Acked-by: Paul Burton Reviewed-by: Kees Cook Reviewed-by: Luis

[PATCH v5 13/14] mips: Use generic mmap top-down layout and brk randomization

2019-07-30 Thread Alexandre Ghiti
mips uses a top-down layout by default that exactly fits the generic functions, so get rid of arch specific code and use the generic version by selecting ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT. As ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT selects ARCH_HAS_ELF_RANDOMIZE, use the generic version of

[PATCH v5 14/14] riscv: Make mmap allocation top-down by default

2019-07-30 Thread Alexandre Ghiti
In order to avoid wasting user address space by using bottom-up mmap allocation scheme, prefer top-down scheme when possible. Before: root@qemuriscv64:~# cat /proc/self/maps 0001-00016000 r-xp fe:00 6389 /bin/cat.coreutils 00016000-00017000 r--p 5000 fe:00 6389

[PATCH V2] scsi: ufs: revamp string descriptor reading

2019-07-30 Thread Tomas Winkler
Define new a type: uc_string_id for easier string handling and less casting. Reduce number or string copies in price of a dynamic allocation. Signed-off-by: Tomas Winkler Tested-by: Avri Altman --- V2: a. Use u8 instead of char as result string is utf8 b. In ufshcd_read_desc_param() keep

Re: [RFC] net: phy: read link status twice when phy_check_link_status()

2019-07-30 Thread Heiner Kallweit
On 30.07.2019 06:03, liuyonglong wrote: > > > On 2019/7/30 4:57, Heiner Kallweit wrote: >> On 29.07.2019 05:59, liuyonglong wrote: >>> >>> >>> On 2019/7/27 2:14, Heiner Kallweit wrote: On 26.07.2019 11:53, Yonglong Liu wrote: > According to the datasheet of Marvell phy and Realtek phy,

Re: [PATCH RESEND 0/8] Fix mmap base in bottom-up mmap

2019-07-30 Thread Alexandre Ghiti
On 6/20/19 7:03 AM, Alexandre Ghiti wrote: This series fixes the fallback of the top-down mmap: in case of failure, a bottom-up scheme can be tried as a last resort between the top-down mmap base and the stack, hoping for a large unused stack limit. Lots of architectures and even mm code start

[PATCH] x86/mce: Remove redundant irq work

2019-07-30 Thread Santosh Sivaraj
IRQ work currently only does a schedule work to process the mce events. Since irq work does no other function, remove it. Signed-off-by: Santosh Sivaraj --- arch/x86/kernel/cpu/mce/core.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git

[PATCH v3 0/2] mmc: Add support for the ASPEED SD controller

2019-07-30 Thread Andrew Jeffery
Hello, v3 of the ASPEED SDHCI driver makes a bunch of fixes to the driver and the devicetree binding, including the addition of the AST2600 compatible string. v2 can be found here: https://lists.ozlabs.org/pipermail/linux-aspeed/2019-July/002013.html Please review! Andrew Andrew Jeffery (2):

[PATCH v3 1/2] dt-bindings: mmc: Document Aspeed SD controller

2019-07-30 Thread Andrew Jeffery
The ASPEED SD/SDIO/eMMC controller exposes two slots implementing the SDIO Host Specification v2.00, with 1 or 4 bit data buses, or an 8 bit data bus if only a single slot is enabled. Signed-off-by: Andrew Jeffery --- v3: * Fix compatible enums * Add AST2600 compatibles * Describe

Re: [PATCH v2 00/12] tracing/probe: Add multi-probes per event support

2019-07-30 Thread Masami Hiramatsu
Hi Steve, Have you already picked this series? If not yet, should I update and resend this series? Thank you, On Thu, 4 Jul 2019 07:28:33 -0400 Steven Rostedt wrote: > On Thu, 4 Jul 2019 15:39:58 +0900 > Masami Hiramatsu wrote: > > > Hi Steve, > > > > Would you have any comment on this? >

[PATCH v3 2/2] mmc: Add support for the ASPEED SD controller

2019-07-30 Thread Andrew Jeffery
Add a minimal driver for ASPEED's SD controller, which exposes two SDHCIs. The ASPEED design implements a common register set for the SDHCIs, and moves some of the standard configuration elements out to this common area (e.g. 8-bit mode, and card detect configuration which is not currently

Re: [RFC] net: phy: read link status twice when phy_check_link_status()

2019-07-30 Thread liuyonglong
:/sys/kernel/debug/tracing$ cat trace # tracer: nop # # entries-in-buffer/entries-written: 45/45 #P:128 # # _-=> irqs-off # / _=> need-resched #| / _---=> hardirq/softirq #||

Re: [PATCH 01/12] rdmacg: Replace strncmp with str_has_prefix

2019-07-30 Thread Chuhong Yuan
Kees Cook 于2019年7月30日周二 下午12:26写道: > > On Mon, Jul 29, 2019 at 11:13:46PM +0800, Chuhong Yuan wrote: > > strncmp(str, const, len) is error-prone. > > We had better use newly introduced > > str_has_prefix() instead of it. > > Wait, stop. :) After Laura called my attention to your conversion

Re: [PATCH 4/5] sched/deadline: Cleanup on_dl_rq() handling

2019-07-30 Thread Juri Lelli
On 29/07/19 18:49, Peter Zijlstra wrote: > On Fri, Jul 26, 2019 at 09:27:55AM +0100, Dietmar Eggemann wrote: > > Remove BUG_ON() in __enqueue_dl_entity() since there is already one in > > enqueue_dl_entity(). > > > > Move the check that the dl_se is not on the dl_rq from > > __dequeue_dl_entity()

Re: [RFC] net: phy: read link status twice when phy_check_link_status()

2019-07-30 Thread liuyonglong
On 2019/7/30 14:35, liuyonglong wrote: > :/sys/kernel/debug/tracing$ cat trace > # tracer: nop > # > # entries-in-buffer/entries-written: 45/45 #P:128 > # > # _-=> irqs-off > # / _=> need-resched > #|

Re: [PATCH v5] PM / wakeup: show wakeup sources stats in sysfs

2019-07-30 Thread Greg KH
On Mon, Jul 29, 2019 at 07:43:09PM -0700, Tri Vo wrote: > Userspace can use wakeup_sources debugfs node to plot history of suspend > blocking wakeup sources over device's boot cycle. This information can > then be used (1) for power-specific bug reporting and (2) towards > attributing battery

Re: [PATCH v5 2/3] treewide: Remove dev_err() usage after platform_get_irq()

2019-07-30 Thread Greg Kroah-Hartman
On Mon, Jul 29, 2019 at 10:38:44PM -0700, Stephen Boyd wrote: > We don't need dev_err() messages when platform_get_irq() fails now that > platform_get_irq() prints an error message itself when something goes > wrong. Let's remove these prints with a simple semantic patch. > > // > @@ >

Re: [RFC PATCH 13/16] RISC-V: KVM: Add timer functionality

2019-07-30 Thread Andreas Schwab
On Jul 29 2019, Atish Patra wrote: > Strange. We never saw this error. It is part of CONFIG_KERNEL_HEADER_TEST. Everyone developing a driver should enable it. > #include > > Can you try it at your end and confirm please ? Confirmed. Andreas. -- Andreas Schwab, SUSE Labs, sch...@suse.de

Re: [RFC PATCH 00/16] KVM RISC-V Support

2019-07-30 Thread Andreas Schwab
ERROR: "riscv_cs_get_mult_shift" [arch/riscv/kvm/kvm.ko] undefined! ERROR: "riscv_isa" [arch/riscv/kvm/kvm.ko] undefined! ERROR: "smp_send_reschedule" [arch/riscv/kvm/kvm.ko] undefined! ERROR: "riscv_timebase" [arch/riscv/kvm/kvm.ko] undefined! Andreas. -- Andreas Schwab, SUSE Labs,

Re: [PATCH v2] Input: applespi - register touchpad device synchronously in probe

2019-07-30 Thread Life is hard, and then you die
Hi Dmitry, On Mon, Jul 29, 2019 at 03:22:03PM +0200, Dmitry Torokhov wrote: > Hi Ronald, > > On Sun, Jul 21, 2019 at 12:05:23AM -0700, Ronald Tschalär wrote: > > This allows errors during registration to properly fail the probe > > function. > > > > Doing this requires waiting for a

Re: [PATCH v3] modpost: check for static EXPORT_SYMBOL* functions

2019-07-30 Thread Denis Efremov
On 30.07.2019 01:26, Stephen Rothwell wrote: Hi Denis, On Mon, 29 Jul 2019 17:18:01 +0300 Denis Efremov wrote: This patch adds a check to warn about static EXPORT_SYMBOL* functions during the modpost. In most of the cases, a static symbol marked for exporting is an odd combination that

Re: [RFC PATCH 13/16] RISC-V: KVM: Add timer functionality

2019-07-30 Thread Atish Patra
On 7/29/19 11:51 PM, Andreas Schwab wrote: On Jul 29 2019, Atish Patra wrote: Strange. We never saw this error. It is part of CONFIG_KERNEL_HEADER_TEST. Everyone developing a driver should enable it. #include Can you try it at your end and confirm please ? Confirmed. Thanks. I

Re: [PATCH] Input: applespi - Fix build error

2019-07-30 Thread Life is hard, and then you die
On Mon, Jul 29, 2019 at 04:04:38PM +0200, Dmitry Torokhov wrote: > On Mon, Jul 29, 2019 at 11:14:55AM +0800, YueHaibing wrote: > > If CONFIG_KEYBOARD_APPLESPI=y but CONFIG_LEDS_CLASS=m > > building fails: > > > > drivers/input/keyboard/applespi.o: In function `applespi_probe': > >

Re: [PATCH] powerpc: Support CMDLINE_EXTEND

2019-07-30 Thread Christophe Leroy
Le 24/07/2019 à 07:33, Chris Packham a écrit : Device tree aware platforms can make use of CMDLINE_EXTEND to extend the kernel command line provided by the bootloader. This is particularly useful to set parameters for built-in modules that would otherwise be done at module insertion. Add

Re: [PATCH 01/12] rdmacg: Replace strncmp with str_has_prefix

2019-07-30 Thread Joe Perches
On Tue, 2019-07-30 at 14:39 +0800, Chuhong Yuan wrote: > Kees Cook 于2019年7月30日周二 下午12:26写道: > > On Mon, Jul 29, 2019 at 11:13:46PM +0800, Chuhong Yuan wrote: > > > strncmp(str, const, len) is error-prone. > > > We had better use newly introduced > > > str_has_prefix() instead of it. > > > >

Re: [PATCH v2] driver core: Remove device link creation limitation

2019-07-30 Thread Greg Kroah-Hartman
On Mon, Jul 29, 2019 at 11:50:05PM +0200, Rafael J. Wysocki wrote: > On Monday, July 29, 2019 5:48:57 PM CEST Dmitry Osipenko wrote: > > 16.07.2019 18:21, Rafael J. Wysocki пишет: > > > From: Rafael J. Wysocki > > > Subject: [PATCH] driver core: Remove device link creation limitation > > > > > >

Re: [PATCH v2] sound: dmasound_atari: Mark expected switch fall-through

2019-07-30 Thread Geert Uytterhoeven
On Mon, Jul 29, 2019 at 10:55 PM Gustavo A. R. Silva wrote: > Mark switch cases where we are expecting to fall through. > > This patch fixes the following warning (Building: m68k): > > sound/oss/dmasound/dmasound_atari.c: warning: this statement may fall > through [-Wimplicit-fallthrough=]: =>

Re: [PATCH v2 0/5] Allocate memmap from hotadded memory

2019-07-30 Thread Rashmica Gupta
On Mon, 2019-07-29 at 10:06 +0200, David Hildenbrand wrote: > > > Of course, other interfaces might make sense. > > > > > > You can then start using these memory blocks and hinder them from > > > getting onlined (as a safety net) via memory notifiers. > > > > > > That would at least avoid you

Re: [PATCH v2] aio: add timeout validity check for io_[p]getevents

2019-07-30 Thread Arnd Bergmann
On Tue, Jul 30, 2019 at 3:46 AM zhangyi (F) wrote: > { > - ktime_t until = ts ? timespec64_to_ktime(*ts) : KTIME_MAX; > - struct kioctx *ioctx = lookup_ioctx(ctx_id); > + ktime_t until = KTIME_MAX; > + struct kioctx *ioctx = NULL; > long ret = -EINVAL; > > +

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

2019-07-30 Thread syzbot
syzbot has bisected this bug to: commit e9db4ef6bf4ca9894bb324c76e01b8f1a16b2650 Author: John Fastabend Date: Sat Jun 30 13:17:47 2018 + bpf: sockhash fix omitted bucket lock in sock_close bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=10f4840c60 start commit:

Re: [PATCH 4.14 000/293] 4.14.135-stable review

2019-07-30 Thread Naresh Kamboju
On Tue, 30 Jul 2019 at 00:54, Greg Kroah-Hartman wrote: > > This is the start of the stable review cycle for the 4.14.135 release. > There are 293 patches in this series, all will be posted as a response > to this one. If anyone has any issues with these being applied, please > let me know. > >

Re: [git pull] habanalabs fixes for 5.3-rc3

2019-07-30 Thread Greg KH
On Mon, Jul 29, 2019 at 03:55:02PM +0300, Oded Gabbay wrote: > Hello Greg, > > This is habanalabs fixes pull request for 5.3-rc3. > It contains two important fixes for BE architecture. Pulled and pushed out, thanks. greg k-h

Re: [PATCH 2/2] clk: meson: axg-audio: add g12a reset support

2019-07-30 Thread Jerome Brunet
On Mon 29 Jul 2019 at 15:29, Stephen Boyd wrote: > Quoting Jerome Brunet (2019-07-03 05:26:14) >> @@ -1005,8 +1087,27 @@ static int axg_audio_clkc_probe(struct >> platform_device *pdev) >> } >> } >> >> - return devm_of_clk_add_hw_provider(dev,

Re: [PATCH] ARM: check stmfd instruction using right shift

2019-07-30 Thread Chunyan Zhang
Gentle ping probably this patch was missed or entered into spam? On Mon, 22 Jul 2019 at 15:14, Chunyan Zhang wrote: > > From: Lvqiang Huang > > In the commit ef41b5c92498 ("ARM: make kernel oops easier to read"), > - .word 0xe92d >> 10@ stmfd sp!, {} > +

[PATCH v3] clk: imx8mq: Mark AHB clock as critical

2019-07-30 Thread Abel Vesa
Initially, the TMU_ROOT clock was marked as critical, which automatically made the AHB clock to stay always on. Since the TMU_ROOT clock is not marked as critical anymore, following commit: 431bdd1df48e ("clk: imx8mq: Remove CLK_IS_CRITICAL flag for IMX8MQ_CLK_TMU_ROOT") all the clocks that

Re: [PATCH] Input: applespi - Fix build error

2019-07-30 Thread Yuehaibing
On 2019/7/30 15:01, Life is hard, and then you die wrote: > > On Mon, Jul 29, 2019 at 04:04:38PM +0200, Dmitry Torokhov wrote: >> On Mon, Jul 29, 2019 at 11:14:55AM +0800, YueHaibing wrote: >>> If CONFIG_KEYBOARD_APPLESPI=y but CONFIG_LEDS_CLASS=m >>> building fails: >>> >>>

Re: [PATCH v3] sched/core: Don't use dying mm as active_mm of kthreads

2019-07-30 Thread Michal Hocko
On Mon 29-07-19 17:42:20, Waiman Long wrote: > On 7/29/19 5:21 PM, Rik van Riel wrote: > > On Mon, 2019-07-29 at 17:07 -0400, Waiman Long wrote: > >> It was found that a dying mm_struct where the owning task has exited > >> can stay on as active_mm of kernel threads as long as no other user > >>

[PATCH v2 00/10] implement KASLR for powerpc/fsl_booke/32

2019-07-30 Thread Jason Yan
This series implements KASLR for powerpc/fsl_booke/32, as a security feature that deters exploit attempts relying on knowledge of the location of kernel internals. Since CONFIG_RELOCATABLE has already supported, what we need to do is map or copy kernel to a proper place and relocate. Freescale

[PATCH v2 04/10] powerpc/fsl_booke/32: introduce create_tlb_entry() helper

2019-07-30 Thread Jason Yan
Add a new helper create_tlb_entry() to create a tlb entry by the virtual and physical address. This is a preparation to support boot kernel at a randomized address. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Paul

[PATCH v2 01/10] powerpc: unify definition of M_IF_NEEDED

2019-07-30 Thread Jason Yan
M_IF_NEEDED is defined too many times. Move it to a common place. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Nicholas Piggin Cc: Kees Cook Reviewed-by: Christophe Leroy ---

[PATCH v2 07/10] powerpc/fsl_booke/32: randomize the kernel image offset

2019-07-30 Thread Jason Yan
After we have the basic support of relocate the kernel in some appropriate place, we can start to randomize the offset now. Entropy is derived from the banner and timer, which will change every build and boot. This not so much safe so additionally the bootloader may pass entropy via the

[PATCH v2 03/10] powerpc: introduce kimage_vaddr to store the kernel base

2019-07-30 Thread Jason Yan
Now the kernel base is a fixed value - KERNELBASE. To support KASLR, we need a variable to store the kernel base. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Nicholas Piggin Cc: Kees Cook ---

Re: [RFC PATCH 00/16] KVM RISC-V Support

2019-07-30 Thread Anup Patel
On Tue, Jul 30, 2019 at 12:23 PM Andreas Schwab wrote: > > ERROR: "riscv_cs_get_mult_shift" [arch/riscv/kvm/kvm.ko] undefined! > ERROR: "riscv_isa" [arch/riscv/kvm/kvm.ko] undefined! > ERROR: "smp_send_reschedule" [arch/riscv/kvm/kvm.ko] undefined! > ERROR: "riscv_timebase"

[PATCH v2 10/10] powerpc/fsl_booke/kaslr: dump out kernel offset information on panic

2019-07-30 Thread Jason Yan
When kaslr is enabled, the kernel offset is different for every boot. This brings some difficult to debug the kernel. Dump out the kernel offset when panic so that we can easily debug the kernel. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin

[PATCH v2 05/10] powerpc/fsl_booke/32: introduce reloc_kernel_entry() helper

2019-07-30 Thread Jason Yan
Add a new helper reloc_kernel_entry() to jump back to the start of the new kernel. After we put the new kernel in a randomized place we can use this new helper to enter the kernel and begin to relocate again. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy

[PATCH v2 06/10] powerpc/fsl_booke/32: implement KASLR infrastructure

2019-07-30 Thread Jason Yan
This patch add support to boot kernel from places other than KERNELBASE. Since CONFIG_RELOCATABLE has already supported, what we need to do is map or copy kernel to a proper place and relocate. Freescale Book-E parts expect lowmem to be mapped by fixed TLB entries(TLB1). The TLB1 entries are not

[PATCH v2 09/10] powerpc/fsl_booke/kaslr: support nokaslr cmdline parameter

2019-07-30 Thread Jason Yan
One may want to disable kaslr when boot, so provide a cmdline parameter 'nokaslr' to support this. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Nicholas Piggin Cc: Kees Cook ---

[PATCH v2 08/10] powerpc/fsl_booke/kaslr: clear the original kernel if randomized

2019-07-30 Thread Jason Yan
The original kernel still exists in the memory, clear it now. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Nicholas Piggin Cc: Kees Cook --- arch/powerpc/kernel/kaslr_booke.c | 11 +++

[PATCH v2 02/10] powerpc: move memstart_addr and kernstart_addr to init-common.c

2019-07-30 Thread Jason Yan
These two variables are both defined in init_32.c and init_64.c. Move them to init-common.c. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Nicholas Piggin Cc: Kees Cook ---

Re: [PATCH v4] mm: memcontrol: fix use after free in mem_cgroup_iter()

2019-07-30 Thread Michal Hocko
[Cc Andrew to pick up the patch] On Tue 30-07-19 09:57:29, Miles Chen wrote: > This patch is sent to report an use after free in mem_cgroup_iter() > after merging commit: be2657752e9e "mm: memcg: fix use after free in > mem_cgroup_iter()". > > I work with android kernel tree (4.9 & 4.14), and

Re: [PATCH v7 0/4] HEVC/H.265 stateless support for V4L2 and Cedrus

2019-07-30 Thread Hans Verkuil
On 7/27/19 11:57 AM, Paul Kocialkowski wrote: > Hi Hans, > > On Fri 26 Jul 19, 10:33, Hans Verkuil wrote: >> On 7/25/19 8:55 PM, Paul Kocialkowski wrote: >>> HEVC/H.265 stateless support for V4L2 and Cedrus >>> >>> This is early support for HEVC/H.265 stateless decoding in V4L2, >>> including

Re: [PATCH v3 2/3] augmented rbtree: add new RB_DECLARE_CALLBACKS_MAX macro

2019-07-30 Thread Michel Lespinasse
On Mon, Jul 29, 2019 at 3:15 AM Uladzislau Rezki wrote: > > > > > --- > > a/lib/rbtree_test.c~augmented-rbtree-add-new-rb_declare_callbacks_max-macro-fix-2 > > +++ a/lib/rbtree_test.c > > @@ -220,10 +220,6 @@ static void check_augmented(int nr_nodes > > struct rb_node *rb; > > > >

Re: [PATCH] powerpc: workaround clang codegen bug in dcbz

2019-07-30 Thread Arnd Bergmann
On Mon, Jul 29, 2019 at 11:52 PM Segher Boessenkool wrote: > > On Mon, Jul 29, 2019 at 01:32:46PM -0700, Nathan Chancellor wrote: > > For the record: > > > > https://godbolt.org/z/z57VU7 > > > > This seems consistent with what Michael found so I don't think a revert > > is entirely unreasonable.

Re: [PATCH v2] sound: dmasound_atari: Mark expected switch fall-through

2019-07-30 Thread Takashi Iwai
On Mon, 29 Jul 2019 22:54:54 +0200, Gustavo A. R. Silva wrote: > > Mark switch cases where we are expecting to fall through. > > This patch fixes the following warning (Building: m68k): > > sound/oss/dmasound/dmasound_atari.c: warning: this statement may fall > through

Re: [RFC PATCH 00/16] KVM RISC-V Support

2019-07-30 Thread Anup Patel
On Tue, Jul 30, 2019 at 12:23 PM Andreas Schwab wrote: > > ERROR: "riscv_cs_get_mult_shift" [arch/riscv/kvm/kvm.ko] undefined! > ERROR: "riscv_isa" [arch/riscv/kvm/kvm.ko] undefined! > ERROR: "smp_send_reschedule" [arch/riscv/kvm/kvm.ko] undefined! > ERROR: "riscv_timebase"

Re: [PATCH 19/20] pstore: fs superblock limits

2019-07-30 Thread Arnd Bergmann
On Tue, Jul 30, 2019 at 6:31 AM Kees Cook wrote: > > On Mon, Jul 29, 2019 at 06:49:23PM -0700, Deepa Dinamani wrote: > > Also update the gran since pstore has microsecond granularity. > > So, I'm fine with this, but technically the granularity depends on the > backend storage... many have no

Re: [PATCH] ALSA: sparc: Mark expected switch fall-throughs

2019-07-30 Thread Takashi Iwai
On Tue, 30 Jul 2019 03:49:44 +0200, Gustavo A. R. Silva wrote: > > Mark switch cases where we are expecting to fall through. > > This patch fixes the following warnings (Building: sparc64): > > sound/sparc/dbri.c: In function ‘reverse_bytes’: > sound/sparc/dbri.c:582:5: warning: this

Re: [RFC PATCH 00/16] KVM RISC-V Support

2019-07-30 Thread Andreas Schwab
On Jul 30 2019, Anup Patel wrote: > On Tue, Jul 30, 2019 at 12:23 PM Andreas Schwab wrote: >> >> ERROR: "riscv_cs_get_mult_shift" [arch/riscv/kvm/kvm.ko] undefined! >> ERROR: "riscv_isa" [arch/riscv/kvm/kvm.ko] undefined! >> ERROR: "smp_send_reschedule" [arch/riscv/kvm/kvm.ko] undefined! >>

Re: WARNING in __mmdrop

2019-07-30 Thread Jason Wang
On 2019/7/29 下午10:44, Michael S. Tsirkin wrote: On Mon, Jul 29, 2019 at 10:24:43PM +0800, Jason Wang wrote: On 2019/7/29 下午4:59, Michael S. Tsirkin wrote: On Mon, Jul 29, 2019 at 01:54:49PM +0800, Jason Wang wrote: On 2019/7/26 下午9:49, Michael S. Tsirkin wrote: Ok, let me retry if

Re: [PATCH] nvme/multipath: revalidate nvme_ns_head gendisk in nvme_validate_ns

2019-07-30 Thread Johannes Thumshirn
Thanks Anthony, Reviewed-by: Johannes Thumshirn -- Johannes ThumshirnSUSE Labs Filesystems jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 21284 (AG

Re: [PATCH] staging: rtl8723bs: os_dep: Remove function _rtw_regdomain_select

2019-07-30 Thread Greg Kroah-Hartman
On Thu, Jul 25, 2019 at 11:03:49PM +0530, Hariprasad Kelam wrote: > This function simply returns _regdom_rd . So replace this function > with actual code > > Signed-off-by: Hariprasad Kelam > --- > drivers/staging/rtl8723bs/os_dep/wifi_regd.c | 9 + > 1 file changed, 1 insertion(+), 8

Re: [PATCH 3/3] Fix insn.c misaligned address error

2019-07-30 Thread Adrian Hunter
On 29/07/19 10:32 PM, Ian Rogers wrote: > On Mon, Jul 29, 2019 at 1:24 AM Adrian Hunter wrote: >> >> On 27/07/19 12:46 PM, Masami Hiramatsu wrote: >>> On Fri, 26 Jul 2019 16:38:06 -0300 >>> Arnaldo Carvalho de Melo wrote: >>> Em Wed, Jul 24, 2019 at 11:45:12AM -0700, Numfor Mbiziwo-Tiapo

Re: [PATCH 2/2] locking/mutex: Use mutex flags macro instead of hard code value

2019-07-30 Thread Mukesh Ojha
On 7/29/2019 4:37 PM, Peter Zijlstra wrote: On Mon, Jul 29, 2019 at 04:22:58PM +0530, Mukesh Ojha wrote: Let's use the mutex flag macro(which got moved from mutex.c to linux/mutex.h in the last patch) instead of hard code value which was used in __mutex_owner(). Signed-off-by: Mukesh Ojha

Re: [PATCH 3/3] Fix insn.c misaligned address error

2019-07-30 Thread Adrian Hunter
On 30/07/19 3:47 AM, Masami Hiramatsu wrote: > On Mon, 29 Jul 2019 11:22:34 +0300 > Adrian Hunter wrote: > >> On 27/07/19 12:46 PM, Masami Hiramatsu wrote: >>> On Fri, 26 Jul 2019 16:38:06 -0300 >>> Arnaldo Carvalho de Melo wrote: >>> Em Wed, Jul 24, 2019 at 11:45:12AM -0700, Numfor

Re: [alsa-devel] [PATCH v2 1/7] ASoC: fsl_sai: Add registers definition for multiple datalines

2019-07-30 Thread Nicolin Chen
On Mon, Jul 29, 2019 at 09:20:01PM +0100, Mark Brown wrote: > On Mon, Jul 29, 2019 at 10:57:43PM +0300, Daniel Baluta wrote: > > On Mon, Jul 29, 2019 at 10:42 PM Nicolin Chen > > wrote: > > > On Sun, Jul 28, 2019 at 10:24:23PM +0300, Daniel Baluta wrote: > > > > > @@ -704,7 +711,14 @@ static

Re: Issue with sequence to switch to HS400

2019-07-30 Thread Adrian Hunter
On 26/07/19 12:37 AM, Alan Cooper wrote: > That's an even better solution and it gets my HS400 mode working. > Will you add this change or should I? You, if you wouldn't mind. > > Thanks > Al > > On Thu, Jul 25, 2019 at 3:33 AM Adrian Hunter wrote: >> >> On 23/07/19 3:34 PM, Alan Cooper

Re: [GIT PULL] Wimplicit-fallthrough patches for 5.3-rc2

2019-07-30 Thread Kalle Valo
"Gustavo A. R. Silva" writes: > On 7/27/19 1:08 PM, Linus Torvalds wrote: > >> >> Ok, I have tried re-pulling and if it passes my build tests cleanly >> I'll push the result out. >> > > Awesome. :) BTW, now when using ccache 3.2.4 (which I admit is an old release from 2015 but included still

Re: [PATCH v2 7/7] ASoC: dt-bindings: Introduce compatible strings for 7ULP and 8MQ

2019-07-30 Thread Nicolin Chen
On Sun, Jul 28, 2019 at 10:24:29PM +0300, Daniel Baluta wrote: > For i.MX7ULP and i.MX8MQ register map is changed. Add two new compatbile > strings to differentiate this. > > Signed-off-by: Daniel Baluta > --- > Documentation/devicetree/bindings/sound/fsl-sai.txt | 3 ++- > 1 file changed, 2

Re: [PATCH] net: phy: phy_led_triggers: Fix a possible null-pointer dereference in phy_led_trigger_change_speed()

2019-07-30 Thread Jia-Ju Bai
On 2019/7/30 11:41, David Miller wrote: From: Andrew Lunn Date: Tue, 30 Jul 2019 05:32:29 +0200 On Tue, Jul 30, 2019 at 10:25:36AM +0800, Jia-Ju Bai wrote: On 2019/7/29 21:45, Andrew Lunn wrote: On Mon, Jul 29, 2019 at 05:24:24PM +0800, Jia-Ju Bai wrote: In

Re: [PATCH 2/2] locking/mutex: Use mutex flags macro instead of hard code value

2019-07-30 Thread Peter Zijlstra
On Tue, Jul 30, 2019 at 01:23:13PM +0530, Mukesh Ojha wrote: > > On 7/29/2019 4:37 PM, Peter Zijlstra wrote: > > On Mon, Jul 29, 2019 at 04:22:58PM +0530, Mukesh Ojha wrote: > > > Let's use the mutex flag macro(which got moved from mutex.c > > > to linux/mutex.h in the last patch) instead of hard

Re: Marking legacy watchdog drivers as deprecated / obsolete

2019-07-30 Thread Arnd Bergmann
On Tue, Jul 30, 2019 at 12:07 AM Guenter Roeck wrote: > > Hi, > > we have recently seen a number of changes to legacy watchdog drivers, > mostly surrounding the coding style used some 10+ years ago, but also > fixing minor formatting or coding problems found by static analyzers. > This slowly

Re: WARNING in __mmdrop

2019-07-30 Thread Jason Wang
On 2019/7/30 下午3:44, Jason Wang wrote: } Looks good but I'd like to think of a strategy/existing lock that let us block properly as opposed to spinning, that would be more friendly to e.g. the realtime patch. Does it make sense to disable preemption in the critical section? Then we don't

Re: [GIT PULL 000/107] perf/core improvements and fixes

2019-07-30 Thread Ingo Molnar
* Arnaldo Carvalho de Melo wrote: > Hi Ingo, > > Please consider pulling, > > Best regards, > > - Arnaldo > > Test results at the end of this message, as usual. > > The following changes since commit b3c303be4c35856945cb17ec639b94637447dae2: > > Merge tag

Re: [PATCH v2 6/7] ASoC: fsl_sai: Add support for imx7ulp/imx8mq

2019-07-30 Thread Nicolin Chen
On Sun, Jul 28, 2019 at 10:24:28PM +0300, Daniel Baluta wrote: > SAI module on imx7ulp/imx8m features 2 new registers (VERID and PARAM) > at the beginning of register address space. > > On imx7ulp FIFOs can held up to 16 x 32 bit samples. > On imx8mq FIFOs can held up to 128 x 32 bit samples. >

Re: [PATCH] x86: drop REG_OUT macro from hweight functions

2019-07-30 Thread Peter Zijlstra
On Mon, Jul 29, 2019 at 11:44:17PM +0300, Alexey Dobriyan wrote: > On Mon, Jul 29, 2019 at 12:04:47PM +0200, Peter Zijlstra wrote: > > +#define _ASM_ARG1B __ASM_FORM_RAW(dil) > > +#define _ASM_ARG2B __ASM_FORM_RAW(sil) > > +#define _ASM_ARG3B __ASM_FORM_RAW(dl) > > +#define _ASM_ARG4B

[PATCH v2] net: phy: phy_led_triggers: Fix a possible null-pointer dereference in phy_led_trigger_change_speed()

2019-07-30 Thread Jia-Ju Bai
In phy_led_trigger_change_speed(), there is an if statement on line 48 to check whether phy->last_triggered is NULL: if (!phy->last_triggered) When phy->last_triggered is NULL, it is used on line 52: led_trigger_event(>last_triggered->trigger, LED_OFF); Thus, a possible null-pointer

Re: [PATCH 5.3] mwifiex: fix 802.11n/WPA detection

2019-07-30 Thread Kalle Valo
Brian Norris writes: > On Mon, Jul 29, 2019 at 9:01 AM Takashi Iwai wrote: >> This isn't seen in linux-next yet. > > Apparently not. > >> Still pending review? > > I guess? Probably mostly pending maintainer attention. Correct, I was offline for few days. > Also, Johannes already had noticed

Re: [linux-sunxi] Re: [PATCH 4/6] pwm: sun4i: Add support for H6 PWM

2019-07-30 Thread Uwe Kleine-König
Hello Rob and Frank, Maxime and Jernej on one side and me on the other cannot agree about a detail in the change to the bindings here. I'm trying to objectively summarize the situation for you to help deciding what is the right thing to do here. TLDR: The sun4i pwm driver is extended to support

Re: [PATCH v2 0/5] mm: Enable CONFIG_NODES_SPAN_OTHER_NODES by default for NUMA

2019-07-30 Thread Michal Hocko
[Sorry for a late reply] On Mon 15-07-19 17:55:07, Hoan Tran OS wrote: > Hi, > > On 7/12/19 10:00 PM, Michal Hocko wrote: [...] > > Hmm, I thought this was selectable. But I am obviously wrong here. > > Looking more closely, it seems that this is indeed only about > > __early_pfn_to_nid and as

Re: [PATCH] media input infrastructure:tw686x: Fix of possibleinconsistent memory deallocation and/or race condition by implementation of custom video_device_release function in tw686x driver

2019-07-30 Thread Hans Verkuil
Hi Mark, Please, please read this first before posting patches: https://kernelnewbies.org/FirstKernelPatch And don't use insanely long subject lines in your email. This patch is nonsense. As said before, you need to override the release() callback of struct video_device with a tw686x-specific

Re: [PATCH v2] gpio: remove less important #ifdef around declarations

2019-07-30 Thread Bartosz Golaszewski
wt., 30 lip 2019 o 07:44 Masahiro Yamada napisał(a): > > The whole struct/function declarations in this header are surrounded > by #ifdef. > > As far as I understood, the motivation of this is probably to break > the build earlier if a driver misses to select or depend on correct > CONFIG options

Re: [PATCH v2] Documentation: gpio: fix function links in the HTML docs

2019-07-30 Thread Bartosz Golaszewski
pon., 29 lip 2019 o 16:37 Jeremy Cline napisał(a): > > The shorthand [_data] and [devm_] cause the HTML documentation to not > link to the function documentation properly. This expands the references > to the complete function names with the exception of > devm_gpiochip_remove() which was dropped

Re: [PATCH] x86/mce: Remove redundant irq work

2019-07-30 Thread Peter Zijlstra
On Tue, Jul 30, 2019 at 11:45:20AM +0530, Santosh Sivaraj wrote: > IRQ work currently only does a schedule work to process the mce > events. Since irq work does no other function, remove it. > > Signed-off-by: Santosh Sivaraj NAK this is broken. MCE is NMI like. > --- >

Re: [PATCH] gpio: just plain warning when nonexisting gpio requested

2019-07-30 Thread Bartosz Golaszewski
pon., 29 lip 2019 o 16:41 Enrico Weigelt, metux IT consult napisał(a): > > From: Enrico Weigelt > > When trying to export an nonexisting gpio ID, the kernel prints > outs a big warning w/ stacktrace, sounding like a huge problem. > In fact it's a pretty normal situation, like file or device not

[PATCH v2] mtd: spi-nor: Add Winbond w25q256jvm

2019-07-30 Thread Avi Fishman
Similar to w25q256 (besides not supporting QPI mode) but with different ID. The "JVM" suffix is in the datasheet. The datasheet indicates DUAL and QUAD are supported. https://www.winbond.com/resource-files/w25q256jv%20spi%20revi%2010232018%20plus.pdf Signed-off-by: Avi Fishman ---

Re: [PATCH 4/5] sched/deadline: Cleanup on_dl_rq() handling

2019-07-30 Thread Peter Zijlstra
On Tue, Jul 30, 2019 at 08:41:15AM +0200, Juri Lelli wrote: > On 29/07/19 18:49, Peter Zijlstra wrote: > > On Fri, Jul 26, 2019 at 09:27:55AM +0100, Dietmar Eggemann wrote: > > > Remove BUG_ON() in __enqueue_dl_entity() since there is already one in > > > enqueue_dl_entity(). > > > > > > Move the

Re: [PATCH 5/5] sched/deadline: Use return value of SCHED_WARN_ON() in bw accounting

2019-07-30 Thread Peter Zijlstra
On Mon, Jul 29, 2019 at 05:59:04PM +0100, Dietmar Eggemann wrote: > On 7/29/19 5:54 PM, Peter Zijlstra wrote: > > On Fri, Jul 26, 2019 at 12:18:19PM +0200, luca abeni wrote: > >> Hi Dietmar, > >> > >> On Fri, 26 Jul 2019 09:27:56 +0100 > >> Dietmar Eggemann wrote: > >> > >>> To make the decision

Re: [PATCH v3 2/2] ARM: dts: imx6ul-kontron-n6310: Add Kontron i.MX6UL N6310 SoM and boards

2019-07-30 Thread Schrempf Frieder
On 29.07.19 19:20, Krzysztof Kozlowski wrote: > Add support for i.MX6UL modules from Kontron Electronics GmbH (before > acquisition: Exceet Electronics) and evalkit boards based on it: > > 1. N6310 SOM: i.MX6 UL System-on-Module, a 25x25 mm solderable module > (LGA pads and pin castellations)

Re: [PATCH] drivers: net: wireless: rsi: return explicit error values

2019-07-30 Thread Kalle Valo
"Enrico Weigelt, metux IT consult" writes: > From: Enrico Weigelt > > Explicitly return constants instead of variable (and rely on > it to be explicitly initialized), if the value is supposed > to be fixed anyways. Align it with the rest of the driver, > which does it the same way. > >

Re: [linux-sunxi] Re: [PATCH 4/6] pwm: sun4i: Add support for H6 PWM

2019-07-30 Thread Chen-Yu Tsai
On Tue, Jul 30, 2019 at 4:09 PM Uwe Kleine-König wrote: > > Hello Rob and Frank, > > Maxime and Jernej on one side and me on the other cannot agree about a > detail in the change to the bindings here. I'm trying to objectively > summarize the situation for you to help deciding what is the right

Re: [PATCH 3/4] clk: meson: g12a: add notifiers to handle cpu clock change

2019-07-30 Thread Jerome Brunet
On Mon 29 Jul 2019 at 15:16, Neil Armstrong wrote: > In order to implement clock switching for the CLKID_CPU_CLK and > CLKID_CPUB_CLK, notifiers are added on specific points of the > clock tree : > > cpu_clk / cpub_clk > | \- cpu_clk_dyn > | | \- cpu_clk_premux0 > | ||-

Re: [PATCH v2 1/3] kasan: support backing vmalloc space with real shadow memory

2019-07-30 Thread Daniel Axtens
Hi Mark, Thanks for your email - I'm very new to mm stuff and the feedback is very helpful. >> +#ifndef CONFIG_KASAN_VMALLOC >> int kasan_module_alloc(void *addr, size_t size) >> { >> void *ret; >> @@ -603,6 +604,7 @@ void kasan_free_shadow(const struct vm_struct *vm) >> if

[PATCH] scsi: 3w-sas: Fix unterminated strncpy

2019-07-30 Thread Chuhong Yuan
strncpy(dest, src, strlen(src)) leads to unterminated dest, which is dangerous. Here driver_version's len is 32 and TW_DRIVER_VERSION is shorter than 32. Therefore strcpy is OK. Signed-off-by: Chuhong Yuan --- drivers/scsi/3w-sas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

  1   2   3   4   5   6   7   8   9   10   >