Re: possible deadlock in console_unlock

2019-02-16 Thread Yao HongBo
On 2/16/2019 3:46 PM, Sergey Senozhatsky wrote: > On (02/16/19 16:21), Sergey Senozhatsky wrote: >> On (02/16/19 14:36), Yao HongBo wrote: >>> hi, sergey: >>> >>> As shown in that link, https://lkml.org/lkml/2018/6/6/397 >>> >>> On the linux kernel 5.0-rc6, Syzkaller also hit 'possible deadlock

KASAN: use-after-free Read in shmem_fault

2019-02-16 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:aa0c38cf39de Merge branch 'fixes' of git://git.kernel.org/.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=146cadff40 kernel config: https://syzkaller.appspot.com/x/.config?x=ee434566c893c7b1

Re: [v5] Coccinelle: semantic code search for missing put_device()

2019-02-16 Thread Julia Lawall
On Sat, 16 Feb 2019, wen.yan...@zte.com.cn wrote: > >>> Does the first SmPL when specification include the case that a call > >>> of the function “put_device” can occur within a branch of an if statement? > >> > >> It does include that, > > > >Thanks for this acknowledgement. > > > >So it seems

Re: [v5] coccinelle: semantic code search for missingput_device()

2019-02-16 Thread Markus Elfring
> Thanks, We will change it to something like this: > In a function, for a local variable obtained by of_find_device_by_node() How do you think about another wording approach? 1. Precondition: It will be checked where the return value is stored from a call of the function

Re: [PATCH] net: mv643xx_eth: disable clk on error path in mv643xx_eth_shared_probe()

2019-02-16 Thread Sergei Shtylyov
On 16.02.2019 0:20, Alexey Khoroshilov wrote: If mv643xx_eth_shared_of_probe() fails, mv643xx_eth_shared_probe() leaves clk undisabled. Enabled, that is? :-) Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov [...] MBR, Sergei

[PATCH V5 0/4] add pvpanic driver framework

2019-02-16 Thread Peng Hao
QEMU community requires additional PCI devices to simulate PVPANIC devices so that some architectures can not occupy precious less than 4G of memory space. Previously, I added PCI driver directly to the original version of the driver, which made the whole driver file look a bit cluttered. So Andy

[PATCH V5 3/4] misc/pvpanic: Avoid initializing multiple pvpanic devices

2019-02-16 Thread Peng Hao
Avoid initializing multiple pvpanic devices when configure multiple pvpanic device driver type. Make sure that only one pvpanic device is working. Signed-off-by: Peng Hao --- drivers/misc/pvpanic/pvpanic.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git

[PATCH V5 2/4] misc/pvpanic: Add pvpanic driver framework

2019-02-16 Thread Peng Hao
Add pvpanic driver framework and split the original pvpanic acpi/of driver as the two separate files and modify code to adapt the framework. Signed-off-by: Peng Hao --- drivers/misc/pvpanic/Kconfig| 19 drivers/misc/pvpanic/Makefile | 2 +

[PATCH V5 1/4] misc/pvpanic : preparing for pvpanic driver framework

2019-02-16 Thread Peng Hao
Preparing for pvpanic driver framework. Create a pvpanic driver directory and move current driver file to new directory. Signed-off-by: Peng Hao --- drivers/misc/Kconfig | 9 + drivers/misc/Makefile| 2 +- drivers/misc/pvpanic/Kconfig | 7 +++

[PATCH V5 4/4] misc/pvpanic: add new pvpanic pci driver

2019-02-16 Thread Peng Hao
Add new pvpanic pci driver to pvpanic driver framework. Signed-off-by: Peng Hao --- drivers/misc/pvpanic/Kconfig | 10 ++- drivers/misc/pvpanic/Makefile | 1 + drivers/misc/pvpanic/pvpanic-pci.c | 56 ++ 3 files changed, 66 insertions(+), 1

Re: [v5] Coccinelle: semantic code search for missing put_device()

2019-02-16 Thread Markus Elfring
>> We will modify the the if in the when code like this: >> >> @@ -22,7 +22,7 @@ if (id == NULL || ...) { ... return ...; } >> ... when != put_device(>dev) … >> -when != if (id) { ... put_device(>dev) ... } >> +when != if (...) { ... put_device(>dev) ... } > > This looks ok. I have got

Re: [net-next] net: crypto set sk to NULL when af_alg_release.

2019-02-16 Thread maowenan
who can help review this patch? thank you. On 2019/2/15 22:24, Mao Wenan wrote: > KASAN has found use-after-free in sockfs_setattr. > The existed commit 6d8c50dcb029 ("socket: close race condition between > sock_close() > and sockfs_setattr()") is to fix this simillar issue, but it seems to

Re: [v5] Coccinelle: semantic code search for missing put_device()

