Re: nfp: abm: fix memory leak in nfp_abm_u32_knode_replace

2019-09-27 Thread Markus Elfring
>> Can such a change variant be a bit nicer? > > Definitely not. > > Looks good as is, thanks Navid! I find it interesting how the software development opinions are different also in this use case for the implementation of correct and efficient exception handling.

Re: [PATCH 4/4] perf docs: Correct and clarify jitdump spec

2019-09-27 Thread Stephane Eranian
On Fri, Sep 27, 2019 at 6:53 PM Steve MacLean wrote: > > Specification claims latest version of jitdump file format is 2. Current > jit dump reading code treats 1 as the latest version. > > Correct spec to match code. > > The original language made it unclear the value to be written in the magic

[PATCH -next] nfsd: remove set but not used variable 'len'

2019-09-27 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: fs/nfsd/nfs4xdr.c: In function nfsd4_encode_splice_read: fs/nfsd/nfs4xdr.c:3464:7: warning: variable len set but not used [-Wunused-but-set-variable] It is not used since commit 83a63072c815 ("nfsd: fix nfs read eof detection") Reported-by: Hulk

Re: [PATCH v4 0/3] Optimize tlbflush path

2019-09-27 Thread Atish Patra
On Fri, 2019-08-30 at 19:50 -0700, Paul Walmsley wrote: > Hi Atish, > > On Thu, 22 Aug 2019, Atish Patra wrote: > > > This series adds few optimizations to reduce the trap cost in the > > tlb > > flush path. We should only make SBI calls to remote tlb flush only > > if > > absolutely required.

[PATCH -next] habanalabs: remove set but not used variable 'ctx'

