Re: io_uring: BUG: kernel NULL pointer dereference

2020-05-25 Thread Stefano Garzarella
On Mon, May 25, 2020 at 08:10:27AM -0600, Jens Axboe wrote: > On 5/25/20 7:45 AM, Stefano Garzarella wrote: > > On Mon, May 25, 2020 at 12:30:51PM +0200, Stefano Garzarella wrote: > >> Hi Jens, > >> using fio and io_uring engine with SQPOLL and IOPOLL enabled, I had the > >> following issue that

Re: [PATCH] x86/mm: Fix boot with some memory above MAXMEM

2020-05-25 Thread Mike Rapoport
On Mon, May 25, 2020 at 07:49:02AM +0300, Kirill A. Shutemov wrote: > On Mon, May 11, 2020 at 10:17:21PM +0300, Kirill A. Shutemov wrote: > > A 5-level paging capable machine can have memory above 46-bit in the > > physical address space. This memory is only addressable in the 5-level > > paging

Re: [PATCH] proc.5: add "wf" to VmFlags in /proc/[pid]/smaps

2020-05-25 Thread Kirill A. Shutemov
On Mon, May 25, 2020 at 03:50:38PM +0200, Michael Kerrisk (man-pages) wrote: > On 5/22/20 1:13 AM, Ian Rogers wrote: > > On Thu, May 21, 2020 at 3:25 PM Ian Rogers wrote: > >> > >> This patch documents a flag added in the following kernel commit: > >> > >> commit

Re: [RFC 02/16] x86/kvm: Introduce KVM memory protection feature

2020-05-25 Thread Vitaly Kuznetsov
"Kirill A. Shutemov" writes: > Provide basic helpers, KVM_FEATURE and a hypercall. > > Host side doesn't provide the feature yet, so it is a dead code for now. > > Signed-off-by: Kirill A. Shutemov > --- > arch/x86/include/asm/kvm_para.h | 5 + > arch/x86/include/uapi/asm/kvm_para.h

Re: [PATCH] spi: mux: repair mux usage

2020-05-25 Thread Mark Brown
On Mon, 25 May 2020 12:43:52 +0200, Peter Rosin wrote: > It is not valid to cache/short out selection of the mux. > > mux_control_select() only locks the mux until mux_control_deselect() > is called. mux_control_deselect() may put the mux in some low power > state or some other user of the mux

Re: [PATCH] mm: dump_page: add debugfs file for dumping page state by pfn

2020-05-25 Thread Kirill A. Shutemov
On Mon, May 25, 2020 at 05:19:11PM +0300, Konstantin Khlebnikov wrote: > Tool 'page-types' could list pages mapped by process or file cache pages, > but it shows only limited amount of state exported via procfs. > > Let's employ existing helper dump_page() to reach remaining information: >

Re: Another approach of UFSHPB