2019-02-16 Thread Julia Lawall
On Sat, 16 Feb 2019, Markus Elfring wrote: > >> We will modify the the if in the when code like this: > >> > >> @@ -22,7 +22,7 @@ if (id == NULL || ...) { ... return ...; } > >> ... when != put_device(>dev) > … > >> -when != if (id) { ... put_device(>dev) ... } > >> +when != if (...) {

Re: [v5] coccinelle: semantic code search for missingput_device()

2019-02-16 Thread Julia Lawall
On Sat, 16 Feb 2019, Markus Elfring wrote: > > Thanks, We will change it to something like this: > > In a function, for a local variable obtained by of_find_device_by_node() > > How do you think about another wording approach? > > 1. Precondition: >It will be checked where the return value

[PATCH v2] net: dsa: Implement flow_dissect callback for tag_dsa.

2019-02-16 Thread Rundong Ge
RPS not work for DSA devices since the 'skb_get_hash' will always get the invalid hash for dsa tagged packets. "[PATCH] tag_mtk: add flow_dissect callback to the ops struct" introduced the flow_dissect callback to get the right hash for MTK tagged packet. Tag_dsa and tag_edsa also need to

Dear how are you!

2019-02-16 Thread Verdiana Marcellus
Dear, It is understandable that you may be a bit apprehensive because you do not know me, I am writing this mail to you with serious tears in my eyes and great sorrow in my heart, I decided to contact you due to the urgency of my situation. My Name is Mrs Verdiana Marcellus, Am contacting you

Re: [v5] coccinelle: semantic code search for missingput_device()

2019-02-16 Thread Julia Lawall
On Sat, 16 Feb 2019, wen.yan...@zte.com.cn wrote: > > > Thanks, We will change it to something like this: > > > In a function, for a local variable obtained by of_find_device_by_node() > > > > How do you think about another wording approach? > > > > 1. Precondition: > > It will be checked where

Re: [PATCH v2] net: dsa: Implement flow_dissect callback for tag_dsa.

2019-02-16 Thread Rundong Ge
Hi Andrew I have tested the L3 forwarding throughput performance of my box (with an intel 4-core processor and each core’s frequency is 2.20GHz). In my test scenario, I generated 200 UDP flows (frame size is 64 bytes) with different src/dst pairs from eth1 to eth0. Eth1 is a slave DSA device from

Re: [v5] coccinelle: semantic code search for missingput_device()

2019-02-16 Thread Julia Lawall
Actually, upon reflection, I don't like the if (...) solution. if (id != NULL) would be better. This will also check for if (id). If having such an explicit test results in false positives, the semantic patch can be revised. But it is better than if (...), which allow anything at all, and

Re: [PATCH] ata: fix a race condition when internal cmd time out

2019-02-16 Thread Jason Yan
Hi, Sergei Thanks for the review. On 2019/2/16 15:45, Sergei Shtylyov wrote: Hello! On 16.02.2019 6:42, Jason Yan wrote: For internal cmds, we will unmap DMA memory associated with the cmd before we abort the cmd. If DMA transfering data before the aborting,    Transferring. bus error

Re: [v5] Coccinelle: semantic code search for missing put_device()

2019-02-16 Thread Markus Elfring
>> Thus I do not see a need (or requirement) for a duplicate search attempt. > > Why don't you actually try it and see what the difference is rather than > repeatedly giving false information? I suggest to clarify this software development disagreement by the following SmPL code. ... when !=

Re: nbd, nbdkit, loopback mounts and memory management

2019-02-16 Thread Wouter Verhelst
Hi, On Fri, Feb 15, 2019 at 10:53:32PM +, Richard W.M. Jones wrote: > On Fri, Feb 15, 2019 at 10:41:26PM +, Richard W.M. Jones wrote: > > On Fri, Feb 15, 2019 at 08:19:54PM +0100, Pavel Machek wrote: > > > Hi! > > > > > > I watched fosdem talk about > > > nbdkit...

[PATCH] staging: erofs: remove rcu_read_lock() in erofs_try_to_free_cached_page

2019-02-16 Thread Gao Xiang
page_private(page) cannot be changed if page lock is taken. Besides, the corresponding workgroup won't be freed if the page is already protected by page lock, therefore no need to take rcu read lock. Signed-off-by: Gao Xiang --- drivers/staging/erofs/unzip_vle.c | 16 +--- 1 file

Re: [PATCH v2] jffs2: safely remove obsolete dirent from the f->dents list

2019-02-16 Thread yuyufen
ping? On 2019/1/23 15:22, Yufen Yu wrote: We may delete a bunch of directory entries, operating such as: getdents(), unlink(), getdents()..., until the end of the directory. jffs2 handles f_pos on the directory merely as the position on the f->dents list. So, the next getdents() may skip some

[PATCH v2] ata: fix a race condition when internal cmd time out

2019-02-16 Thread Jason Yan
For internal cmds, we will unmap DMA memory associated with the cmd before we abort the cmd. If DMA transferring data before the aborting, bus error will occur. ata_exec_internal_sg ->ata_port_freeze if timeout ->ata_qc_complete ->ata_sg_clean dma

Re: [v5] coccinelle: semantic code search for missingput_device()

2019-02-16 Thread Markus Elfring
> We don't need perfection. I guess that you noticed in the meantime that I dare to propose more software development efforts in such a direction. > We need more to eliminate the memory leaks. Will this view evolve into further helpful and constructive clarifications? Regards, Markus

Re: [Cocci] [v5] coccinelle: semantic code search for missingput_device()

2019-02-16 Thread Wolfram Sang
Hi, On Sat, Feb 16, 2019 at 09:57:54AM +0100, Markus Elfring wrote: > > We don't need perfection. > > I guess that you noticed in the meantime that I dare to propose > more software development efforts in such a direction. Yes, this is noticable. It is your choice, however, other people may

Re: Fix 80d20d35af1e ("nohz: Fix local_timer_softirq_pending()") may have revealed another problem

2019-02-16 Thread Heiner Kallweit
On 15.02.2019 01:31, Frederic Weisbecker wrote: > On Thu, Feb 14, 2019 at 11:33:44PM +0100, Heiner Kallweit wrote: >> On 14.02.2019 22:47, Thomas Gleixner wrote: >>> On Thu, 14 Feb 2019, Heiner Kallweit wrote: On 24.01.2019 20:37, Heiner Kallweit wrote: >> > Hi Frederic, > is the

[PATCH] r8152: Add support for MAC address pass through on RTL8153-BD

2019-02-16 Thread David Chen
From: David Chen RTL8153-BD is used in Dell DA300 type-C dongle. It should be added to the whitelist of devices to activate MAC address pass through. Per confirming with Realtek all devices containing RTL8153-BD should activate MAC pass through and there won't use pass through bit on efuse like

[RFC PATCH] aio: add check for timeout to aviod invalid value

2019-02-16 Thread Tan Xiaojun
(When I was testing with syzkaller, I found a lot of ubsan problems. Here is one of them. I am not sure if it needs to be fixed and how it will be fixed. So I sent this patch to ask your opinion.) Syzkaller reported a UBSAN bug below, which was mainly caused by a large negative number passed to

Re: [Cocci] [v5] coccinelle: semantic code search for missingput_device()

2019-02-16 Thread Markus Elfring
>>> We don't need perfection. >> >> I guess that you noticed in the meantime that I dare to propose >> more software development efforts in such a direction. > > Yes, this is noticable. I am curious then if remaining change suggestions will be picked up by more software developers and reviewers.

Re: [RFC][Patch v8 0/7] KVM: Guest Free Page Hinting

2019-02-16 Thread David Hildenbrand
On 04.02.19 21:18, Nitesh Narayan Lal wrote: Hi Nitesh, I thought again about how s390x handles free page hinting. As that seems to work just fine, I guess sticking to a similar model makes sense. I already explained in this thread how it works on s390x, a short summary: 1. Each VCPU has a

[PATCH net-next] liquidio: using NULL instead of plain integer

2019-02-16 Thread YueHaibing
Fix following warning: drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:1453:35: warning: Using plain integer as NULL pointer drivers/net/ethernet/cavium/liquidio/lio_main.c:2910:23: warning: Using plain integer as NULL pointer Signed-off-by: YueHaibing ---

[PATCH -next] scsi: mvumi: Using plain integer as NULL pointer

2019-02-16 Thread YueHaibing
Fix following sparse warning: drivers/scsi/mvumi.c:1797:48: warning: Using plain integer as NULL pointer drivers/scsi/mvumi.c:2143:50: warning: Using plain integer as NULL pointer drivers/scsi/mvumi.c:755:58: warning: Using plain integer as NULL pointer Signed-off-by: YueHaibing ---

[PATCH] ASoC: simple-card: Fix refcount underflow

2019-02-16 Thread Daniel Baluta
of_get_child_by_name() takes a reference we'll need to drop later so when we substitute in top we need to take a reference as well as just assigning. Without this patch we hit the following error: [1.246852] OF: ERROR: Bad of_node_put() on /sound-wm8524 [1.262261] Hardware name: NXP

INFO: task hung in addrconf_dad_work

2019-02-16 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:5ded5871030e Merge tag 'scsi-fixes' of git://git.kernel.or.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=1577228f40 kernel config: https://syzkaller.appspot.com/x/.config?x=ee434566c893c7b1

[PATCH] ARM: dts: rockchip: rk3188-bqedison2qc: remove cap-mmc-highspeed from mmc1 node

2019-02-16 Thread Johan Jonker
The mmc1 pins are used for SDIO with a wifi chip. The function mmc_sdio_switch_hs() only checks for MMC_CAP_SD_HIGHSPEED and not for MMC_CAP_MMC_HIGHSPEED, so cap-mmc-highspeed can be removed. Signed-off-by: Johan Jonker --- arch/arm/boot/dts/rk3188-bqedison2qc.dts | 1 - 1 file changed, 1

Re: [PATCH] sched/x86: Save [ER]FLAGS on context switch

2019-02-16 Thread Peter Zijlstra
On Fri, Feb 15, 2019 at 08:06:56PM -0800, h...@zytor.com wrote: > This implies we invoke schedule -- a restricted operation (consider > may_sleep) during execution of STAC-enabled code, but *not* as an > exception or interrupt, since those preserve the flags. Meet preempt_enable(). > I have

Re: [PATCH] sched/x86: Save [ER]FLAGS on context switch

2019-02-16 Thread Peter Zijlstra
On Fri, Feb 15, 2019 at 04:21:46PM -0800, Linus Torvalds wrote: > Even just a comment about it would be fine. But it might also be good > to show that it's an explicit eflags value and just use > X86_EFLAGS_FIXED as the initializer. That is in fact what I have now; I'll repost on Monday or so.

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

2019-02-16 Thread Xie XiuQi
Hi everyone, I meet this bug two times, does anyone has idea to fix this issue ? (See attachments) == BUG: KASAN: use-after-free in atomic_dec_and_test include/asm-generic/atomic-instrumented.h:259 [inline] BUG: KASAN:

Re: [PATCH] powerpc/64s: Fix possible corruption on big endian due to pgd/pud_present()

2019-02-16 Thread Balbir Singh
On Thu, Feb 14, 2019 at 05:23:39PM +1100, Michael Ellerman wrote: > In v4.20 we changed our pgd/pud_present() to check for _PAGE_PRESENT > rather than just checking that the value is non-zero, e.g.: > > static inline int pgd_present(pgd_t pgd) > { > - return !pgd_none(pgd); > +

[PATCH] printk: Pass caller information to log_store().

2019-02-16 Thread Tetsuo Handa
When thread1 called printk() which did not end with '\n', and then thread2 called printk() which ends with '\n' before thread1 calls pr_cont(), the partial content saved into "struct cont" is flushed by thread2 despite the partial content was generated by thread1. This leads to confusing output as

Re: [PATCH] tracing: fix incorrect tracer freeing when opening tracing pipe

2019-02-16 Thread zhangyi (F)
On 2019/2/13 21:36, Steven Rostedt Wrote: > On Wed, 13 Feb 2019 20:29:06 +0800 > "zhangyi (F)" wrote: > >> Commit d716ff71dd12 ("tracing: Remove taking of trace_types_lock in >> pipe files") use the current tracer instead of the copy in >> tracing_open_pipe(), but it forget to remove the freeing

-Wimplicit-fallthrough not working with ccache

2019-02-16 Thread Kalle Valo
(replying to an old thread but renaming it) Kalle Valo writes: > "Gustavo A. R. Silva" wrote: > >> In preparation to enabling -Wimplicit-fallthrough, mark switch cases >> where we are expecting to fall through. >> >> Notice that in this particular case, I replaced "pass through" with >> a

[tip:efi/core] efi: Fix build error due to enum collision between efi.h and ima.h

2019-02-16 Thread tip-bot for Anders Roxell
Commit-ID: 5c418dc789a3898717ebf2caa5716ba91a7150b2 Gitweb: https://git.kernel.org/tip/5c418dc789a3898717ebf2caa5716ba91a7150b2 Author: Anders Roxell AuthorDate: Fri, 15 Feb 2019 17:55:51 +0100 Committer: Ingo Molnar CommitDate: Sat, 16 Feb 2019 12:18:55 +0100 efi: Fix build error due

Re: [PATCH v2 1/2] leds: Add Intel Cherry Trail Whiskey Cove PMIC LEDs

2019-02-16 Thread Yauhen Kharuzhy
On Fri, Feb 15, 2019 at 10:43:17PM +0100, Jacek Anaszewski wrote: > Hi Yauhen, > > On 2/15/19 8:27 AM, Yauhen Kharuzhy wrote: > > On Fri, Feb 15, 2019 at 12:03:07AM +0100, Pavel Machek wrote: > > > Hi! > > > > > > > > > > I suggest that we deal with this special case by adding 3 custom > > > > >

Re: [PATCH] iio/chemical/bme680: Fix SPI read interface

2019-02-16 Thread Himanshu Jha
Hello Mike, On Fri, Feb 15, 2019 at 02:47:55PM +0100, Mike Looijmans wrote: > The SPI interface implementation was completely broken. My apologies! SPI interface caused me a lot of trouble in my project timeline. I tried many different ways to try playing with acpi dsl, printks etc. One of the

Re: [PATCH v3 5/6] dt-bindings: i2c: Add Mediatek MT8183 i2c binding

2019-02-16 Thread Qii Wang
On Fri, 2019-02-15 at 10:02 +0100, Wolfram Sang wrote: > On Thu, Feb 14, 2019 at 09:54:28AM +0800, Qii Wang wrote: > > On Tue, 2019-02-05 at 14:16 +0100, Wolfram Sang wrote: > > > > + - mediatek,share-i3c: i3c controller can share i2c function. > > > > > > I am not happy with this binding. There

Re: [PATCH V5 1/4] misc/pvpanic : preparing for pvpanic driver framework

2019-02-16 Thread Andy Shevchenko
On Sat, Feb 16, 2019 at 10:29 AM Peng Hao wrote: > > Preparing for pvpanic driver framework. Create a pvpanic driver > directory and move current driver file to new directory. > Reviewed-by: Andy Shevchenko > Signed-off-by: Peng Hao > --- > drivers/misc/Kconfig | 9 +

Re: [PATCH V5 3/4] misc/pvpanic: Avoid initializing multiple pvpanic devices

2019-02-16 Thread Andy Shevchenko
On Sat, Feb 16, 2019 at 10:29 AM Peng Hao wrote: > > Avoid initializing multiple pvpanic devices when configure multiple > pvpanic device driver type. Make sure that only one pvpanic device > is working. > > Signed-off-by: Peng Hao > --- > drivers/misc/pvpanic/pvpanic.c | 13 - > 1

Re: [PATCH v3 5/6] dt-bindings: i2c: Add Mediatek MT8183 i2c binding

2019-02-16 Thread Wolfram Sang
> Maybe you think that MT8183 SoC only has the I3C controllers. Actually, > there are I2C and I3C controllers on MT8183 SoC. We will remove > "mediatek,share-i3c" for I2C controller driver, so these patches are > just to support the I2C controllers on MT8183 SoC. For the I3C > controller we will

Re: [PATCH v11 2/3] x86,/proc/pid/status: Add AVX-512 usage elapsed time

2019-02-16 Thread Thomas Gleixner
On Fri, 15 Feb 2019, Li, Aubrey wrote: > On 2019/2/14 19:29, Thomas Gleixner wrote: > Under this scenario, the elapsed time becomes longer than normal indeed, see > below: > > $ while [ 1 ]; do cat /proc/6985/status | grep AVX; sleep 1; done > AVX512_elapsed_ms:3432 > AVX512_elapsed_ms:

[PATCH v2] parisc: Fix ptrace syscall number modification

2019-02-16 Thread Dmitry V. Levin
Commit 910cd32e552e ("parisc: Fix and enable seccomp filter support") introduced a regression in ptrace-based syscall tampering: when tracer changes syscall number to -1, the kernel fails to initialize %r28 with -ENOSYS and subsequently fails to return the error code of the failed syscall to

Re: [PATCH] powerpc/64s: Fix possible corruption on big endian due to pgd/pud_present()

2019-02-16 Thread Andreas Schwab
On Feb 14 2019, Michael Ellerman wrote: > The fix is simple, we need to convert the result of the bitwise && to > an int before returning it. Alternatively, the return type could be changed to bool, so that the compiler does the right thing by itself. Andreas. -- Andreas Schwab,

[PATCH] mm/hugetlb: Fix unsigned overflow in __nr_hugepages_store_common()

2019-02-16 Thread Jingxiangfeng
From: Jing Xiangfeng We can use the following command to dynamically allocate huge pages: echo NR_HUGEPAGES > /proc/sys/vm/nr_hugepages The count in __nr_hugepages_store_common() is parsed from /proc/sys/vm/nr_hugepages, The maximum number of count is ULONG_MAX, the operation 'count +=

Info

2019-02-16 Thread Mrs. Marianne Jeanne
>From Mrs. Marianne Jeanne, Attention: Dear beloved. My Name is Mrs. Marianne Jeanne from France. I know that this message will be a surprise to you. Firstly, I am married to Mr. Frank Jeanne, A gold merchant who owns a small gold Mine in Burkina Faso; He died of Cardiovascular Disease in

[PATCH v3 0/6] Several patches to fix code bugs, improve documents and clean up

2019-02-16 Thread Baoquan He
The v2 post was here: https://lkml.org/lkml/2018/9/9/56 During the v2 patch reviewing, Ingo suggested to: (1) improve the document in Documentation/x86/x86_64/mm.txt; (2) improve the documents about struct kaslr_memory_region; (3) open code unnecessary function get_padding(); (4) improve the

[PATCH v3 1/6] x86/mm/KASLR: Improve code comments about struct kaslr_memory_region

2019-02-16 Thread Baoquan He
The old comment above kaslr_memory_region is not clear enough to explain the concepts of memory region KASLR. [Ingo suggested this and helped to prettify the text] Signed-off-by: Baoquan He --- arch/x86/mm/kaslr.c | 55 ++--- 1 file changed, 52

[PATCH v3 2/6] x86/mm/KASLR: Open code unnecessary function get_padding

2019-02-16 Thread Baoquan He
It's used only twice and we do bit shifts in the parent function anyway so it's not like it's hiding some uninteresting detail. Suggested-by: Ingo Molnar Signed-off-by: Baoquan He --- arch/x86/mm/kaslr.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git

[PATCH v3 3/6] mm: Add build time sanity check for struct page size

2019-02-16 Thread Baoquan He
Size of struct page might be larger than 64 bytes if debug options enabled, or fields added for debugging intentionally. Yet an upper limit need be added at build time to trigger an alert in case the size is too big to boot up system, warning people to check if it's be done on purpose in advance.

[PATCH v3 5/6] x86/mm/KASLR: Calculate the actual size of vmemmap region

2019-02-16 Thread Baoquan He
Vmemmap region has different maximum size depending on paging mode. Now its size is hardcoded as 1TB in memory KASLR, this is not right for 5-level paging mode. It will cause overflow if vmemmap region is randomized to be adjacent to cpu_entry_area region and its actual size is bigger than 1TB.

[PATCH v3 4/6] x86/mm/KASLR: Fix the wrong calculation of memory region initial size

2019-02-16 Thread Baoquan He
In memory region KASLR, __PHYSICAL_MASK_SHIFT is taken to calculate the initial size of the direct mapping region. This is correct in the old code where __PHYSICAL_MASK_SHIFT was equal to MAX_PHYSMEM_BITS, 46 bits, and only 4-level mode was supported. Later, in commit b83ce5ee91471d ("x86/mm/64:

[PATCH v3 6/6] x86/mm/KASLR: Do not adapt the size of the direct mapping section for SGI UV system

2019-02-16 Thread Baoquan He
On SGI UV system, kernel often hangs when KASLR is enabled. Disabling KASLR makes kernel work well. The back trace is: kernel BUG at arch/x86/mm/init_64.c:311! invalid opcode: [#1] SMP [...] RIP: 0010:__init_extra_mapping+0x188/0x196 [...] Call Trace: init_extra_mapping_uc+0x13/0x15

[tip:efi/urgent] arm64, mm, efi: Account for GICv3 LPI tables in static memblock reserve table

2019-02-16 Thread tip-bot for Ard Biesheuvel
Commit-ID: 8a5b403d71affa098009cc3dff1b2c45113021ad Gitweb: https://git.kernel.org/tip/8a5b403d71affa098009cc3dff1b2c45113021ad Author: Ard Biesheuvel AuthorDate: Fri, 15 Feb 2019 13:33:32 +0100 Committer: Ingo Molnar CommitDate: Sat, 16 Feb 2019 15:02:03 +0100 arm64, mm, efi: Account

[tip:efi/urgent] efi/arm: Revert "Defer persistent reservations until after paging_init()"

2019-02-16 Thread tip-bot for Ard Biesheuvel
Commit-ID: 582a32e708823e5957fd73ccd78dc4a9e49d21ea Gitweb: https://git.kernel.org/tip/582a32e708823e5957fd73ccd78dc4a9e49d21ea Author: Ard Biesheuvel AuthorDate: Fri, 15 Feb 2019 13:33:33 +0100 Committer: Ingo Molnar CommitDate: Sat, 16 Feb 2019 15:02:03 +0100 efi/arm: Revert "Defer

Re: [PATCH v2] x86/mm: Adjust the padding size for KASLR

2019-02-16 Thread Baoquan He
On 02/14/19 at 12:39pm, Masayoshi Mizuma wrote: > > Another thing is for the 3rd part, I also queued several patches in my > > local branch, they are code bug fix patches, and several clean up > > patches suggested by Ingo and Kirill. They can be found here: > > > >

Re: [PATCH] powerpc/64s: Fix possible corruption on big endian due to pgd/pud_present()

2019-02-16 Thread Segher Boessenkool
Hi all, On Sat, Feb 16, 2019 at 09:55:11PM +1100, Balbir Singh wrote: > On Thu, Feb 14, 2019 at 05:23:39PM +1100, Michael Ellerman wrote: > > In v4.20 we changed our pgd/pud_present() to check for _PAGE_PRESENT > > rather than just checking that the value is non-zero, e.g.: > > > > static

phy speed setting issue: e1000: Add support for the CE4100 reference platform

2019-02-16 Thread Colin Ian King
Hi, Static analysis from CoverityScan has detected an issue with the speed setup with the control setting in the e1000 driver. Function e1000_config_mac_to_phy in /drivers/net/ethernet/intel/e1000/e1000_hw.c, CoverityScan reports: CID 140032 (#1 of 1): Operands don't affect result

[PATCH] scsi: mvumi: fix 32 bit shift of a 32 bit unsigned int

2019-02-16 Thread Colin King
From: Colin Ian King Currently m_sg->baseaddr_h (a 32 bit unsigned int) is being shifted by a total of 32 bits; this always produces a 0 result. Fix this by casting it to a dma_addr_t (a 64 bit unsigned int) before performing the shift. Detected by CoverityScan, CID#147270 ("Operands don't

drm/nouveau/bios/ramcfg, setting of RON pull value

2019-02-16 Thread Colin Ian King
Hi, Static Analysis with CoverityScan as detected an issue with the setting of the RON pull value in function nvkm_gddr3_calc in drm/nouveau/bios/ramcfg.c This was introduced by commit: c25bf7b6155cb ("drm/nouveau/bios/ramcfg: Separate out RON pull value") CoverityScan reports the issue as

Re: [RFC PATCH v5 03/12] __wr_after_init: Core and default arch

2019-02-16 Thread Igor Stoppa
On 15/02/2019 10:57, Peter Zijlstra wrote: Where are the comments and Changelog notes ? How is an arch maintainer to be aware of this requirement when adding support for his/her arch? Yes, it will be fixed in the next revision. I've added comment to the core wr_assign function and also to

Re: [PATCH] vfs: fix preadv64v2 and pwritev64v2 compat syscalls with offset == -1

2019-02-16 Thread Aurelien Jarno
On 2019-01-12 20:07, Aurelien Jarno wrote: > On 2018-12-06 20:05, Aurelien Jarno wrote: > > The preadv2 and pwritev2 syscalls are supposed to emulate the readv and > > writev syscalls when offset == -1. Therefore the compat code should > > check for offset before calling do_compat_preadv64 and > >

[PATCH 0/3] PM / devfreq: do some cleanup

2019-02-16 Thread Yangtao Li
The informations come from the coccinelle tool. drivers/devfreq/tegra-devfreq.c:577:5-8: Unneeded variable: "ret". Return "0" on line 603 drivers/devfreq/rk3399_dmc.c:325:2-3: Unneeded semicolon drivers/devfreq/event/rockchip-dfi.c:214:2-3: Unneeded semicolon Yangtao Li (3): PM / devfreq:

[PATCH 2/3] PM / devfreq: rockchip-dfi: remove unneeded semicolon

2019-02-16 Thread Yangtao Li
The semicolon is unneeded, so remove it. Signed-off-by: Yangtao Li --- drivers/devfreq/event/rockchip-dfi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/devfreq/event/rockchip-dfi.c b/drivers/devfreq/event/rockchip-dfi.c index 22b113363ffc..fcbf76ebf55d 100644

[PATCH 1/3] PM / devfreq: rk3399_dmc: remove unneeded semicolon

2019-02-16 Thread Yangtao Li
The semicolon is unneeded, so remove it. Signed-off-by: Yangtao Li --- drivers/devfreq/rk3399_dmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/devfreq/rk3399_dmc.c b/drivers/devfreq/rk3399_dmc.c index e795ad2b3f6b..a228dad2bee4 100644 ---

[PATCH 3/3] PM / devfreq: tegra: remove unneeded variable

2019-02-16 Thread Yangtao Li
This variable is not used after initialization, so remove it. And in order to unify the code style, move the location where the dev_get_drvdata is called by the way. Signed-off-by: Yangtao Li --- drivers/devfreq/tegra-devfreq.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff

Re: [PATCH] vfs: fix preadv64v2 and pwritev64v2 compat syscalls with offset == -1

2019-02-16 Thread Al Viro
On Sat, Feb 16, 2019 at 04:15:28PM +0100, Aurelien Jarno wrote: > On 2019-01-12 20:07, Aurelien Jarno wrote: > > On 2018-12-06 20:05, Aurelien Jarno wrote: > > > The preadv2 and pwritev2 syscalls are supposed to emulate the readv and > > > writev syscalls when offset == -1. Therefore the compat

Re: find_get_entries_tag regression bisected

2019-02-16 Thread Matthew Wilcox
On Fri, Feb 15, 2019 at 06:08:15PM -0800, Dan Williams wrote: > Hi Willy, > > Piotr reports the following crash can be triggered on latest mainline: > > EXT4-fs (pmem5): recovery complete > EXT4-fs (pmem5): mounted filesystem with ordered data mode. Opts: dax > [ cut here

Re: [PATCH v2] net: dsa: Implement flow_dissect callback for tag_dsa.

2019-02-16 Thread Andrew Lunn
On Sat, Feb 16, 2019 at 04:38:25PM +0800, Rundong Ge wrote: > Hi Andrew > > I have tested the L3 forwarding throughput performance of my box (with > an intel 4-core processor and each core’s frequency is 2.20GHz). > In my test scenario, I generated 200 UDP flows (frame size is 64 > bytes) with

Re: [PATCH 2/4] arm64: dts: rockchip: rockpro64 dts remove unused node

2019-02-16 Thread agajjar
On 2/16/2019 2:16 AM, Heiko Stübner wrote: Am Freitag, 15. Februar 2019, 13:08:16 CET schrieb agajjar: On 2/15/2019 2:48 PM, Heiko Stübner wrote: Am Mittwoch, 13. Februar 2019, 18:06:38 CET schrieb Akash Gajjar: lcd panel pinmux and vcc1v8_s3 regulator is redundant and has a no impact, so

Re: [PATCH v2] net: dsa: Implement flow_dissect callback for tag_dsa.

2019-02-16 Thread Andrew Lunn
On Sat, Feb 16, 2019 at 08:35:24AM +, Rundong Ge wrote: > RPS not work for DSA devices since the 'skb_get_hash' > will always get the invalid hash for dsa tagged packets. > > "[PATCH] tag_mtk: add flow_dissect callback to the ops struct" > introduced the flow_dissect callback to get the right

[PATCH 0/2] cpufreq: do some cleanup

2019-02-16 Thread Yangtao Li
The informations come from the coccinelle tool. drivers/cpufreq/longhaul.c:854:2-3: Unneeded semicolon drivers/cpufreq/pcc-cpufreq.c:271:2-3: Unneeded semicolon Yangtao Li (2): cpufreq: pcc-cpufreq: remove unneeded semicolon cpufreq: longhaul: remove unneeded semicolon

[PATCH 2/2] cpufreq: longhaul: remove unneeded semicolon

2019-02-16 Thread Yangtao Li
The semicolon is unneeded, so remove it. Signed-off-by: Yangtao Li --- drivers/cpufreq/longhaul.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/longhaul.c b/drivers/cpufreq/longhaul.c index 279bd9e9fa95..fb546e0d0356 100644 --- a/drivers/cpufreq/longhaul.c

[PATCH 1/2] cpufreq: pcc-cpufreq: remove unneeded semicolon

2019-02-16 Thread Yangtao Li
The semicolon is unneeded, so remove it. Signed-off-by: Yangtao Li --- drivers/cpufreq/pcc-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/pcc-cpufreq.c b/drivers/cpufreq/pcc-cpufreq.c index 099a849396f6..1e5e64643c3a 100644 ---

Re: drm/nouveau/bios/ramcfg, setting of RON pull value

2019-02-16 Thread Ilia Mirkin
On Sat, Feb 16, 2019 at 10:02 AM Colin Ian King wrote: > > Hi, > > Static Analysis with CoverityScan as detected an issue with the setting > of the RON pull value in function nvkm_gddr3_calc in > drm/nouveau/bios/ramcfg.c > > This was introduced by commit: c25bf7b6155cb ("drm/nouveau/bios/ramcfg:

[PATCH] cpufreq: speedstep: convert BUG() to BUG_ON()

2019-02-16 Thread Yangtao Li
To fix coccinelle WARNING. WARNING: Use BUG_ON instead of if condition followed by BUG. Signed-off-by: Yangtao Li --- drivers/cpufreq/speedstep-ich.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/cpufreq/speedstep-ich.c b/drivers/cpufreq/speedstep-ich.c index

4.20.7: pl2303 not working (post-4.19 regression) (limited info so far, not yet bisected)

2019-02-16 Thread Nix
So I just tried to connect up to my ancient Soekris firewall's serial console to try to bisect a problem where it stopped booting in 4.20, and found I couldn't. minicom says: minicom: cannot open /dev/ttyUSB0: Input/output error and in the dmesg we see [705576.028170] pl2303 ttyUSB0: failed to

[PATCH] cpufreq: scmi: fix use-after-free in scmi_cpufreq_exit()

2019-02-16 Thread Yangtao Li
This issue was detected with the help of Coccinelle. So change the order of function calls to fix it. Fixes: 1690d8bb91e37 (cpufreq: scpi/scmi: Fix freeing of dynamic OPPs) Signed-off-by: Yangtao Li --- drivers/cpufreq/scmi-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH V1] i2c: tegra: fix tegra186 hw supported features

2019-02-16 Thread Sowjanya Komatineni
Tegra186 does not support multi-master mode and also there is no master fifo control register. This patch fixes supported features of Tegra186 and prevents crashing during boot as master fifo control register are not present on Tegra186 and prior. Signed-off-by: Sowjanya Komatineni ---

Re: [PATCH v6] coccinelle: semantic code search for missing put_device()

2019-02-16 Thread Julia Lawall
On Sat, 16 Feb 2019, Wen Yang wrote: > The of_find_device_by_node() takes a reference to the underlying device > structure, we should release that reference. > The implementation of this semantic code search is: > In a function, for a local variable obtained by of_find_device_by_node(), > a,

Re: [PATCH] scsi: mvumi: fix 32 bit shift of a 32 bit unsigned int

2019-02-16 Thread Walter Harms
Am 16.02.2019 15:44, schrieb Colin King: > From: Colin Ian King > > Currently m_sg->baseaddr_h (a 32 bit unsigned int) is being shifted by a > total of 32 bits; this always produces a 0 result. Fix this by casting > it to a dma_addr_t (a 64 bit unsigned int) before performing the shift. > >

[PATCH] platform: set of_node in platform_device_register_full()

2019-02-16 Thread Mans Rullgard
If the provided fwnode is an OF node, set dev.of_node as well. Signed-off-by: Mans Rullgard --- drivers/base/platform.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/base/platform.c b/drivers/base/platform.c index dff82a3c2caa..853a1d0e5845 100644 --- a/drivers/base/platform.c +++

Re: [PATCH V2 2/2] rpmsg: add syslog redirection driver

2019-02-16 Thread xiang xiao
On Fri, Feb 15, 2019 at 11:06 PM Andy Shevchenko wrote: > > On Fri, Feb 15, 2019 at 12:31:17AM +0800, xiang xiao wrote: > > On Thu, Feb 14, 2019 at 9:09 PM Andy Shevchenko > > wrote: > > > On Thu, Feb 14, 2019 at 02:02:38PM +0800, Xiang Xiao wrote: > > > > > This driver allows the remote

Re: [PATCH v2] parisc: Fix ptrace syscall number modification

2019-02-16 Thread Helge Deller
On 16.02.19 14:10, Dmitry V. Levin wrote: > Commit 910cd32e552e ("parisc: Fix and enable seccomp filter support") > introduced a regression in ptrace-based syscall tampering: when tracer > changes syscall number to -1, the kernel fails to initialize %r28 with > -ENOSYS and subsequently fails to

Re: [PATCH v2 1/2] leds: Add Intel Cherry Trail Whiskey Cove PMIC LEDs

2019-02-16 Thread Jacek Anaszewski
Hi Hans, On 2/16/19 12:14 AM, Hans de Goede wrote: Hi, On 2/15/19 11:31 PM, Jacek Anaszewski wrote: On 2/15/19 11:26 PM, Hans de Goede wrote: I think that should work fine, which means that we can use the timer and pattern trigger support for the blinking and breathing modes. That still

Re: [PATCH v11 2/3] x86,/proc/pid/status: Add AVX-512 usage elapsed time

2019-02-16 Thread Li, Aubrey
On 2019/2/16 20:55, Thomas Gleixner wrote: > On Fri, 15 Feb 2019, Li, Aubrey wrote: >> On 2019/2/14 19:29, Thomas Gleixner wrote: >> Under this scenario, the elapsed time becomes longer than normal indeed, see >> below: >> >> $ while [ 1 ]; do cat /proc/6985/status | grep AVX; sleep 1; done >>

[PATCH] usb: core: skip interfaces disabled in devicetree

2019-02-16 Thread Mans Rullgard
If an interface has an associated devicetree node with status disabled, do not register the device. This is useful for boards with a built-in multifunction USB device where some functions are broken or otherwise undesired. Signed-off-by: Mans Rullgard --- drivers/usb/core/message.c | 4 1

[PATCH] cpufreq: powernv: fix missing check of return value in init_powernv_pstates()

2019-02-16 Thread Yangtao Li
kmalloc() could fail, so insert a check of its return value. And if it fails, returns -ENOMEM. And remove (struct pstate_idx_revmap_data *) to fix coccinelle WARNING by the way. WARNING: casting value returned by memory allocation function to (struct pstate_idx_revmap_data *) is useless.

[PATCH] mm: Fix buddy list helpers

2019-02-16 Thread Dan Williams
Tetsuo reports that free page statistics are not reporting correctly, and Vlastimil noticed that "mm: Move buddy list manipulations into helpers" botched one of its conversions of add_to_free_area(). Fix the double-increment of ->nr_free. Reported-by: Tetsuo Handa Reported-by: Vlastimil Babka

Re: [PATCH net-next 1/3] net: stmmac: Fix NAPI poll in TX path when in multi-queue

2019-02-16 Thread Lendacky, Thomas
On 2/15/19 6:35 PM, Florian Fainelli wrote: > On 2/15/19 5:42 AM, Jose Abreu wrote: >> Commit 8fce33317023 introduced the concept of NAPI per-channel and >> independent cleaning of TX path. >> >> This is currently breaking performance in some cases. The scenario >> happens when all packets are

  1   2   >