2019-09-27 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: drivers/misc/habanalabs/device.c: In function hpriv_release: drivers/misc/habanalabs/device.c:45:17: warning: variable ctx set but not used [-Wunused-but-set-variable] It is never used since commit eb7caf84b029 ("habanalabs: maintain a list of file

Re: [PATCH v2 1/1] leds: remove PAGE_SIZE limit of /sys/class/leds//trigger

2019-09-27 Thread Akinobu Mita
2019年9月28日(土) 2:46 Greg Kroah-Hartman : > > On Sat, Sep 28, 2019 at 01:47:21AM +0900, Akinobu Mita wrote: > > 2019年9月27日(金) 15:39 Greg Kroah-Hartman : > > > > > > On Sat, Sep 14, 2019 at 12:03:24AM +0900, Akinobu Mita wrote: > > > > Reading /sys/class/leds//trigger returns all available LED > > >

Re: [PATCH] media: uvcvideo: Use streaming DMA APIs to transfer buffers

2019-09-27 Thread Nicolas Boichat
On Fri, Aug 2, 2019 at 9:13 PM Shik Chen wrote: > > Similar to the commit 1161db6776bd ("media: usb: pwc: Don't use coherent > DMA buffers for ISO transfer") [1] for the pwc driver. Use streaming DMA > APIs to transfer buffers and sync them explicitly, because accessing > buffers allocated by

Re: KASAN: slab-out-of-bounds Read in bpf_prog_create

2019-09-27 Thread Eric Biggers
Arnd and Al, On Tue, Sep 17, 2019 at 11:49:06AM -0700, syzbot wrote: > Hello, > > syzbot found the following crash on: > > HEAD commit:2015a28f Add linux-next specific files for 20190915 > git tree: linux-next > console output: https://syzkaller.appspot.com/x/log.txt?x=11880d6960

Re: [GIT PULL] integrity subsystem updates for v5.4

2019-09-27 Thread pr-tracker-bot
The pull request you sent on Wed, 11 Sep 2019 17:29:25 -0400: > git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity.git > next-integrity has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/f1f2f614d535564992f32e720739cb53cf03489f Thank you! --

Re: WARNING: locking bug in selinux_netlbl_socket_connect

2019-09-27 Thread Eric Biggers
On Tue, Sep 24, 2019 at 09:17:35AM -0400, Paul Moore wrote: > On Tue, Sep 24, 2019 at 4:21 AM Dmitry Vyukov wrote: > > On Tue, Sep 24, 2019 at 4:14 AM Paul Moore wrote: > > > On Sat, Sep 21, 2019 at 11:50 AM syzbot > > > wrote: > > > > Hello, > > > > > > > > syzbot found the following crash on:

Re: [PATCH RESEND v4] fs/epoll: Remove unnecessary wakeups of nested epoll that in ET mode

2019-09-27 Thread Andrew Morton
On Wed, 25 Sep 2019 09:56:03 +0800 hev wrote: > From: Heiher > > Take the case where we have: > > t0 > | (ew) > e0 > | (et) > e1 > | (lt) > s0 > > t0: thread 0 > e0: epoll fd 0 > e1: epoll fd 1 > s0: socket fd 0 > ew: epoll_wait >

[PATCH 4/4] perf docs: Correct and clarify jitdump spec

2019-09-27 Thread Steve MacLean
Specification claims latest version of jitdump file format is 2. Current jit dump reading code treats 1 as the latest version. Correct spec to match code. The original language made it unclear the value to be written in the magic field. Revise language that the writer always writes the same

[PATCH 3/4] perf inject --jit: Remove //anon mmap events

2019-09-27 Thread Steve MacLean
While a JIT is jitting code it will eventually need to commit more pages and change these pages to executable permissions. Typically the JIT will want these co-located to minimize branch displacements. The kernel will coalesce these anonymous mapping with identical permissions before sending an

[PATCH 2/4] perf inject jit: Fix JIT_CODE_MOVE filename

2019-09-27 Thread Steve MacLean
During perf inject --jit, JIT_CODE_MOVE records were injecting MMAP records with an incorrect filename. Specifically it was missing the ".so" suffix. Further the JIT_CODE_LOAD record were silently truncating the jr->load.code_index field to 32 bits before generating the filename. Make both

[PATCH] KVM: Unlimit number of ioeventfd assignments for real

2019-09-27 Thread Peter Xu
Previously we've tried to unlimit ioeventfd creation (6ea34c9b78c1, "kvm: exclude ioeventfd from counting kvm_io_range limit", 2013-06-04), because that can be easily done by fd limitations and otherwise it can easily reach the current maximum of 1000 iodevices. Meanwhile, we still use the counter

[PATCH 1/4] perf map: fix overlapped map handling

2019-09-27 Thread Steve MacLean
Whenever an mmap/mmap2 event occurs, the map tree must be updated to add a new entry. If a new map overlaps a previous map, the overlapped section of the previous map is effectively unmapped, but the non-overlapping sections are still valid. maps__fixup_overlappings() is responsible for creating

RE: [PATCH] perf map: fix overlapped map handling

2019-09-27 Thread Steve MacLean
>> An earlier version of this patch used: >> after->start = map->end; >> +after->pgoff += map->end - pos->start; >> >> Instead of the newer Functionally equivalent: >> after->start = map->end; >> +after->pgoff =

Re: [GIT PULL] nfsd changes for 5.4

2019-09-27 Thread pr-tracker-bot
The pull request you sent on Fri, 27 Sep 2019 16:08:38 -0400: > git://linux-nfs.org/~bfields/linux.git tags/nfsd-5.4 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/4f375483559c94ec7c58fa3499e28e327d1ef911 Thank you! -- Deet-doot-dot, I am a bot.

Re: Re: [GIT PULL] nfsd changes for 5.4

2019-09-27 Thread pr-tracker-bot
The pull request you sent on Fri, 27 Sep 2019 19:55:54 -0400: > git://linux-nfs.org/~bfields/linux.git tags/nfsd-5.4 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/298fb76a5583900a155d387efaf37a8b39e5dea2 Thank you! -- Deet-doot-dot, I am a bot.

Re: x86/purgatory: undefined symbol __stack_chk_fail

2019-09-27 Thread Randy Dunlap
On 9/3/19 8:50 AM, Andreas Smas wrote: > Hi, > > For me, kernels built including this commit > b059f801a937 (x86/purgatory: Use CFLAGS_REMOVE rather than reset > KBUILD_CFLAGS) > > results in kexec() failing to load the kernel: > > kexec: Undefined symbol: __stack_chk_fail > kexec-bzImage64:

[PATCH] iio: adc: meson-saradc: Variables could be uninitalized if regmap_read() fails

2019-09-27 Thread Yizhuo
Several functions in this file are trying to use regmap_read() to initialize the specific variable, however, if regmap_read() fails, the variable could be uninitialized but used directly, which is potentially unsafe. The return value of regmap_read() should be checked and handled. Signed-off-by:

Re: [PATCH] Input: hyperv-keyboard: Add the support of hibernation

2019-09-27 Thread dmitry.torok...@gmail.com
On Sat, Sep 21, 2019 at 06:56:04AM +, Dexuan Cui wrote: > > From: dmitry.torok...@gmail.com > > Sent: Thursday, September 19, 2019 9:18 AM > > > > Hi Dexuan, > > > > On Wed, Sep 11, 2019 at 11:36:20PM +, Dexuan Cui wrote: > > > We need hv_kbd_pm_notify() to make sure the

[PATCH] iio: adc: imx25-gcq: Variable could be uninitialized if regmap_read() fails

2019-09-27 Thread Yizhuo
In function mx25_gcq_irq(), local variable "stats" could be uninitialized if function regmap_read() returns -EINVAL. However, this value is used in if statement, which is potentially unsafe. The same case applied to the variable "data" in function mx25_gcq_get_raw_value() in the same file.

Re: Summary of Crash/Panic Behaviors in Linux Kernel

2019-09-27 Thread 김동현
2019년 9월 27일 (금) 오전 5:01, 慕冬亮 님이 작성: > > Dear all, > > Is there any summary of crash/panic behaviors in the Linux Kernel? For > example, GPF (general protection fault), Kernel BUG (BUG_ON). There are a number of blogs and material which describe the behavior the kernel panic. Talking about

Re: [PATCH v2] Input: atmel_mxt_ts - Disable IRQ across suspend

2019-09-27 Thread Dmitry Torokhov
Hi Evan, On Tue, Sep 24, 2019 at 02:52:38PM -0700, Evan Green wrote: > Across suspend and resume, we are seeing error messages like the following: > > atmel_mxt_ts i2c-PRP0001:00: __mxt_read_reg: i2c transfer failed (-121) > atmel_mxt_ts i2c-PRP0001:00: Failed to read T44 and T5 (-121) > > This

[PATCH] staging: rtl8723bs: Variable rf_type in function rtw_cfg80211_init_wiphy() could be uninitialized

2019-09-27 Thread Yizhuo
In function rtw_cfg80211_init_wiphy(), local variable "rf_type" could be uninitialized if function rtw_hal_get_hwreg() fails to initialize it. However, this value is used in function rtw_cfg80211_init_ht_capab() and used to decide the value writing to ht_cap, which is potentially unsafe.

Re: [PATCH v3 03/10] sched/fair: remove meaningless imbalance calculation

2019-09-27 Thread Rik van Riel
On Thu, 2019-09-19 at 09:33 +0200, Vincent Guittot wrote: > clean up load_balance and remove meaningless calculation and fields > before > adding new algorithm. > > Signed-off-by: Vincent Guittot Yay. Acked-by: Rik van Riel -- All Rights Reversed. signature.asc Description: This is a

Re: [PATCH v3 02/10] sched/fair: rename sum_nr_running to sum_h_nr_running

2019-09-27 Thread Rik van Riel
On Thu, 2019-09-19 at 09:33 +0200, Vincent Guittot wrote: > Rename sum_nr_running to sum_h_nr_running because it effectively > tracks > cfs->h_nr_running so we can use sum_nr_running to track rq- > >nr_running > when needed. > > There is no functional changes. > > Signed-off-by: Vincent Guittot

Re: [PATCH v3 01/10] sched/fair: clean up asym packing

2019-09-27 Thread Rik van Riel
On Thu, 2019-09-19 at 09:33 +0200, Vincent Guittot wrote: > Clean up asym packing to follow the default load balance behavior: > - classify the group by creating a group_asym_packing field. > - calculate the imbalance in calculate_imbalance() instead of > bypassing it. > > We don't need to test

Re: [GIT PULL] nfsd changes for 5.4

2019-09-27 Thread J. Bruce Fields
On Fri, Sep 27, 2019 at 03:44:02PM -0700, Linus Torvalds wrote: > But then the actual code is just one single small commit: > > > Dave Wysochanski (1): > > SUNRPC: Track writers of the 'channel' file to improve > > cache_listeners_exist And that's also all that was in the diffstat in my

[PATCH v4 11/11] powerpc/mm/book3s64/pgtable: Uses counting method to skip serializing

2019-09-27 Thread Leonardo Bras
Skips slow part of serialize_against_pte_lookup if there is no running lockless pagetable walk. Signed-off-by: Leonardo Bras --- arch/powerpc/mm/book3s64/pgtable.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/mm/book3s64/pgtable.c

[PATCH v4 07/11] powerpc/kvm/e500: Applies counting method to monitor lockless pgtbl walks

2019-09-27 Thread Leonardo Bras
Applies the counting-based method for monitoring lockless pgtable walks on kvmppc_e500_shadow_map(). Fixes the place where local_irq_restore() is called: previously, if ptep was NULL, local_irq_restore() would never be called. Signed-off-by: Leonardo Bras --- arch/powerpc/kvm/e500_mmu_host.c |

[PATCH v4 10/11] powerpc/book3s_64: Enables counting method to monitor lockless pgtbl walk

2019-09-27 Thread Leonardo Bras
Enables count-based monitoring method for lockless pagetable walks on PowerPC book3s_64. Other architectures/platforms fallback to using generic dummy functions. Signed-off-by: Leonardo Bras --- arch/powerpc/include/asm/book3s/64/pgtable.h | 5 + 1 file changed, 5 insertions(+) diff --git

[PATCH v4 05/11] powerpc/perf: Applies counting method to monitor lockless pgtbl walks

2019-09-27 Thread Leonardo Bras
Applies the counting-based method for monitoring lockless pgtable walks on read_user_stack_slow. Signed-off-by: Leonardo Bras --- arch/powerpc/perf/callchain.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/perf/callchain.c b/arch/powerpc/perf/callchain.c

[PATCH v4 08/11] powerpc/kvm/book3s_hv: Applies counting method to monitor lockless pgtbl walks

2019-09-27 Thread Leonardo Bras
Applies the counting-based method for monitoring all book3s_hv related functions that do lockless pagetable walks. Adds comments explaining that some lockless pagetable walks don't need protection due to guest pgd not being a target of THP collapse/split, or due to being called from Realmode +

[PATCH v4 06/11] powerpc/mm/book3s64/hash: Applies counting method to monitor lockless pgtbl walks

2019-09-27 Thread Leonardo Bras
Applies the counting-based method for monitoring all hash-related functions that do lockless pagetable walks. hash_page_mm: Adds comment that explain that there is no need to local_int_disable/save given that it is only called from DataAccess interrupt, so interrupts are already disabled.

[PATCH v4 03/11] mm/gup: Applies counting method to monitor gup_pgd_range

2019-09-27 Thread Leonardo Bras
As decribed, gup_pgd_range is a lockless pagetable walk. So, in order to monitor against THP split/collapse with the couting method, it's necessary to bound it with {start,end}_lockless_pgtbl_walk. There are dummy functions, so it is not going to add any overhead on archs that don't use this

[PATCH v4 04/11] powerpc/mce_power: Applies counting method to monitor lockless pgtbl walks

2019-09-27 Thread Leonardo Bras
Applies the counting-based method for monitoring lockless pgtable walks on addr_to_pfn(). Signed-off-by: Leonardo Bras --- arch/powerpc/kernel/mce_power.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/mce_power.c

[PATCH v4 09/11] powerpc/kvm/book3s_64: Applies counting method to monitor lockless pgtbl walks

2019-09-27 Thread Leonardo Bras
Applies the counting-based method for monitoring all book3s_64-related functions that do lockless pagetable walks. Adds comments explaining that some lockless pagetable walks don't need protection due to guest pgd not being a target of THP collapse/split, or due to being called from Realmode +

[PATCH v4 02/11] asm-generic/pgtable: Adds dummy functions to monitor lockless pgtable walks

2019-09-27 Thread Leonardo Bras
There is a need to monitor lockless pagetable walks, in order to avoid doing THP splitting/collapsing during them. Some methods rely on local_irq_{save,restore}, but that can be slow on cases with a lot of cpus are used for the process. In order to speedup these cases, I propose a refcount-based

[PATCH v4 01/11] powerpc/mm: Adds counting method to monitor lockless pgtable walks

2019-09-27 Thread Leonardo Bras
It's necessary to monitor lockless pagetable walks, in order to avoid doing THP splitting/collapsing during them. Some methods rely on local_irq_{save,restore}, but that can be slow on cases with a lot of cpus are used for the process. In order to speedup some cases, I propose a refcount-based

[PATCH v4 00/11] Introduces new count-based method for monitoring lockless pagetable walks

2019-09-27 Thread Leonardo Bras
If a process (qemu) with a lot of CPUs (128) try to munmap() a large chunk of memory (496GB) mapped with THP, it takes an average of 275 seconds, which can cause a lot of problems to the load (in qemu case, the guest will lock for this time). Trying to find the source of this bug, I found out

Re: [PATCH v2 1/8] KVM: nVMX: Always write vmcs02.GUEST_CR3 during nested VM-Enter

2019-09-27 Thread Jim Mattson
On Fri, Sep 27, 2019 at 2:45 PM Sean Christopherson wrote: > > Write the desired L2 CR3 into vmcs02.GUEST_CR3 during nested VM-Enter > instead of deferring the VMWRITE until vmx_set_cr3(). If the VMWRITE > is deferred, then KVM can consume a stale vmcs02.GUEST_CR3 when it > refreshes

[PATCH 3/3] perf annotate: Improve handling of corrupted ~/.debug

2019-09-27 Thread Andi Kleen
From: Andi Kleen Sometimes ~/.debug can get corrupted and contain files that still have symbol tables, but which objdump cannot handle. Add a fallback to read the "original" file in such a case. This might be wrong too if it's different, but in many cases when profiling on the same host it will

[PATCH 2/3] perf jevents: Fix period for Intel fixed counters

2019-09-27 Thread Andi Kleen
From: Andi Kleen The Intel fixed counters use a special table to override the JSON information. During this override the period information from the JSON file got dropped, which results in inst_retired.any and similar running with frequency mode instead of a period. Just specify the expected

[PATCH 1/3] perf script brstackinsn: Fix recovery from LBR/binary mismatch

2019-09-27 Thread Andi Kleen
From: Andi Kleen When the LBR data and the instructions in a binary do not match the loop printing instructions could get confused and print a long stream of bogus instructions. The problem was that if the instruction decoder cannot decode an instruction it ilen wasn't initialized, so the loop

RE: [PATCH] namespace: fix namespace.pl script to support relative paths

2019-09-27 Thread Keller, Jacob E
> -Original Message- > From: Randy Dunlap [mailto:rdun...@infradead.org] > Sent: Friday, September 27, 2019 4:12 PM > To: Keller, Jacob E > Cc: intel-wired-...@lists.osuosl.org; linux-kernel@vger.kernel.org; > linux-kbuild kbu...@vger.kernel.org>; Masahiro Yamada > Subject: Re: [PATCH]

Re: [PATCH v3 00/11] Introduces new count-based method for monitoring lockless pagetable walks

2019-09-27 Thread Leonardo Bras
On Fri, 2019-09-27 at 11:46 -0300, Leonardo Bras wrote: > I am not sure if it would be ok to use irq_{save,restore} in real mode, > I will do some more reading of the docs before addressing this. It looks like it's unsafe to merge irq_{save,restore} in {start,end}_lockless_pgtbl_walk(), due to a

RE: [PATCH] namespace: fix namespace.pl script to support relative paths

2019-09-27 Thread Keller, Jacob E
> -Original Message- > From: Randy Dunlap [mailto:rdun...@infradead.org] > Sent: Friday, September 27, 2019 4:12 PM > To: Keller, Jacob E > Cc: intel-wired-...@lists.osuosl.org; linux-kernel@vger.kernel.org; > linux-kbuild kbu...@vger.kernel.org>; Masahiro Yamada > Subject: Re: [PATCH]

Re: [PATCH] PCI: mobiveil: Fix csr_read/write build issue

2019-09-27 Thread Christoph Hellwig
On Thu, Sep 26, 2019 at 10:29:34AM +0100, Andrew Murray wrote: > Though I'd be just as happy if the csr_[read,write][l,] functions were > renamed to mobiveil_csr_[read,write][l,]. Please do that instead, using such generic names as csr_* in a driver is a bad idea, with or without a __ prefix.

[PATCH v2] riscv: Fix memblock reservation for device tree blob

2019-09-27 Thread Albert Ou
This fixes an error with how the FDT blob is reserved in memblock. An incorrect physical address calculation exposed the FDT header to unintended corruption, which typically manifested with of_fdt_raw_init() faulting during late boot after fdt_totalsize() returned a wrong value. Systems with

Re: [PATCH] namespace: fix namespace.pl script to support relative paths

2019-09-27 Thread Randy Dunlap
re: https://lore.kernel.org/lkml/20190129204319.15238-1-jacob.e.kel...@intel.com/ Did anything happen with this patch? Please send it to linux-kbu...@vger.kernel.org and Cc: Masahiro Yamada You can also add: Acked-by: Randy Dunlap Tested-by: Randy Dunlap I was just about to fix this

[PATCH] virt: vbox: fix memory leak in hgcm_call_preprocess_linaddr

2019-09-27 Thread Navid Emamdoost
In hgcm_call_preprocess_linaddr memory is allocated for bounce_buf but is not released if copy_form_user fails. The release is added. Fixes: 579db9d45cb4 ("virt: Add vboxguest VMMDEV communication code") Signed-off-by: Navid Emamdoost --- drivers/virt/vboxguest/vboxguest_utils.c | 4 +++- 1

Re: [GIT PULL] 9p updates for 5.4

2019-09-27 Thread pr-tracker-bot
The pull request you sent on Fri, 27 Sep 2019 16:27:26 +0200: > https://github.com/martinetd/linux tags/9p-for-5.4 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/9977b1a71488742606376c09e19e0074e4403cdf Thank you! -- Deet-doot-dot, I am a bot.

Re: [GIT PULL] add virtio-fs

2019-09-27 Thread pr-tracker-bot
The pull request you sent on Thu, 26 Sep 2019 10:43:40 +0200: > git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git > tags/virtio-fs-5.4 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/8f744bdee4fefb17fac052c7418b830de2b59ac8 Thank you! --

Re: [PATCH v5 0/7] hugetlb_cgroup: Add hugetlb_cgroup reservation limits

2019-09-27 Thread Mike Kravetz
On 9/27/19 3:51 PM, Mina Almasry wrote: > On Fri, Sep 27, 2019 at 2:59 PM Mike Kravetz wrote: >> >> On 9/26/19 5:55 PM, Mina Almasry wrote: >>> Provided we keep the existing controller untouched, should the new >>> controller track: >>> >>> 1. only reservations, or >>> 2. both reservations and

Re: [PATCH v2 0/3] Add support for SBI v0.2

2019-09-27 Thread Atish Patra
On Fri, 2019-09-27 at 15:19 -0700, Christoph Hellwig wrote: > On Thu, Sep 26, 2019 at 05:09:12PM -0700, Atish Patra wrote: > > The Supervisor Binary Interface(SBI) specification[1] now defines a > > base extension that provides extendability to add future extensions > > while maintaining backward

Re: [PATCH 2/4] rsicv: avoid sending a SIGTRAP to a user thread trapped in WARN()

2019-09-27 Thread Christoph Hellwig
Oh and s/rsicv/riscv/ in the subject, please.

Re: [PATCH] riscv: move sifive_l2_cache.c to drivers/soc

2019-09-27 Thread Christoph Hellwig
On Thu, Aug 22, 2019 at 06:26:35AM -0300, Mauro Carvalho Chehab wrote: > Em Mon, 19 Aug 2019 08:26:19 +0200 > Christoph Hellwig escreveu: > > > On Mon, Aug 19, 2019 at 08:09:04AM +0200, Borislav Petkov wrote: > > > On Sun, Aug 18, 2019 at 10:29:35AM +0200, Christoph Hellwig wrote: > > > > The

Re: [PATCH v5 0/7] hugetlb_cgroup: Add hugetlb_cgroup reservation limits

2019-09-27 Thread Mina Almasry
On Fri, Sep 27, 2019 at 2:59 PM Mike Kravetz wrote: > > On 9/26/19 5:55 PM, Mina Almasry wrote: > > Provided we keep the existing controller untouched, should the new > > controller track: > > > > 1. only reservations, or > > 2. both reservations and allocations for which no reservations exist >

Re: [PATCH 4/4] riscv: remove the switch statement in do_trap_break()

2019-09-27 Thread Christoph Hellwig
On Mon, Sep 23, 2019 at 08:45:17AM +0800, Vincent Chen wrote: > To make the code more straightforward, replacing the switch statement > with if statement. > > Suggested-by: Paul Walmsley > Signed-off-by: Vincent Chen > --- > arch/riscv/kernel/traps.c | 23 --- > 1 file

Re: [GIT PULL] nfsd changes for 5.4

2019-09-27 Thread Linus Torvalds
On Fri, Sep 27, 2019 at 1:08 PM J. Bruce Fields wrote: > > Please pull nfsd changes from: > > git://linux-nfs.org/~bfields/linux.git tags/nfsd-5.4 Hmm. I styarted to pull, but then realized that the description doesn't match the content at all. You say: > Highlights: > > - add a new

Re: [PATCH 3/4] riscv: Correct the handling of unexpected ebreak in do_trap_break()

2019-09-27 Thread Christoph Hellwig
Looks ok: Reviewed-by: Christoph Hellwig

Re: [PATCH] compiler: enable CONFIG_OPTIMIZE_INLINING forcibly

2019-09-27 Thread Linus Torvalds
On Fri, Sep 27, 2019 at 3:08 PM Nick Desaulniers wrote: > > So get_user() was passed a bad value/pointer from userspace? Do you > know which of the tree calls to get_user() from sock_setsockopt() is > failing? (It's not immediately clear to me how this patch is at > fault, vs there just being a

[PATCH] net/mlx5: fix memory leak in mlx5_fw_fatal_reporter_dump

2019-09-27 Thread Navid Emamdoost
In mlx5_fw_fatal_reporter_dump if mlx5_crdump_collect fails the allocated memory for cr_data must be released otherwise there will be memory leak. To fix this, this commit changes the return instruction into goto error handling. Fixes: 9b1f29823605 ("net/mlx5: Add support for FW fatal reporter

Re: [PATCH v5 4/7] hugetlb: disable region_add file_region coalescing

2019-09-27 Thread Mina Almasry
On Fri, Sep 27, 2019 at 2:44 PM Mike Kravetz wrote: > > On 9/19/19 3:24 PM, Mina Almasry wrote: > > A follow up patch in this series adds hugetlb cgroup uncharge info the > > file_region entries in resv->regions. The cgroup uncharge info may > > differ for different regions, so they can no longer

Re: [PATCH 2/4] rsicv: avoid sending a SIGTRAP to a user thread trapped in WARN()

2019-09-27 Thread Christoph Hellwig
On Mon, Sep 23, 2019 at 08:45:15AM +0800, Vincent Chen wrote: > On RISC-V, when the kernel runs code on behalf of a user thread, and the > kernel executes a WARN() or WARN_ON(), the user thread will be sent > a bogus SIGTRAP. Fix the RISC-V kernel code to not send a SIGTRAP when > a

Re: [alsa-devel] [PATCH v2] ASoC: Intel: Skylake: prevent memory leak in snd_skl_parse_uuids

2019-09-27 Thread Pierre-Louis Bossart
On 9/27/19 3:39 PM, Andy Shevchenko wrote: On Fri, Sep 27, 2019 at 7:39 PM Pierre-Louis Bossart wrote: The problem with solution #1 is freeing orphaned pointer. It will work, but it's simple is not okay from object life time prospective. ?? I don't get your point at all Andy. Two allocations

Re: [PATCH 1/4] riscv: avoid kernel hangs when trapped in BUG()

2019-09-27 Thread Christoph Hellwig
On Mon, Sep 23, 2019 at 08:45:14AM +0800, Vincent Chen wrote: > When the CONFIG_GENERIC_BUG is disabled by disabling CONFIG_BUG, if a > kernel thread is trapped by BUG(), the whole system will be in the > loop that infinitely handles the ebreak exception instead of entering the > die function. To

Re: [PATCH] RISC-V: Clear load reservations while restoring hart contexts

2019-09-27 Thread Christoph Hellwig
On Tue, Sep 24, 2019 at 05:15:56PM -0700, Palmer Dabbelt wrote: > This is almost entirely a comment. The bug is unlikely to manifest on > existing hardware because there is a timeout on load reservations, but > manifests on QEMU because there is no timeout. Given how many different lines of

Re: [GIT PULL] RISC-V additional updates for v5.4-rc1

2019-09-27 Thread Christoph Hellwig
On Fri, Sep 27, 2019 at 11:25:13AM -0700, Paul Walmsley wrote: > Atish Patra (1): > RISC-V: Export kernel symbols for kvm None of these have any current users, they should go in with the kvm series once the virtualization spec has been finalized.

Re: [PATCH v2 3/3] RISC-V: Move SBI related macros under uapi.

2019-09-27 Thread Christoph Hellwig
On Thu, Sep 26, 2019 at 05:09:15PM -0700, Atish Patra wrote: > All SBI related macros can be reused by KVM RISC-V and userspace tools > such as kvmtool, qemu-kvm. SBI calls can also be emulated by userspace > if required. Any future vendor extensions can leverage this to emulate > the specific

Re: [PATCH v2 1/3] RISC-V: Mark existing SBI as 0.1 SBI.

2019-09-27 Thread Christoph Hellwig
On Thu, Sep 26, 2019 at 05:09:13PM -0700, Atish Patra wrote: > -#define SBI_CALL(which, arg0, arg1, arg2, arg3) ({ \ > +#define SBI_CALL(which, arg0, arg1, arg2, arg3) ({ \ Spurious whitespace change.

Re: [PATCH v2 0/3] Add support for SBI v0.2

2019-09-27 Thread Christoph Hellwig
On Thu, Sep 26, 2019 at 05:09:12PM -0700, Atish Patra wrote: > The Supervisor Binary Interface(SBI) specification[1] now defines a > base extension that provides extendability to add future extensions > while maintaining backward compatibility with previous versions. > The new version is defined

Re: [PATCH] mm/page_alloc: fix a crash in free_pages_prepare()

2019-09-27 Thread Alexander Duyck
On Fri, Sep 27, 2019 at 2:59 PM Andrew Morton wrote: > > On Fri, 27 Sep 2019 17:28:06 -0400 Qian Cai wrote: > > > > > > > So I think you've moved the arch_free_page() to be after the final > > > thing which can access page contents, yes? If so, we should have a > > > comment in

Re: [PATCH v3 2/5] dt-bindings: mfd: Document the Xylon LogiCVC multi-function device

2019-09-27 Thread Rob Herring
On Fri, Sep 27, 2019 at 12:04:04PM +0200, Paul Kocialkowski wrote: > The LogiCVC is a display engine which also exposes GPIO functionality. > For this reason, it is described as a multi-function device that is expected > to provide register access to its children nodes for gpio and display. > >

Re: [PATCH v3 4/5] dt-bindings: gpio: Document the Xylon LogiCVC GPIO controller

2019-09-27 Thread Rob Herring
On Fri, 27 Sep 2019 12:04:06 +0200, Paul Kocialkowski wrote: > The Xylon LogiCVC display controller exports some GPIOs, which are > exposed as a separate entity. > > Signed-off-by: Paul Kocialkowski > --- > .../bindings/gpio/xylon,logicvc-gpio.yaml | 69 +++ > 1 file

Re: [PATCH v6 5/5] pinctrl: mediatek: Add support for pin configuration dump via debugfs.

2019-09-27 Thread Sean Wang
Hi, On Thu, Sep 26, 2019 at 10:02 PM Light Hsieh wrote: > > Add support for pin configuration dump via catting > /sys/kernel/debug/pinctrl/$platform_dependent_path/pinconf-pins. > pinctrl framework had already support such dump. This patch implement the > operation function pointer to fullfill

Re: [PATCH] compiler: enable CONFIG_OPTIMIZE_INLINING forcibly

2019-09-27 Thread Nick Desaulniers
On Fri, Sep 27, 2019 at 3:43 AM Nicolas Saenz Julienne wrote: > > On Fri, 2019-08-30 at 12:43 +0900, Masahiro Yamada wrote: > > Commit 9012d011660e ("compiler: allow all arches to enable > > CONFIG_OPTIMIZE_INLINING") allowed all architectures to enable > > this option. A couple of build errors

Re: [PATCH v5 0/7] hugetlb_cgroup: Add hugetlb_cgroup reservation limits

2019-09-27 Thread Mike Kravetz
On 9/26/19 5:55 PM, Mina Almasry wrote: > Provided we keep the existing controller untouched, should the new > controller track: > > 1. only reservations, or > 2. both reservations and allocations for which no reservations exist > (such as the MAP_NORESERVE case)? > > I like the 'both' approach.

Re: [PATCH] mm/page_alloc: fix a crash in free_pages_prepare()

2019-09-27 Thread Andrew Morton
On Fri, 27 Sep 2019 17:28:06 -0400 Qian Cai wrote: > > > > So I think you've moved the arch_free_page() to be after the final > > thing which can access page contents, yes? If so, we should have a > > comment in free_pages_prepare() to attmept to prevent this problem from > > reoccurring as

Re: [PATCH v3] platform/x86: dell-laptop: disable kbd backlight on Inspiron 10xx

2019-09-27 Thread Pali Rohár
On Friday 27 September 2019 23:19:03 Pacien TRAN-GIRARD wrote: > This patch adds a quirk disabling keyboard backlight support for the > Dell Inspiron 1012 and 1018. > > Those models wrongly report supporting keyboard backlight control > features (through SMBIOS tokens) even though they're not

Re: Do we need to correct barriering in circular-buffers.rst?

2019-09-27 Thread Nick Desaulniers
On Fri, Sep 27, 2019 at 1:43 PM Nick Desaulniers wrote: > > On Fri, Sep 27, 2019 at 5:49 AM Peter Zijlstra wrote: > > Barring LTO the above works for perf because of inter-translation-unit > > function calls, which imply a compiler barrier. > > > > Now, when the compiler inlines, it looses that

Re: [PATCH v8 17/17] Documentation/x86/64: Add documentation for GS/FS addressing mode

2019-09-27 Thread Bae, Chang Seok
> On Sep 27, 2019, at 14:25, Randy Dunlap wrote: > > Hi, > Some doc comments/fixes below... > > On 9/12/19 1:06 PM, Chang S. Bae wrote: >> From: Thomas Gleixner >> [snip] >> +There exist two mechanisms to read and write the FS/FS base address: > >

Re: [PATCH 1/2] Modify cpupower to schedule itself on cores it is reading MSRs from

2019-09-27 Thread Thomas Renninger
On Friday, September 27, 2019 6:07:56 PM CEST Natarajan, Janakarajan wrote: > On 9/18/2019 11:34 AM, Natarajan, Janakarajan wrote: > > This is advantageous because an IPI is not generated when a read_msr() is > > executed on the local logical CPU thereby reducing the chance of having > > APERF

[PATCH v2 2/8] KVM: VMX: Skip GUEST_CR3 VMREAD+VMWRITE if the VMCS is up-to-date

2019-09-27 Thread Sean Christopherson
Skip the VMWRITE to update GUEST_CR3 if CR3 is not available, i.e. has not been read from the VMCS since the last VM-Enter. If vcpu->arch.cr3 is stale, kvm_read_cr3(vcpu) will refresh vcpu->arch.cr3 from the VMCS, meaning KVM will do a VMREAD and then VMWRITE the value it just pulled from the

[PATCH v2 4/8] KVM: VMX: Optimize vmx_set_rflags() for unrestricted guest

2019-09-27 Thread Sean Christopherson
Rework vmx_set_rflags() to avoid the extra code need to handle emulation of real mode and invalid state when unrestricted guest is disabled. The primary reason for doing so is to avoid the call to vmx_get_rflags(), which will incur a VMREAD when RFLAGS is not already available. When running

[PATCH v2 3/8] KVM: VMX: Consolidate to_vmx() usage in RFLAGS accessors

2019-09-27 Thread Sean Christopherson
Capture struct vcpu_vmx in a local variable to improve the readability of vmx_{g,s}et_rflags(). No functional change intended. Signed-off-by: Sean Christopherson --- arch/x86/kvm/vmx/vmx.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git

[PATCH v2 0/8] KVM: x86: nVMX GUEST_CR3 bug fix, and then some...

2019-09-27 Thread Sean Christopherson
*sigh* v2 was shaping up to be a trivial update, until I started working on Vitaly's suggestion to add a helper to test for register availability. The primary purpose of this series is to fix a CR3 corruption in L2 reported by Reto Buerki when running with HLT interception disabled in L1. On a

[PATCH v2 8/8] KVM: x86: Fold decache_cr3() into cache_reg()

2019-09-27 Thread Sean Christopherson
Handle caching CR3 (from VMX's VMCS) into struct kvm_vcpu via the common cache_reg() callback and drop the dedicated decache_cr3(). The name decache_cr3() is somewhat confusing as the caching behavior of CR3 follows that of GPRs, RFLAGS and PDPTRs, (handled via cache_reg()), and has nothing in

[PATCH v2 1/8] KVM: nVMX: Always write vmcs02.GUEST_CR3 during nested VM-Enter

2019-09-27 Thread Sean Christopherson
Write the desired L2 CR3 into vmcs02.GUEST_CR3 during nested VM-Enter instead of deferring the VMWRITE until vmx_set_cr3(). If the VMWRITE is deferred, then KVM can consume a stale vmcs02.GUEST_CR3 when it refreshes vmcs12->guest_cr3 during nested_vmx_vmexit() if the emulated VM-Exit occurs

[PATCH v2 7/8] KVM: x86: Add helpers to test/mark reg availability and dirtiness

2019-09-27 Thread Sean Christopherson
Add helpers to prettify code that tests and/or marks whether or not a register is available and/or dirty. Suggested-by: Vitaly Kuznetsov Signed-off-by: Sean Christopherson --- arch/x86/kvm/kvm_cache_regs.h | 45 +-- arch/x86/kvm/vmx/nested.c | 4 ++--

[PATCH v2 6/8] KVM: x86: Fold 'enum kvm_ex_reg' definitions into 'enum kvm_reg'

2019-09-27 Thread Sean Christopherson
Now that indexing into arch.regs is either protected by WARN_ON_ONCE or done with hardcoded enums, combine all definitions for registers that are tracked by regs_avail and regs_dirty into 'enum kvm_reg'. Having a single enum type will simplify additional cleanup related to regs_avail and

[PATCH v2 5/8] KVM: x86: Add WARNs to detect out-of-bounds register indices

2019-09-27 Thread Sean Christopherson
Add WARN_ON_ONCE() checks in kvm_register_{read,write}() to detect reg values that would cause KVM to overflow vcpu->arch.regs. Change the reg param to an 'int' to make it clear that the reg index is unverified. Open code the RIP and RSP accessors so as to avoid pointless overhead of

Re: [PATCH v2] nvme-pci: Save PCI state before putting drive into deepest state

2019-09-27 Thread Christoph Hellwig
Looks sensible to me: Reviewed-by: Christoph Hellwig

Re: [PATCH v6 4/5] pinctrl: mediatek: Backward compatible to previous Mediatek's bias-pull usage

2019-09-27 Thread Sean Wang
Hi, On Thu, Sep 26, 2019 at 10:02 PM Light Hsieh wrote: > > Refine mtk_pinconf_set()/mtk_pinconf_get() for backward compatibility to > previous Mediatek's bias-pull usage. MediaTek > In PINCTRL_MTK that use pinctrl-mtk-common.c, bias-pull setting for pins > with 2 pull resistors can be

[PATCH] staging: rtl8188eu: fix null dereference when kzalloc fails

2019-09-27 Thread Connor Kuehl
If kzalloc() returns NULL, the error path doesn't stop the flow of control from entering rtw_hal_read_chip_version() which dereferences the null pointer. Fix this by adding a 'goto' to the error path to more gracefully handle the issue and avoid proceeding with initialization steps that we're no

Re: [PATCH v5 4/7] hugetlb: disable region_add file_region coalescing

2019-09-27 Thread Mike Kravetz
On 9/19/19 3:24 PM, Mina Almasry wrote: > A follow up patch in this series adds hugetlb cgroup uncharge info the > file_region entries in resv->regions. The cgroup uncharge info may > differ for different regions, so they can no longer be coalesced at > region_add time. So, disable region

[PATCH v2] perf tools: avoid sample_reg_masks being const + weak

2019-09-27 Thread Ian Rogers
Being const + weak breaks with some compilers that constant-propagate from the weak symbol. This behavior is outside of the specification, but in LLVM is chosen to match GCC's behavior. LLVM's implementation was set in this patch:

Re: [PATCH v3] nfp: abm: fix memory leak in nfp_abm_u32_knode_replace

2019-09-27 Thread Jakub Kicinski
On Fri, 27 Sep 2019 14:12:42 +0200, Markus Elfring wrote: > > Updated other gotos to have correct errno returned, too. > > How do you think about to add a jump target here? > > > > +++ b/drivers/net/ethernet/netronome/nfp/abm/cls.c > > @@ -176,8 +176,10 @@ nfp_abm_u32_knode_replace(struct

  1   2   3   4   5   6   7   >