2020-05-25 Thread Bart Van Assche
On 2020-05-24 22:40, Daejun Park wrote: > The HPB driver is close to the UFS core function, but it is not essential > for operating UFS device. With reference to this article > (https://lwn.net/Articles/645810/), we implemented extended UFS-feature > as bus model. Because the HPB driver consumes

Re: [PATCH] ASoC: fsl_asrc: Fix -Wmissing-prototypes warning

2020-05-25 Thread Mark Brown
On Mon, 25 May 2020 17:03:32 +0800, Shengjiu Wang wrote: > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 > > sound/soc/fsl/fsl_asrc.c:557:18: warning: no previous prototype for function > 'fsl_asrc_get_dma_channel' [-Wmissing-prototypes] > struct dma_chan

Re: [PATCH] ASoC: fsl: imx-audmix: Fix unused assignment to variable 'ret'

2020-05-25 Thread Mark Brown
On Wed, 13 May 2020 19:14:08 +0800, Tang Bin wrote: > Omit unused initialized value, because 'ret' will be assigined > by the function snd_soc_component_read(). Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next Thanks! [1/1] ASoC: fsl: imx-audmix: Fix

Re: [PATCH] ASoC: fsl_asrc: Merge suspend/resume function to runtime_suspend/resume

2020-05-25 Thread Mark Brown
On Fri, 22 May 2020 17:57:24 +0800, Shengjiu Wang wrote: > With dedicated power domain for asrc, power can be disabled after > probe and pm runtime suspend, then the value of all registers need to > be restored in pm runtime resume. So we can merge suspend/resume function > to

Re: [PATCH] drm: fix setting of plane_mask in pan_display_atomic() function for linux-4.4

2020-05-25 Thread Ville Syrjälä
On Mon, May 25, 2020 at 04:34:28PM +0200, Daniel Vetter wrote: > On Sat, May 23, 2020 at 11:49:07AM +0800, chenxb_99...@126.com wrote: > > From: Xuebing Chen > > > > The provides drm_for_each_plane_mask macro and > > plane_mask is defined as bitmask of plane indices, such as > > 1< > in

[RFC PATCH 1/5] x86/hw_breakpoint: add within_area() to check data breakpoints

2020-05-25 Thread Lai Jiangshan
within_area() is added for checking if the data breakpoints overlap with cpu_entry_area, and will be used for checking if the data breakpoints overlap with GDT, IDT, or TSS in places other than cpu_entry_area next patches. Cc: Andy Lutomirski Cc: Peter Zijlstra (Intel) Cc: Thomas Gleixner Cc:

Re: Some -serious- BPF-related litmus tests

2020-05-25 Thread Boqun Feng
Hi Andrii, On Fri, May 22, 2020 at 12:38:21PM -0700, Andrii Nakryiko wrote: > On 5/22/20 10:43 AM, Paul E. McKenney wrote: > > On Fri, May 22, 2020 at 10:32:01AM -0400, Alan Stern wrote: > > > On Fri, May 22, 2020 at 11:44:07AM +0200, Peter Zijlstra wrote: > > > > On Thu, May 21, 2020 at

[RFC PATCH 4/5] x86/hw_breakpoint: Prevent data breakpoints on user_pcid_flush_mask

2020-05-25 Thread Lai Jiangshan
The percpu user_pcid_flush_mask is used for CPU entry (#DB/#NMI/#DF/#MCE -> paranoid_exit() -> RESTORE_CR3). If a data breakpoint on it, it will cause an unwanted #DB. There are some other percpu data used in CPU entry, but they are either in already-protected cpu_tss_rw or are safe to trigger

Re: [PATCH v2 5/7] connector/cn_proc: Protect send_msg() with a local lock

2020-05-25 Thread Sebastian Andrzej Siewior
On 2020-05-25 09:18:19 [+0200], Ingo Molnar wrote: > > +static DEFINE_PER_CPU(struct local_evt, local_evt) = { > > + .counts = 0, > > I don't think zero initializations need to be written out explicitly. yes. > > + .lock = INIT_LOCAL_LOCK(lock), > > +}; > > > > static inline void

Re: [PATCH glibc 1/3] glibc: Perform rseq registration at C startup and thread creation (v19)

2020-05-25 Thread Mathieu Desnoyers
- On May 20, 2020, at 7:40 AM, Florian Weimer fwei...@redhat.com wrote: > * Mathieu Desnoyers via Libc-alpha: > >> diff --git a/NEWS b/NEWS >> index 141078c319..c4e0370fc4 100644 >> --- a/NEWS >> +++ b/NEWS >> @@ -23,6 +23,16 @@ Major new features: >>toolchains. It is recommended to use

[RFC PATCH 5/5] x86/hw_breakpoint: Prevent data breakpoints on debug_idt_table

2020-05-25 Thread Lai Jiangshan
A data breakpoint on the IDT is terrifying and should be avoided. The IDT on CPU entry area is already protected. The debug IDT should be also protected, although it is seldom used and only used for short time. Cc: Andy Lutomirski Cc: Peter Zijlstra (Intel) Cc: Thomas Gleixner Cc:

Re: [PATCH v11 33/56] Input: atmel_mxt_ts - delay enabling IRQ when not using regulators

2020-05-25 Thread Wang, Jiada
Hello Dmitry On 2020/05/17 22:26, Dmitry Osipenko wrote: 17.05.2020 16:08, Dmitry Osipenko пишет: 17.05.2020 06:32, Wang, Jiada пишет: Hello Dmitry On 2020/05/14 13:53, Dmitry Osipenko wrote: 13.05.2020 08:07, Wang, Jiada пишет: Hello Dmitry On 2020/05/12 8:13, Dmitry Osipenko wrote:

[RFC PATCH 2/5] x86/hw_breakpoint: Prevent data breakpoints on direct GDT

2020-05-25 Thread Lai Jiangshan
A data breakpoint on the GDT is terrifying and should be avoided. The GDT on CPU entry area is already protected. The direct GDT should be also protected, although it is seldom used and only used for short time. Cc: Andy Lutomirski Cc: Peter Zijlstra (Intel) Cc: Thomas Gleixner Cc:

[RFC PATCH 3/5] x86/hw_breakpoint: Prevent data breakpoints on per_cpu cpu_tss_rw

2020-05-25 Thread Lai Jiangshan
cpu_tss_rw is not directly referenced by hardware, but cpu_tss_rw is also used in CPU entry code, especially when #DB shifts its stacks. If a data breakpoint is on the cpu_tss_rw.x86_tss.ist[IST_INDEX_DB], it will cause recursive #DB (and then #DF soon for #DB is generated after the access,

[RFC PATCH 0/5] x86/hw_breakpoint: protects more cpu entry data

2020-05-25 Thread Lai Jiangshan
Hello The patchset is based on (tag: entry-v9-the-rest, tglx-devel/x86/entry). And it is complement of 3ea11ac991d ("x86/hw_breakpoint: Prevent data breakpoints on cpu_entry_area"). After reading the code, we can see that more data needs to be protected against hw_breakpoint, otherwise it may

Re: [PATCH v3 07/19] mm: memcg/slab: allocate obj_cgroups for non-root slab pages

2020-05-25 Thread Vlastimil Babka
On 4/22/20 10:46 PM, Roman Gushchin wrote: > --- a/mm/slab.c > +++ b/mm/slab.c > @@ -1370,7 +1370,8 @@ static struct page *kmem_getpages(struct kmem_cache > *cachep, gfp_t flags, > return NULL; > } > > - if (charge_slab_page(page, flags, cachep->gfporder, cachep)) { > +

Re: [RFC 00/16] KVM protected memory extension

2020-05-25 Thread Kirill A. Shutemov
On Mon, May 25, 2020 at 04:47:18PM +0300, Liran Alon wrote: > > On 22/05/2020 15:51, Kirill A. Shutemov wrote: > > == Background / Problem == > > > > There are a number of hardware features (MKTME, SEV) which protect guest > > memory from some unauthorized host access. The patchset proposes a

Re: [PATCH v3 3/3] vfio-pci: Invalidate mmaps and block MMIO access on disabled memory

2020-05-25 Thread Jason Gunthorpe
On Mon, May 25, 2020 at 10:28:06AM -0400, Peter Xu wrote: > On Mon, May 25, 2020 at 09:26:07AM -0300, Jason Gunthorpe wrote: > > On Sat, May 23, 2020 at 07:52:57PM -0400, Peter Xu wrote: > > > > > For what I understand now, IMHO we should still need all those handlings > > > of > > >

Re: [PATCH] bitops: simplify get_count_order_long()

2020-05-25 Thread Wei Yang
On Mon, May 25, 2020 at 12:14:58PM +0300, Andy Shevchenko wrote: >On Sun, May 24, 2020 at 12:35:51PM +, Wei Yang wrote: >> These two cases could be unified into one. > >Care to provide a test case which supports your change? > Hmm.. where should I put the test? tools/testing/selftests/ ? >>

[PATCH v2 07/10] KVM: x86: announce KVM_FEATURE_ASYNC_PF_INT

2020-05-25 Thread Vitaly Kuznetsov
Introduce new capability to indicate that KVM supports interrupt based delivery of 'page ready' APF events. This includes support for both MSR_KVM_ASYNC_PF_INT and MSR_KVM_ASYNC_PF_ACK. Signed-off-by: Vitaly Kuznetsov --- Documentation/virt/kvm/cpuid.rst | 6 ++

Re: [PATCH] MAINTAINERS: adjust entry in XDP SOCKETS to actual file name

2020-05-25 Thread Björn Töpel
gent patch. applies to next-20200525 on top of the commits mentioned above Thanks Lukas! Daniel/Alexei, this should go to the bpf-next tree. Thanks! Björn MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 7a442b48f24b.

[PATCH v2 10/10] KVM: x86: deprecate KVM_ASYNC_PF_SEND_ALWAYS

2020-05-25 Thread Vitaly Kuznetsov
Concerns were expressed around APF events delivery when CPU is not in user mode (KVM_ASYNC_PF_SEND_ALWAYS), e.g. https://lore.kernel.org/kvm/ed71d0967113a35f670a9625a058b8e6e0b2f104.1583547991.git.l...@kernel.org/ 'Page ready' events are already free from '#PF abuse' but 'page not ready'

[PATCH v2 02/10] KVM: x86: extend struct kvm_vcpu_pv_apf_data with token info

2020-05-25 Thread Vitaly Kuznetsov
Currently, APF mechanism relies on the #PF abuse where the token is being passed through CR2. If we switch to using interrupts to deliver page-ready notifications we need a different way to pass the data. Extent the existing 'struct kvm_vcpu_pv_apf_data' with token information for page-ready

[PATCH v2 01/10] Revert "KVM: async_pf: Fix #DF due to inject "Page not Present" and "Page Ready" exceptions simultaneously"

2020-05-25 Thread Vitaly Kuznetsov
Commit 9a6e7c39810e (""KVM: async_pf: Fix #DF due to inject "Page not Present" and "Page Ready" exceptions simultaneously") added a protection against 'page ready' notification coming before 'page not present' is delivered. This situation seems to be impossible since commit 2a266f23550b ("KVM MMU:

[PATCH v2 00/10] KVM: x86: Interrupt-based mechanism for async_pf 'page present' notifications

2020-05-25 Thread Vitaly Kuznetsov
Concerns were expressed around (ab)using #PF for KVM's async_pf mechanism, it seems that re-using #PF exception for a PV mechanism wasn't a great idea after all. The Grand Plan is to switch to using e.g. #VE for 'page not present' events and normal APIC interrupts for 'page ready' events. This

[PATCH v2 06/10] KVM: x86: acknowledgment mechanism for async pf page ready notifications

2020-05-25 Thread Vitaly Kuznetsov
If two page ready notifications happen back to back the second one is not delivered and the only mechanism we currently have is kvm_check_async_pf_completion() check in vcpu_run() loop. The check will only be performed with the next vmexit when it happens and in some cases it may take a while.

[PATCH v2 04/10] KVM: introduce kvm_read_guest_offset_cached()

2020-05-25 Thread Vitaly Kuznetsov
We already have kvm_write_guest_offset_cached(), introduce read analogue. Signed-off-by: Vitaly Kuznetsov --- include/linux/kvm_host.h | 3 +++ virt/kvm/kvm_main.c | 19 ++- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/include/linux/kvm_host.h

[PATCH v2 05/10] KVM: x86: interrupt based APF 'page ready' event delivery

2020-05-25 Thread Vitaly Kuznetsov
Concerns were expressed around APF delivery via synthetic #PF exception as in some cases such delivery may collide with real page fault. For 'page ready' notifications we can easily switch to using an interrupt instead. Introduce new MSR_KVM_ASYNC_PF_INT mechanism and deprecate the legacy one.

[PATCH v2 03/10] KVM: rename kvm_arch_can_inject_async_page_present() to kvm_arch_can_dequeue_async_page_present()

2020-05-25 Thread Vitaly Kuznetsov
An innocent reader of the following x86 KVM code: bool kvm_arch_can_inject_async_page_present(struct kvm_vcpu *vcpu) { if (!(vcpu->arch.apf.msr_val & KVM_ASYNC_PF_ENABLED)) return true; ... may get very confused: if APF mechanism is not enabled, why do we report that we

[PATCH v2 08/10] KVM: x86: Switch KVM guest to using interrupts for page ready APF delivery

2020-05-25 Thread Vitaly Kuznetsov
KVM now supports using interrupt for 'page ready' APF event delivery and legacy mechanism was deprecated. Switch KVM guests to the new one. Signed-off-by: Vitaly Kuznetsov --- arch/x86/entry/entry_32.S | 5 arch/x86/entry/entry_64.S | 5

[PATCH v2 09/10] KVM: x86: drop KVM_PV_REASON_PAGE_READY case from kvm_handle_page_fault()

2020-05-25 Thread Vitaly Kuznetsov
KVM guest code in Linux enables APF only when KVM_FEATURE_ASYNC_PF_INT is supported, this means we will never see KVM_PV_REASON_PAGE_READY when handling page fault vmexit in KVM. While on it, make sure we only follow genuine page fault path when APF reason is zero. If we happen to see something

Re: [PATCH 1/3] dt-bindings: pinctrl: Add bindings for mscc,ocelot-sgpio

2020-05-25 Thread Lars Povlsen
Linus Walleij writes: > On Mon, May 18, 2020 at 10:50 PM Lars Povlsen > wrote: >> Linus Walleij writes: >> >> > On Wed, May 13, 2020 at 4:11 PM Lars Povlsen >> > wrote: >> > >> >> This adds DT bindings for the Microsemi SGPIO controller, bindings >> >> mscc,ocelot-sgpio and mscc,luton-sgpio.

Re: Endless soft-lockups for compiling workload since next-20200519

2020-05-25 Thread Peter Zijlstra
On Mon, May 25, 2020 at 04:05:49PM +0200, Frederic Weisbecker wrote: > On Mon, May 25, 2020 at 03:21:05PM +0200, Peter Zijlstra wrote: > > @@ -2320,7 +2304,7 @@ static void ttwu_queue_remote(struct task_struct *p, > > int cpu, int wake_flags) > > > > if (llist_add(>wake_entry, >wake_list))

Re: [PATCH] riscv: Remove unnecessary path for syscall_trace

2020-05-25 Thread Tycho Andersen
On Mon, May 25, 2020 at 02:18:26PM +, guo...@kernel.org wrote: > From: Guo Ren > > Obviously, there is no need to recover a0-a7 in reject path. > > Previous modification is from commit af33d243 by Tycho, to > fixup seccomp reject syscall code path. Doesn't this suffer from the same

Re: [PATCH][next] drm/auth: remove redundant assignment to variable ret

2020-05-25 Thread Daniel Vetter
On Sun, May 24, 2020 at 11:27:15PM +0100, Colin King wrote: > From: Colin Ian King > > The variable ret is being initialized with a value that is > never read and it is being updated later with a new value. The > initialization is redundant and can be removed. > > Addresses-Coverity: ("Unused

Re: [PATCH] drm: fix setting of plane_mask in pan_display_atomic() function for linux-4.4

2020-05-25 Thread Daniel Vetter
On Sat, May 23, 2020 at 11:49:07AM +0800, chenxb_99...@126.com wrote: > From: Xuebing Chen > > The provides drm_for_each_plane_mask macro and > plane_mask is defined as bitmask of plane indices, such as > 1< in pan_display_atomic() function. > > Signed-off-by: Xuebing Chen What kernel is

[PATCH SECOND RESEND] MAINTAINERS: adjust entries to moving CEC platform drivers

2020-05-25 Thread Lukas Bulwahn
--- Mauro, please pick this non-urgent minor clean-up patch on top of the CEC platform driver moves. applies cleanly on next-20200417, next-20200505 and still on next-20200525 for this second resend. v1 send here: https://lore.kernel.org/lkml/20200418093630.6149-1-lukas.bulw...@gmail.com/ v1 first r

Re: [PATCH v3 3/3] vfio-pci: Invalidate mmaps and block MMIO access on disabled memory

2020-05-25 Thread Peter Xu
On Mon, May 25, 2020 at 09:26:07AM -0300, Jason Gunthorpe wrote: > On Sat, May 23, 2020 at 07:52:57PM -0400, Peter Xu wrote: > > > For what I understand now, IMHO we should still need all those handlings of > > FAULT_FLAG_RETRY_NOWAIT like in the initial version. E.g., IIUC KVM gup > > will > >

Re: [PATCH] iommu/dma: limit iova free size to unmmaped iova

2020-05-25 Thread Joerg Roedel
On Thu, May 21, 2020 at 11:49:06AM -0700, Andrew Morton wrote: > I'll assume that Joerg will handle this fix? Yes, I will when it turns out necessary. Regards, Joerg

Re: [PATCH 2/3] sdhci: sparx5: Add Sparx5 SoC eMMC driver

2020-05-25 Thread Lars Povlsen
Adrian Hunter writes: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > On 20/05/20 2:14 pm, Lars Povlsen wrote: >> >> Lars Povlsen writes: >> >>> Adrian Hunter writes: >>> On 13/05/20 4:31 pm, Lars Povlsen wrote: > This adds the eMMC

[PATCH v4 10/10] perf record: introduce --ctl-fd[-ack] options

2020-05-25 Thread Alexey Budankov
Introduce --ctl-fd[-ack] options to pass open file descriptors numbers from command line. Extend perf-record.txt file with --ctl-fd[-ack] options description. Document possible usage model introduced by --ctl-fd[-ack] options by providing example bash shell script. Signed-off-by: Alexey

[PATCH v4 08/10] perf record: extend -D,--delay option with -1 value

2020-05-25 Thread Alexey Budankov
Extend -D,--delay option with -1 to start collection with events disabled to be enabled later by enable command provided via control file descriptor. Signed-off-by: Alexey Budankov --- tools/perf/Documentation/perf-record.txt | 5 +++-- tools/perf/builtin-record.c | 12

[PATCH v4 09/10] perf record: implement control commands handling

2020-05-25 Thread Alexey Budankov
Implement handling of 'enable' and 'disable' control commands coming from control file descriptor. Signed-off-by: Alexey Budankov --- tools/perf/builtin-record.c | 16 1 file changed, 16 insertions(+) diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c

Re: [GIT PULL] iommu/arm-smmu: Updates for 5.8

2020-05-25 Thread Joerg Roedel
On Thu, May 21, 2020 at 06:39:44PM +0100, Will Deacon wrote: > Hi Joerg, > > Please pull these Arm SMMU updates for 5.8. The branch is based on your > 'core' branch from a little while ago. > > Summary in the tag. > > Cheers, > > Will > > --->8 > > The following changes since commit

Re: [RFC 00/14] perf tests: Check on subtest for user specified test

2020-05-25 Thread Arnaldo Carvalho de Melo
Em Mon, May 25, 2020 at 12:42:05AM +0200, Jiri Olsa escreveu: > hi, > changes for using metric result in another metric seem > to change lot of core metric code, so it's better we > have some more tests before we do that. > > Sending as RFC as it's still alive and you guys might > have some other

[PATCH v4 07/10] perf stat: introduce --ctl-fd[-ack] options

2020-05-25 Thread Alexey Budankov
Introduce --ctl-fd[-ack] options to pass open file descriptors numbers from command line. Extend perf-stat.txt file with --ctl-fd[-ack] options description. Document possible usage model introduced by --ctl-fd[-ack] options by providing example bash shell script. Signed-off-by: Alexey Budankov

[PATCH v4 06/10] perf stat: implement control commands handling

2020-05-25 Thread Alexey Budankov
Implement handling of 'enable' and 'disable' control commands coming from control file descriptor. Signed-off-by: Alexey Budankov --- tools/perf/builtin-stat.c | 45 +-- 1 file changed, 39 insertions(+), 6 deletions(-) diff --git

Re: [PATCH 4/5] seccomp: Add SECCOMP_ADDFD_FLAG_MOVE flag to add fd ioctl

2020-05-25 Thread Christian Brauner
On Sun, May 24, 2020 at 04:39:41PM -0700, Sargun Dhillon wrote: > Certain files, when moved to another process have metadata changed, such > as netprioidx, and classid. This is the default behaviour in sending > sockets with SCM_RIGHTS over unix sockets. Depending on the usecase, > this may or may

[PATCH v4 05/10] perf stat: extend -D,--delay option with -1 value

2020-05-25 Thread Alexey Budankov
Extend -D,--delay option with -1 value to start monitoring with events disabled to be enabled later by enable command provided via control file descriptor. Signed-off-by: Alexey Budankov --- tools/perf/Documentation/perf-stat.txt | 5 +++-- tools/perf/builtin-stat.c | 18

[PATCH v4 04/10] perf stat: factor out event handling loop into a function

2020-05-25 Thread Alexey Budankov
Factor out event handling loop into dispatch_events() function. Signed-off-by: Alexey Budankov --- tools/perf/builtin-stat.c | 93 --- 1 file changed, 58 insertions(+), 35 deletions(-) diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c

[PATCH v4 03/10] perf evlist: implement control command handling functions

2020-05-25 Thread Alexey Budankov
Implement functions of initialization, finalization and processing of control commands coming from control file descriptors. Signed-off-by: Alexey Budankov --- tools/perf/util/evlist.c | 128 +++ tools/perf/util/evlist.h | 17 ++ 2 files changed, 145

RE: [RFC PATCH v12 10/11] arm64: add mechanism to let user choose which counter to return

2020-05-25 Thread Jianyong Wu
Hi Marc, > -Original Message- > From: Marc Zyngier > Sent: Monday, May 25, 2020 5:17 PM > To: Richard Cochran ; Jianyong Wu > > Cc: net...@vger.kernel.org; yangbo...@nxp.com; john.stu...@linaro.org; > t...@linutronix.de; pbonz...@redhat.com; sean.j.christopher...@intel.com; > Mark

[PATCH] mm: dump_page: add debugfs file for dumping page state by pfn

2020-05-25 Thread Konstantin Khlebnikov
Tool 'page-types' could list pages mapped by process or file cache pages, but it shows only limited amount of state exported via procfs. Let's employ existing helper dump_page() to reach remaining information: writing pfn into /sys/kernel/debug/dump_page dumps state into kernel log. # echo

[PATCH] riscv: Remove unnecessary path for syscall_trace

2020-05-25 Thread guoren
From: Guo Ren Obviously, there is no need to recover a0-a7 in reject path. Previous modification is from commit af33d243 by Tycho, to fixup seccomp reject syscall code path. Signed-off-by: Guo Ren Cc: Tycho Andersen Cc: Kees Cook Cc: Palmer Dabbelt --- arch/riscv/kernel/entry.S | 3 +-- 1

Re: [RFC PATCH] gpio: uapi: v2 proposal

2020-05-25 Thread Kent Gibson
On Mon, May 25, 2020 at 10:39:42AM +0200, Linus Walleij wrote: > On Sat, May 16, 2020 at 8:45 AM Kent Gibson wrote: > > > Add a new version of the uAPI to address existing 32/64bit alignment > > issues, add support for debounce, and provide some future proofing by > > adding padding reserved for

[PATCH v4 02/10] perf evlist: introduce control file descriptors

2020-05-25 Thread Alexey Budankov
Define and initialize control file descriptors. Signed-off-by: Alexey Budankov --- tools/perf/util/evlist.c | 3 +++ tools/perf/util/evlist.h | 5 + 2 files changed, 8 insertions(+) diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 2a9de6491700..0872b0b04a42 100644

[PATCH v4 01/10] tools/libperf: introduce static poll file descriptors

2020-05-25 Thread Alexey Budankov
Implement adding of file descriptors to fixed size (currently 1) storage at struct fdarray by the dedicated fdarray__add_stat(). Append the static descriptors to the array used by poll() syscall at fdarray__poll(). Copy poll() result of the descriptors from the array back to the storage for

Re: Endless soft-lockups for compiling workload since next-20200519

2020-05-25 Thread Peter Zijlstra
On Mon, May 25, 2020 at 03:21:05PM +0200, Peter Zijlstra wrote: > - flags = atomic_fetch_andnot(NOHZ_KICK_MASK, nohz_flags(this_cpu)); > - if (!(flags & NOHZ_KICK_MASK)) > + if (idle != CPU_IDLE) > return false; > > _nohz_idle_balance(this_rq, flags, idle); Bah,

[PATCH] SUNRPC: Remove unreachable error condition in rpcb_getport_async()

2020-05-25 Thread Xiyu Yang
rpcb_getport_async() invokes rpcb_call_async(), which return the value of rpc_run_task() to "child". Since rpc_run_task() is impossible to return an ERR pointer, there is no need to add the IS_ERR() condition on "child" here. So we need to remove it. Signed-off-by: Xiyu Yang Signed-off-by: Xin

[PATCH] scsi: lpfc: Fix lpfc_nodelist leak when processing unsolicited event

2020-05-25 Thread Xiyu Yang
In order to create or activate a new node, lpfc_els_unsol_buffer() invokes lpfc_nlp_init() or lpfc_enable_node() or lpfc_nlp_get(), all of them will return a reference of the specified lpfc_nodelist object to "ndlp" with increased refcnt. When lpfc_els_unsol_buffer() returns, local variable

[PATCH] MAINTAINERS: adjust entry in XDP SOCKETS to actual file name

2020-05-25 Thread Lukas Bulwahn
h. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains: warning: no file matches F: include/net/xsk_buffer_pool.h Adjust the entry in XDP SOCKETS to the actual file name. Signed-off-by: Lukas Bulwahn --- Bj??rn, please pick this minor non-urgent patch. applies to next-20200525 o

[PATCH] nfsd: Fix svc_xprt refcnt leak when setup callback client failed

2020-05-25 Thread Xiyu Yang
nfsd4_process_cb_update() invokes svc_xprt_get(), which increases the refcount of the "c->cn_xprt". The reference counting issue happens in one exception handling path of nfsd4_process_cb_update(). When setup callback client failed, the function forgets to decrease the refcnt increased by

[PATCH] dax: Fix dax_region refcnt leak when creating dev_dax

2020-05-25 Thread Xiyu Yang
__devm_create_dev_dax() invokes kref_get(), which increases the refcount of the "dax_region". The reference counting issue happens in several exception handling paths of __devm_create_dev_dax(). When those error scenarios occur such as add device failed, the function forgets to decrease the

[PATCH] ASoC: fsl_asrc_dma: Fix dma_chan leak when config DMA channel failed

2020-05-25 Thread Xiyu Yang
fsl_asrc_dma_hw_params() invokes dma_request_channel() or fsl_asrc_get_dma_channel(), which returns a reference of the specified dma_chan object to "pair->dma_chan[dir]" with increased refcnt. The reference counting issue happens in one exception handling path of fsl_asrc_dma_hw_params(). When

Re: io_uring: BUG: kernel NULL pointer dereference

2020-05-25 Thread Pavel Begunkov
On 25/05/2020 16:45, Stefano Garzarella wrote: > On Mon, May 25, 2020 at 12:30:51PM +0200, Stefano Garzarella wrote: >> >> I'll try to bisect, but I have some suspicions about: >> b41e98524e42 io_uring: add per-task callback handler > > I confirm, the bisection ended with this: >

[PATCH] afs: Fix afs_cb_interest refcnt leak in afs_select_fileserver()

2020-05-25 Thread Xiyu Yang
afs_select_fileserver() invokes afs_get_cb_interest(), which returns a reference of the specified afs_cb_interest object to "fc->cbi" with increased refcnt. The reference counting issue happens in one exception handling path of afs_select_fileserver(). When error occurred in

[PATCH 2/2] power: supply: bq27xxx_battery: Notify about voltage and current changes

2020-05-25 Thread Krzysztof Kozlowski
Read voltage and current and store them in the cache (like other properties). This has benefits: 1. User-space will be notified on voltage or current change. These are important properties of charging so user-space might be interested in getting them. 2. Closes possible resource exhaustion

[PATCH 1/2] power: supply: bq27xxx_battery: Notify about all battery changes

2020-05-25 Thread Krzysztof Kozlowski
All battery related data could be important for user-space. For example time-to-full could be shown to user on the screen or health could be monitored for any issues. Instead of comparing few selected old/new values, just check if anything changed in the cache. Signed-off-by: Krzysztof

[PATCH v4 00/10] perf: support enable and disable commands in stat and record modes

2020-05-25 Thread Alexey Budankov
Changes in v4: - made checking of ctlfd state unconditional in record trace streaming loop - introduced static poll fds to keep evlist__filter_pollfd() unaffected - handled ret code of evlist__initialize_ctlfd() where need - renamed and structured handle_events() function - applied anonymous

Re: io_uring: BUG: kernel NULL pointer dereference

2020-05-25 Thread Jens Axboe
On 5/25/20 7:45 AM, Stefano Garzarella wrote: > On Mon, May 25, 2020 at 12:30:51PM +0200, Stefano Garzarella wrote: >> Hi Jens, >> using fio and io_uring engine with SQPOLL and IOPOLL enabled, I had the >> following issue that happens after 4/5 seconds fio has started. >> Initially I had this

[PATCH v6 2/3] dt-bindings: arm: actions: Document Caninos Loucos Labrador

2020-05-25 Thread Matheus Castello
Update the documentation to add the Caninos Loucos Labrador. Labrador project consists of a computer on module based on the Actions Semi S500 processor and the Labrador base board. Signed-off-by: Matheus Castello Acked-by: Rob Herring --- Documentation/devicetree/bindings/arm/actions.yaml | 5

Re: [PATCH v1 10/25] seqlock: Add RST directives to kernel-doc code samples and notes

2020-05-25 Thread Peter Zijlstra
On Mon, May 25, 2020 at 03:44:29PM +0200, Peter Zijlstra wrote: > I've never claimed that. My claim is that RST is shite and has no added > value. Or rather, it has negative value, for it makes comments less readable.

Re: Endless soft-lockups for compiling workload since next-20200519

2020-05-25 Thread Frederic Weisbecker
On Mon, May 25, 2020 at 03:21:05PM +0200, Peter Zijlstra wrote: > @@ -2320,7 +2304,7 @@ static void ttwu_queue_remote(struct task_struct *p, > int cpu, int wake_flags) > > if (llist_add(>wake_entry, >wake_list)) { > if (!set_nr_if_polling(rq->idle)) > -

Re: [PATCH v5 09/13] soc: mediatek: cmdq: add write_s value function

2020-05-25 Thread Matthias Brugger
On 25/05/2020 12:38, Dennis-YC Hsieh wrote: > > On Mon, 2020-05-25 at 10:39 +0200, Matthias Brugger wrote: >> >> On 25/05/2020 04:27, Dennis-YC Hsieh wrote: >>> >>> On Sun, 2020-05-24 at 20:13 +0200, Matthias Brugger wrote: On 24/05/2020 19:31, Dennis-YC Hsieh wrote: > Hi

Re: [PATCH v3 1/8] dt-bindings: net: meson-dwmac: Add the amlogic,rx-delay-ns property

2020-05-25 Thread Andrew Lunn
> > standardizing on rx-delay-ps and tx-delay-ps would make sense since that > > is the lowest resolution and the property would be correctly named with > > an unit in the name. > > Seems like similar patch is already being reviewed from Dan Murphy (?) > from TI. Dan is working on the PHY side.

Re: [RFC linux-next PATCH] mm: khugepaged: remove error message when checking external pins

2020-05-25 Thread Qian Cai
On Thu, May 21, 2020 at 10:56:51AM -0400, Qian Cai wrote: > On Wed, May 13, 2020 at 05:03:03AM +0800, Yang Shi wrote: > [] > > mm/khugepaged.c | 24 +--- > > 1 file changed, 17 insertions(+), 7 deletions(-) > > > > diff --git a/mm/khugepaged.c b/mm/khugepaged.c > > index

Re: [PATCH 2/5] seccomp: Introduce addfd ioctl to seccomp user notifier

2020-05-25 Thread Christian Brauner
On Sun, May 24, 2020 at 04:39:39PM -0700, Sargun Dhillon wrote: > This adds a seccomp notifier ioctl which allows for the listener to "add" > file descriptors to a process which originated a seccomp user > notification. This allows calls like mount, and mknod to be "implemented", > as the return

Re: [PATCH] proc.5: add "wf" to VmFlags in /proc/[pid]/smaps

2020-05-25 Thread Michael Kerrisk (man-pages)
On 5/22/20 1:13 AM, Ian Rogers wrote: > On Thu, May 21, 2020 at 3:25 PM Ian Rogers wrote: >> >> This patch documents a flag added in the following kernel commit: >> >> commit d2cd9ede6e193dd7d88b6d27399e96229a551b19 >> Author: Rik van Riel >> Date: Wed Sep 6 16:25:15 2017 -0700 >> >>

Re: [RFC 00/16] KVM protected memory extension

2020-05-25 Thread Liran Alon
On 22/05/2020 15:51, Kirill A. Shutemov wrote: == Background / Problem == There are a number of hardware features (MKTME, SEV) which protect guest memory from some unauthorized host access. The patchset proposes a purely software feature that mitigates some of the same host-side read-only

Re: [PATCH] proc.5: add "wf" to VmFlags in /proc/[pid]/smaps

2020-05-25 Thread Michael Kerrisk (man-pages)
Hello Ian, On 5/22/20 12:25 AM, Ian Rogers wrote: > This patch documents a flag added in the following kernel commit: > > commit d2cd9ede6e193dd7d88b6d27399e96229a551b19 > Author: Rik van Riel > Date: Wed Sep 6 16:25:15 2017 -0700 > > mm,fork: introduce MADV_WIPEONFORK > > This was

[PATCH v6 1/3] dt-bindings: Add vendor prefix for Caninos Loucos

2020-05-25 Thread Matheus Castello
The Caninos Loucos Program develops Single Board Computers with an open structure. The Program wants to form a community of developers to use IoT technologies and disseminate the learning of embedded systems in Brazil. It is an initiative of the Technological Integrated Systems Laboratory

Re: [PATCH] watchdog: bcm_kona_wdt: Use correct return value for bcm_kona_wdt_probe()

2020-05-25 Thread Guenter Roeck
On 5/25/20 12:31 AM, Tiezhu Yang wrote: > When call function devm_platform_ioremap_resource(), we should use IS_ERR() > to check the return value and return PTR_ERR() if failed. > > Signed-off-by: Tiezhu Yang Reviewed-by: Guenter Roeck > --- > drivers/watchdog/bcm_kona_wdt.c | 2 +- > 1 file

Re: io_uring: BUG: kernel NULL pointer dereference

2020-05-25 Thread Stefano Garzarella
On Mon, May 25, 2020 at 12:30:51PM +0200, Stefano Garzarella wrote: > Hi Jens, > using fio and io_uring engine with SQPOLL and IOPOLL enabled, I had the > following issue that happens after 4/5 seconds fio has started. > Initially I had this issue on Linux v5.7-rc6, but I just tried also > Linux

Re: [PATCH v1 10/25] seqlock: Add RST directives to kernel-doc code samples and notes

2020-05-25 Thread Peter Zijlstra
On Mon, May 25, 2020 at 11:36:49AM +0200, Ahmed S. Darwish wrote: > Peter Zijlstra wrote: > > I will not let sensible code comments deteriorate to the benefit of some > > external piece of crap. > > > > As a programmer the primary interface to all this is a text editor, not > > a web broswer or

[PATCH v6 3/3] ARM: dts: Add Caninos Loucos Labrador

2020-05-25 Thread Matheus Castello
Add Device Trees for Caninos Loucos Labrador CoM and base board. Based on the work of Andreas Färber on Lemaker Guitar device tree. Signed-off-by: Matheus Castello Reviewed-by: Manivannan Sadhasivam Reviewed-by: Andreas Färber --- arch/arm/boot/dts/Makefile| 1 +

Re: [RFC 08/11] net: phy: Allow mdio buses to auto-probe c45 devices

2020-05-25 Thread Andrew Lunn
> > > So i think it would be better to have > > > > > > enum { > > > MDIOBUS_UNKNOWN = 0, > > > MDIOBUS_C22, > > > MDIOBUS_C45, > > > MDIOBUS_C45_C22, > > > } bus_capabilities; > > > > > > Describe just what the bus master can support. > > > > Yes,

Re: [PATCH 0/2] Let pci_fixup_final access iommu_fwnode

2020-05-25 Thread Joerg Roedel
On Tue, May 12, 2020 at 12:08:29PM +0800, Zhangfei Gao wrote: > Some platform devices appear as PCI but are > actually on the AMBA bus, and they need fixup in > drivers/pci/quirks.c handling iommu_fwnode. > So calling pci_fixup_final after iommu_fwnode is allocated. > > For example: > Hisilicon

Re: [PATCH v2 08/12] i2c: designware: Introduce platform drivers glue layer interface

2020-05-25 Thread Andy Shevchenko
On Mon, May 25, 2020 at 04:16:05PM +0300, Jarkko Nikula wrote: > On 5/21/20 5:37 AM, Serge Semin wrote: > For this patchset I'd like more if changes are done to > i2c-designware-platdrv.c since it's not too complicated yet :-) And after moving ACPI stuff to common code, the one has even been

Re: [PATCH 0/6] nouveau/hmm: add support for mapping large pages

2020-05-25 Thread Jason Gunthorpe
On Fri, May 08, 2020 at 12:20:03PM -0700, Ralph Campbell wrote: > hmm_range_fault() returns an array of page frame numbers and flags for > how the pages are mapped in the requested process' page tables. The PFN > can be used to get the struct page with hmm_pfn_to_page() and the page size > order

Re: [PATCH] serial: 8250: probe all 16550A variants by default

2020-05-25 Thread Andy Shevchenko
On Mon, May 25, 2020 at 04:02:38PM +0300, Vladimir Oltean wrote: > From: Vladimir Oltean > > On NXP T1040, the UART is typically detected as 16550A_FSL64. After said > patch, it gets detected as plain 16550A and the Linux console is > completely garbled and missing characters. > > So clearly,

Re: [Tee-dev] [PATCHv3 2/3] optee: use uuid for sysfs driver entry

2020-05-25 Thread Maxim Uvarov
On Mon, 25 May 2020 at 15:10, Jerome Forissier wrote: > > > > On 5/25/20 1:52 PM, Maxim Uvarov wrote: > > Optee device names for sysfs needed to be unique > > s/Optee/OP-TEE/ > s/needed/need/ > > > and it's better if they will mean something. UUID for name > > looks like good solution: > >

Re: [PATCH 2/2] usb: serial: xr_serial: Add gpiochip support

2020-05-25 Thread Greg KH
On Mon, May 25, 2020 at 03:02:15PM +0200, Linus Walleij wrote: > On Mon, May 25, 2020 at 1:12 PM Greg KH wrote: > > > > I remember I even referred to this myself, but I've been waning a bit > > > on it recently, because it turns out that userspace/users aren't very > > > good at parsing sysfs

Re: [PATCH v2 0/7] Share events between metrics

2020-05-25 Thread Arnaldo Carvalho de Melo
Em Sun, May 24, 2020 at 12:19:36AM +0200, Jiri Olsa escreveu: > On Fri, May 22, 2020 at 10:56:59AM -0700, Ian Rogers wrote: > > SNIP > > > >> > #11 0x004b6911 in cmd_test (argc=1, argv=0x7fffd7f0) > > >> > at tests/builtin-test.c:772 > > >> > #12 0x004e977b in

Re: [PATCH] qlcnic: Complete exception handling in qlcnic_83xx_interrupt_test()

2020-05-25 Thread Markus Elfring
> …, function qlcnic_83xx_diag_alloc_res() is not handled by > function qlcnic_83xx_diag_free_res() after a call of … I have got understanding difficulties for this wording. > Fix this issue by adding a jump target "fail_mbx_args", > and jump to this new target when qlcnic_alloc_mbx_args()

<    1   2   3   4   5   6   7   8   9   10   >