Re: [PATCH v3] libata: Use per port sync for detach

2020-06-18 Thread Jens Axboe
On 6/3/20 1:48 AM, Kai-Heng Feng wrote: > Commit 130f4caf145c ("libata: Ensure ata_port probe has completed before > detach") may cause system freeze during suspend. > > Using async_synchronize_full() in PM callbacks is wrong, since async > callbacks that are already scheduled may wait for

Re: [PATCH] drm/noveau: fix reference count leak in nv50_disp_atomic_commit

2020-06-18 Thread Lyude Paul
On Sat, 2020-06-13 at 20:29 -0500, Aditya Pakki wrote: > nv50_disp_atomic_commit() calls calls pm_runtime_get_sync and in turn > increments the reference count. In case of failure, decrement the > ref count before returning the error. > > Signed-off-by: Aditya Pakki > --- >

Re: [PATCH v4 1/5] spi: spi-geni-qcom: No need for irqsave variant of spinlock calls

2020-06-18 Thread Mark Brown
On Thu, Jun 18, 2020 at 08:06:22AM -0700, Douglas Anderson wrote: > The driver locks its locks in two places. > > In the first usage of the lock the function doing the locking already > has a sleeping call and thus we know we can't be called from interrupt > context. That means we can use the

Re: [PATCH] drm/amdgpu: remove redundant initialization of variable ret

2020-06-18 Thread Alex Deucher
On Thu, Jun 18, 2020 at 6:26 AM 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 value") >

Re: [PATCH 3/7] x86/entry: Fixup bad_iret vs noinstr

2020-06-18 Thread Marco Elver
On Thu, 18 Jun 2020 at 16:50, Peter Zijlstra wrote: > > vmlinux.o: warning: objtool: fixup_bad_iret()+0x8e: call to memcpy() leaves > .noinstr.text section > > Worse, when KASAN there is no telling what memcpy() actually is. Force > the use of __memcpy() which is our assmebly implementation. > >

[PATCH v4 2/5] spi: spi-geni-qcom: Mo' betta locking

2020-06-18 Thread Douglas Anderson
If you added a bit of a delay (like a trace_printk) into the ISR for the spi-geni-qcom driver, you would suddenly start seeing some errors spit out. The problem was that, though the ISR itself held a lock, other parts of the driver didn't always grab the lock. One example race was this: CPU0

[PATCH v4 3/5] spi: spi-geni-qcom: Check for error IRQs

2020-06-18 Thread Douglas Anderson
>From reading the #defines it seems like we should shout if we ever see one of these error bits. Let's do so. This doesn't do anything functional except print a yell in the log if the error bits are seen. Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd --- Changes in v4: None

[PATCH v4 1/5] spi: spi-geni-qcom: No need for irqsave variant of spinlock calls

2020-06-18 Thread Douglas Anderson
The driver locks its locks in two places. In the first usage of the lock the function doing the locking already has a sleeping call and thus we know we can't be called from interrupt context. That means we can use the "spin_lock_irq" variant of the function. In the second usage of the lock the

[PATCH v4 5/5] spi: spi-geni-qcom: Don't keep a local state variable

2020-06-18 Thread Douglas Anderson
The variable "cur_mcmd" kept track of our current state (idle, xfer, cs, cancel). We don't really need it, so get rid of it. Instead: * Use separate condition variables for "chip select done", "cancel done", and "abort done". This is important so that if a "done" comes through (perhaps some

[PATCH v4 0/5] spi: spi-geni-qcom: Fixes / perf improvements

2020-06-18 Thread Douglas Anderson
This patch series is a new version of the previous patch posted: [PATCH v2] spi: spi-geni-qcom: Speculative fix of "nobody cared" about interrupt https://lore.kernel.org/r/20200317133653.v2.1.I752ebdcfd5e8bf0de06d66e767b8974932b3620e@changeid At this point I've done enough tracing to know

[PATCH v4 4/5] spi: spi-geni-qcom: Actually use our FIFO

2020-06-18 Thread Douglas Anderson
The geni hardware has a FIFO that can hold up to 64 bytes (it has 16 entries that can hold 4 bytes each), at least on the two SoCs I tested (sdm845 and sc7180). We configured our RX Watermark to 0, which basically meant we got an interrupt as soon as the first 4 bytes showed up in the FIFO.

fs/cifs/transport.c:1284:2-8: preceding lock on line 1277 (fwd)

2020-06-18 Thread Julia Lawall
Hello, This is not actually a bug. But for both tools and humans, it might be better to refer to the lock on line 1281 in the same way that it is referred to on line 1277. julia -- Forwarded message -- Date: Thu, 18 Jun 2020 08:07:12 +0800 From: kernel test robot To:

Re: [PATCH net v1] net: phy: smsc: fix printing too many logs

2020-06-18 Thread Dejin Zheng
On Wed, Jun 17, 2020 at 11:36:42PM +0200, Andrew Lunn wrote: > On Wed, Jun 17, 2020 at 09:24:50PM +0100, Russell King - ARM Linux admin > wrote: > > On Wed, Jun 17, 2020 at 08:43:34PM +0200, Andrew Lunn wrote: > > > You have explained what the change does. But not why it is > > > needed. What

Re: [PATCH v3 5/5] spi: spi-geni-qcom: Don't keep a local state variable

2020-06-18 Thread Doug Anderson
Hi, On Wed, Jun 17, 2020 at 2:16 PM Stephen Boyd wrote: > > Quoting Douglas Anderson (2020-06-16 03:40:50) > > diff --git a/drivers/spi/spi-geni-qcom.c b/drivers/spi/spi-geni-qcom.c > > index 63a62548b078..6feea88d63ac 100644 > > --- a/drivers/spi/spi-geni-qcom.c > > +++

Re: [PATCH 4/7] x86/entry: Increase entry_stack size to a full page

2020-06-18 Thread Marco Elver
On Thu, 18 Jun 2020 at 16:50, Peter Zijlstra wrote: > > Marco crashed in bad_iret with a Clang11/KCSAN build due to > overflowing the stack. Now that we run C code on it, expand it to a > full page. > > Suggested-by: Andy Lutomirski > Reported-by: Marco Elver > Signed-off-by: Peter Zijlstra

[PATCH v3] xfs: Fix false positive lockdep warning with sb_internal & fs_reclaim

2020-06-18 Thread Waiman Long
Depending on the workloads, the following circular locking dependency warning between sb_internal (a percpu rwsem) and fs_reclaim (a pseudo lock) may show up: == WARNING: possible circular locking dependency detected 5.0.0-rc1+ #60 Tainted: G

Re: [PATCH 4/4] pci: export untrusted attribute in sysfs

2020-06-18 Thread Rajat Jain
Hello, On Thu, Jun 18, 2020 at 2:14 AM Andy Shevchenko wrote: > > On Thu, Jun 18, 2020 at 11:36 AM Greg Kroah-Hartman > wrote: > > > > On Thu, Jun 18, 2020 at 11:12:56AM +0300, Andy Shevchenko wrote: > > > On Wed, Jun 17, 2020 at 10:56 PM Rajat Jain wrote: > > > > On Wed, Jun 17, 2020 at 12:31

Re: [PATCH 1/3] thermal/cpu-cooling, sched/core: Cleanup thermal pressure definition

2020-06-18 Thread Vincent Guittot
On Sun, 14 Jun 2020 at 03:10, Valentin Schneider wrote: > > The following commit: > > 14533a16c46d ("thermal/cpu-cooling, sched/core: Move the > arch_set_thermal_pressure() API to generic scheduler code") > > moved the definition of arch_set_thermal_pressure() to sched/core.c, but > kept its

Re: [Cluster-devel] [PATCH v11 16/25] fs: Convert mpage_readpages to mpage_readahead

2020-06-18 Thread Matthew Wilcox
On Thu, Jun 18, 2020 at 02:46:03PM +0200, Andreas Gruenbacher wrote: > On Wed, Jun 17, 2020 at 4:22 AM Matthew Wilcox wrote: > > On Wed, Jun 17, 2020 at 02:57:14AM +0200, Andreas Grünbacher wrote: > > > Right, the approach from the following thread might fix this: > > > > > >

Re: [PATCH v2] coccinelle: misc: add array_size_dup script to detect missed overflow checks

2020-06-18 Thread Markus Elfring
> Where is the typo? I tried to point a possible replacement out for the word “overlow” by “overflow”. > I can't handle your suggestions I hope that you got chances to take also my patch review comments into account. > because your mails constantly break the threads. I just can't find them

Re: [PATCH v2] coccinelle: misc: add array_size_dup script to detect missed overflow checks

2020-06-18 Thread Markus Elfring
> Where is the typo? I tried to point a possible replacement out for the word “overlow” by “overflow”. > I can't handle your suggestions I hope that you got chances to take also my patch review comments into account. > because your mails constantly break the threads. I just can't find them

Re: [Linaro-mm-sig] [PATCH 04/18] dma-fence: prime lockdep annotations

2020-06-18 Thread Daniel Vetter
On Wed, Jun 17, 2020 at 12:28:35PM -0300, Jason Gunthorpe wrote: > On Wed, Jun 17, 2020 at 08:48:50AM +0200, Daniel Vetter wrote: > > > Now my understanding for rdma is that if you don't have hw page fault > > support, > > The RDMA ODP feature is restartable HW page faulting just like nouveau >

Re: mm: mkfs.ext4 invoked oom-killer on i386 - pagecache_get_page

2020-06-18 Thread Yafang Shao
On Thu, Jun 18, 2020 at 8:37 PM Chris Down wrote: > > Yafang Shao writes: > >On Thu, Jun 18, 2020 at 5:09 AM Chris Down wrote: > >> > >> Naresh Kamboju writes: > >> >After this patch applied the reported issue got fixed. > >> > >> Great! Thank you Naresh and Michal for helping to get to the

[PATCH] drm/lima: Expose job_hang_limit module parameter

2020-06-18 Thread Andrey Lebedev
From: Andrey Lebedev Some pp or gp jobs can be successfully repeated even after they time outs. Introduce lima module parameter to specify number of times a job can hang before being dropped. Signed-off-by: Andrey Lebedev --- Fixes for the embarrassing build error Reported-by: kernel test

Re: [PATCH 1/7] x86/entry: Fix #UD vs WARN more

2020-06-18 Thread Andy Lutomirski
> On Jun 18, 2020, at 7:50 AM, Peter Zijlstra wrote: > > vmlinux.o: warning: objtool: exc_invalid_op()+0x47: call to > probe_kernel_read() leaves .noinstr.text section > > Since we use UD2 as a short-cut for 'CALL __WARN', treat it as such. > Have the bare exception handler do the

Re: [PATCH] ANDROID: sound: usb: Add vendor's hooking interface

2020-06-18 Thread Pierre-Louis Bossart
On 6/16/20 9:18 PM, JaeHun Jung wrote: In mobile, a co-processor is used when using USB audio to improve power consumption. hooking is required for sync-up when operating the co-processor. So register call-back function. The main operation of the call-back function is as follows: - Initialize

Re: [PATCH AUTOSEL 5.7 055/388] ASoC: SOF: Do nothing when DSP PM callbacks are not set

2020-06-18 Thread Pierre-Louis Bossart
On 6/18/20 6:44 AM, Daniel Baluta wrote: On 6/18/20 2:01 PM, Mark Brown wrote: On Wed, Jun 17, 2020 at 09:02:32PM -0400, Sasha Levin wrote: From: Daniel Baluta [ Upstream commit c26fde3b15ed41f5f452f1da727795f787833287 ] This provides a better separation between runtime and PM sleep

Re: [PATCH v5 09/12] PCI: brcmstb: Set internal memory viewport sizes

2020-06-18 Thread Jim Quinlan
Hello Bjorn, On Wed, Jun 17, 2020 at 11:01 PM Bjorn Helgaas wrote: > > On Wed, Jun 17, 2020 at 01:28:12PM -0400, Jim Quinlan wrote: > > Hello Bjorn, > > > > On Tue, Jun 16, 2020 at 6:05 PM Bjorn Helgaas wrote: > > > > > > On Tue, Jun 16, 2020 at 04:55:16PM -0400, Jim Quinlan wrote: > > > >

Re: [PATCH 4/4] pci: export untrusted attribute in sysfs

2020-06-18 Thread Greg Kroah-Hartman
On Thu, Jun 18, 2020 at 12:14:41PM +0300, Andy Shevchenko wrote: > On Thu, Jun 18, 2020 at 11:36 AM Greg Kroah-Hartman > wrote: > > > > On Thu, Jun 18, 2020 at 11:12:56AM +0300, Andy Shevchenko wrote: > > > On Wed, Jun 17, 2020 at 10:56 PM Rajat Jain wrote: > > > > On Wed, Jun 17, 2020 at 12:31

Re: [PATCH v6 05/19] mm: memcontrol: decouple reference counting from page accounting

2020-06-18 Thread Shakeel Butt
Not sure if my email went through, so, re-sending. On Mon, Jun 8, 2020 at 4:07 PM Roman Gushchin wrote: > > From: Johannes Weiner > [...] > @@ -3003,13 +3004,16 @@ void __memcg_kmem_uncharge_page(struct page *page, > int order) > */ > void mem_cgroup_split_huge_fixup(struct page *head) > {

[PATCH v3] HID: i2c-hid: Enable touchpad wakeup from Suspend-to-Idle

2020-06-18 Thread Kai-Heng Feng
Many laptops can be woken up from Suspend-to-Idle by touchpad. This is also the default behavior on other OSes. So let's enable the wakeup support if the system defaults to Suspend-to-Idle. Signed-off-by: Kai-Heng Feng --- v3: - Use device_init_wakeup(). - Wording change. v2: - Fix compile

Re: [PATCH v3 19/21] dyndbg: extend ddebug_parse_flags to accept optional leading filter-flags

2020-06-18 Thread jim . cromie
On Thu, Jun 18, 2020 at 6:44 AM Petr Mladek wrote: > > On Wed 2020-06-17 10:25:34, Jim Cromie wrote: > > Change ddebug_parse_flags to accept optional filterflags before the > > required operator [-+=]. Read the flags into the filter_flags > > parameter added in the previous patch. So this now

Re: [PATCH v6 5/6] media: venus: core: Add support for opp tables/perf voting

2020-06-18 Thread Stanimir Varbanov
Hi Rajendra, On 6/15/20 3:02 PM, Rajendra Nayak wrote: > Add support to add OPP tables and perf voting on the OPP powerdomain. > This is needed so venus votes on the corresponding performance state > for the OPP powerdomain along with setting the core clock rate. > > Signed-off-by: Rajendra

Re: [PATCH] [net/sched] Fix null pointer deref skb in tc_ctl_action

2020-06-18 Thread David Miller
From: Gaurav Singh Date: Wed, 17 Jun 2020 21:43:28 -0400 > Add null check for skb > > Signed-off-by: Gaurav Singh > --- > net/sched/act_api.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/net/sched/act_api.c b/net/sched/act_api.c > index

arch/x86/crypto/curve25519-x86_64.c:518:3: error: inline assembly requires more registers than available

2020-06-18 Thread kernel test robot
implementation date: 4 months ago config: x86_64-randconfig-r011-20200618 (attached as .config) compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 487ca07fcc75d52755c9fe2ee05bcb3b6c44) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests

Re: [PATCH] [net/sched]: Remove redundant condition in qdisc_graft

2020-06-18 Thread David Miller
From: Gaurav Singh Date: Thu, 18 Jun 2020 00:00:56 -0400 > parent cannot be NULL here since its in the else part > of the if (parent == NULL) condition. Remove the extra > check on parent pointer. > > Signed-off-by: Gaurav Singh > --- > net/sched/sch_api.c | 2 +- > 1 file changed, 1

[PATCH 7/7] objtool: Fix noinstr vs KCOV

2020-06-18 Thread Peter Zijlstra
Since many compilers cannot disable KCOV with a function attribute, help it to NOP out any __sanitizer_cov_*() calls injected in noinstr code. This turns: 12: e8 00 00 00 00 callq 17 13: R_X86_64_PLT32 __sanitizer_cov_trace_pc-0x4 into: 12: 0f 1f 44 00 00

Re: [PATCH 2/4] KVM: x86: Introduce paravirt feature CR0/CR4 pinning

2020-06-18 Thread Dave Hansen
On 6/18/20 7:43 AM, Andersen, John wrote: > On Thu, Jun 18, 2020 at 07:18:09AM -0700, Dave Hansen wrote: >> On 6/17/20 12:07 PM, John Andersen wrote: >>> +#define KVM_CR0_PIN_ALLOWED(X86_CR0_WP) >>> +#define KVM_CR4_PIN_ALLOWED(X86_CR4_SMEP | X86_CR4_SMAP | >>> X86_CR4_UMIP) >> >>

[PATCH 5/7] objtool: Clean up elf_write() condition

2020-06-18 Thread Peter Zijlstra
With there being multiple ways to change the ELF data, let's more concisely track modification. Signed-off-by: Peter Zijlstra (Intel) --- tools/objtool/check.c |4 +++- tools/objtool/elf.c | 13 +++-- tools/objtool/elf.h |5 +++-- tools/objtool/orc_gen.c |2 +- 4

[PATCH 3/7] x86/entry: Fixup bad_iret vs noinstr

2020-06-18 Thread Peter Zijlstra
vmlinux.o: warning: objtool: fixup_bad_iret()+0x8e: call to memcpy() leaves .noinstr.text section Worse, when KASAN there is no telling what memcpy() actually is. Force the use of __memcpy() which is our assmebly implementation. Reported-by: Marco Elver Suggested-by: Marco Elver

[PATCH 6/7] objtool: Provide elf_write_{insn,reloc}()

2020-06-18 Thread Peter Zijlstra
This provides infrastructure to rewrite instructions; this is immediately useful for helping out with KCOV-vs-noinstr, but will also come in handy for a bunch of variable sized jump-label patches that are still on ice. Signed-off-by: Peter Zijlstra (Intel) --- tools/objtool/elf.c | 50

[PATCH 4/7] x86/entry: Increase entry_stack size to a full page

2020-06-18 Thread Peter Zijlstra
Marco crashed in bad_iret with a Clang11/KCSAN build due to overflowing the stack. Now that we run C code on it, expand it to a full page. Suggested-by: Andy Lutomirski Reported-by: Marco Elver Signed-off-by: Peter Zijlstra (Intel) --- arch/x86/include/asm/processor.h |2 +- 1 file

[PATCH 2/7] objtool: Dont consider vmlinux a C-file

2020-06-18 Thread Peter Zijlstra
Avoids issuing C-file warnings for vmlinux. Signed-off-by: Peter Zijlstra (Intel) --- tools/objtool/check.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -2772,7 +2772,7 @@ int check(const char *_objname, bool orc

[PATCH 1/7] x86/entry: Fix #UD vs WARN more

2020-06-18 Thread Peter Zijlstra
vmlinux.o: warning: objtool: exc_invalid_op()+0x47: call to probe_kernel_read() leaves .noinstr.text section Since we use UD2 as a short-cut for 'CALL __WARN', treat it as such. Have the bare exception handler do the report_bug() thing. Fixes: 15a416e8aaa7 ("x86/entry: Treat BUG/WARN as

[PATCH 0/7] x86/entry: noinstr fixes

2020-06-18 Thread Peter Zijlstra
Hi all, These are the objtool/kcov patches that fix kcov-vs-noinstr and a few patches that fix bad_iret noinstr issues. I'm going to merge the objtool patches in objtool/urgent but make sure the merge into objtool/core looks like the patches as posted here, since there's the reloc conflicts.

[PATCH v3 2/3] printk: add lockless ringbuffer

2020-06-18 Thread John Ogness
Introduce a multi-reader multi-writer lockless ringbuffer for storing the kernel log messages. Readers and writers may use their API from any context (including scheduler and NMI). This ringbuffer will make it possible to decouple printk() callers from any context, locking, or console constraints.

[PATCH v3 1/3] crash: add VMCOREINFO macro to define offset in a struct declared by typedef

2020-06-18 Thread John Ogness
The existing macro VMCOREINFO_OFFSET() can't be used for structures declared via typedef because "struct" is not part of type definition. Create another macro for this purpose. Signed-off-by: John Ogness --- include/linux/crash_core.h | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH v3 3/3] printk: use the lockless ringbuffer

2020-06-18 Thread John Ogness
Replace the existing ringbuffer usage and implementation with lockless ringbuffer usage. Even though the new ringbuffer does not require locking, all existing locking is left in place. Therefore, this change is purely replacing the underlining ringbuffer. Changes that exist due to the ringbuffer

[PATCH v3 0/3] printk: replace ringbuffer

2020-06-18 Thread John Ogness
Hello, Here is a v3 for the first series to rework the printk subsystem. The v2 and history are here [0]. This first series only replaces the existing ringbuffer implementation. No locking is removed. No semantics/behavior of printk are changed. Reviews on the ringbuffer are still ongoing, but I

Re: [PATCH] [perf] Fix null pointer deference in nest_epollfd

2020-06-18 Thread Namhyung Kim
Hello, On Thu, Jun 18, 2020 at 9:39 AM Gaurav Singh wrote: > > Add a NULL check for worker before dereferencing. Did you actually see a segfault due to this? It seems it's called with NULL only if multiq is false so there should not be a NULL dereference. > > Signed-off-by: Gaurav Singh > ---

[PATCH][next] net/sched: cls_u32: Use struct_size() in kzalloc()

2020-06-18 Thread Gustavo A. R. Silva
Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. This code was detected with the help of Coccinelle and, audited and fixed manually. Signed-off-by: Gustavo A. R. Silva --- net/sched/cls_u32.c | 4 +--- 1 file changed, 1

[PATCH 4/6] exec: split prepare_arg_pages

2020-06-18 Thread Christoph Hellwig
Move counting the arguments and enviroment variables out of prepare_arg_pages and rename the rest of the function to check_arg_limit. This prepares for a version of do_execvat that takes kernel pointers. Signed-off-by: Christoph Hellwig --- fs/exec.c | 26 ++ 1 file

[PATCH 3/6] exec: cleanup the count() function

2020-06-18 Thread Christoph Hellwig
Remove the max argument as it is hard wired to MAX_ARG_STRINGS, and give the function a slightly less generic name. Signed-off-by: Christoph Hellwig --- fs/exec.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/exec.c b/fs/exec.c index

[PATCH 2/6] exec: simplify the compat syscall handling

2020-06-18 Thread Christoph Hellwig
The only differenence betweeen the compat exec* syscalls and their native versions is that compat_ptr sign extension, and the fact that the pointer arithmetics for the two dimensional arrays needs to use the compat pointer size. Instead of the compat wrappers and the struct user_arg_ptr machinery

[PATCH 5/6] exec: add a kernel_execveat helper

2020-06-18 Thread Christoph Hellwig
Add a kernel_execveat helper to execute a binary with kernel space argv and envp pointers. Switch executing init and user mode helpers to this new helper instead of relying on the implicit set_fs(KERNEL_DS) for early init code and kernel threads, and move the getname call into the do_execve

[PATCH 6/6] kernel: add a kernel_wait helper

2020-06-18 Thread Christoph Hellwig
Add a helper that waits for a pid and stores the status in the passed in kernel pointer. Use it to fix the usage of kernel_wait4 in call_usermodehelper_exec_sync that only happens to work due to the implicit set_fs(KERNEL_DS) for kernel threads. Signed-off-by: Christoph Hellwig ---

Re: [PATCH 2/4] KVM: x86: Introduce paravirt feature CR0/CR4 pinning

2020-06-18 Thread Andersen, John
On Thu, Jun 18, 2020 at 07:18:09AM -0700, Dave Hansen wrote: > On 6/17/20 12:07 PM, John Andersen wrote: > > +#define KVM_CR0_PIN_ALLOWED(X86_CR0_WP) > > +#define KVM_CR4_PIN_ALLOWED(X86_CR4_SMEP | X86_CR4_SMAP | > > X86_CR4_UMIP) > > Why *is* there an allowed set? Why don't we

Re: [PATCH v2 btrfs/for-next] btrfs: fix fatal extent_buffer readahead vs releasepage race

2020-06-18 Thread David Sterba
On Wed, Jun 17, 2020 at 11:35:19AM -0700, Boris Burkov wrote: [...] > Signed-off-by: Boris Burkov Added to misc-next, thanks.

properly support exec and wait with kernel pointers v2

2020-06-18 Thread Christoph Hellwig
Hi all, this series first cleans up the exec code and then adds proper kernel_execveat and kernel_wait callers instead of relying on the fact that the early init code and kernel threads implicitly run with the address limit set to KERNEL_DS. Note that the cleanup removes the compat execve(at)

[PATCH 1/6] exec: cleanup the execve wrappers

2020-06-18 Thread Christoph Hellwig
Remove a whole bunch of wrappers that eventually all call __do_execve_file, and consolidate the execvce helpers to: (1) __do_execveat, which is the lowest level helper implementing the actual functionality (2) do_execvat, which is used by all callers that want native pointers

[PATCH 04/15] io_uring: re-issue block requests that failed because of resources

2020-06-18 Thread Jens Axboe
Mark the plug with nowait == true, which will cause requests to avoid blocking on request allocation. If they do, we catch them and reissue them from a task_work based handler. Normally we can catch -EAGAIN directly, but the hard case is for split requests. As an example, the application issues a

[PATCH 06/15] mm: abstract out wake_page_match() from wake_page_function()

2020-06-18 Thread Jens Axboe
No functional changes in this patch, just in preparation for allowing more callers. Acked-by: Johannes Weiner Signed-off-by: Jens Axboe --- include/linux/pagemap.h | 37 + mm/filemap.c| 35 --- 2 files changed, 41

[PATCH 01/15] block: provide plug based way of signaling forced no-wait semantics

2020-06-18 Thread Jens Axboe
Provide a way for the caller to specify that IO should be marked with REQ_NOWAIT to avoid blocking on allocation. Signed-off-by: Jens Axboe --- block/blk-core.c | 6 ++ include/linux/blkdev.h | 1 + 2 files changed, 7 insertions(+) diff --git a/block/blk-core.c b/block/blk-core.c

[PATCHSET v7 0/12] Add support for async buffered reads

2020-06-18 Thread Jens Axboe
On 6/18/20 8:43 AM, Jens Axboe wrote: > We technically support this already through io_uring, but it's > implemented with a thread backend to support cases where we would > block. This isn't ideal. Apparently I'm cursed when I send these out, corrected the subject line to indicate this is v7 of

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

2020-06-18 Thread Adrian Hunter
On 18/06/20 5:13 pm, Lars Povlsen wrote: > This adds the eMMC driver for the Sparx5 SoC. It is based upon the > designware IP, but requires some extra initialization and quirks. > > Signed-off-by: Lars Povlsen Acked-by: Adrian Hunter > --- > drivers/mmc/host/Kconfig | 13 ++ >

[PATCH 09/15] fs: add FMODE_BUF_RASYNC

2020-06-18 Thread Jens Axboe
If set, this indicates that the file system supports IOCB_WAITQ for buffered reads. Signed-off-by: Jens Axboe --- include/linux/fs.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/fs.h b/include/linux/fs.h index 6ac919b40596..3f9de90e0266 100644 --- a/include/linux/fs.h

[PATCH 07/15] mm: add support for async page locking

2020-06-18 Thread Jens Axboe
Normally waiting for a page to become unlocked, or locking the page, requires waiting for IO to complete. Add support for lock_page_async() and wait_on_page_locked_async(), which are callback based instead. This allows a caller to get notified when a page becomes unlocked, rather than wait for it.

[PATCH 12/15] btrfs: flag files as supporting buffered async reads

2020-06-18 Thread Jens Axboe
btrfs uses generic_file_read_iter(), which already supports this. Acked-by: Chris Mason Signed-off-by: Jens Axboe --- fs/btrfs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 2c14312b05e8..234a418eb6da 100644 ---

[PATCH 08/15] mm: support async buffered reads in generic_file_buffered_read()

2020-06-18 Thread Jens Axboe
Use the async page locking infrastructure, if IOCB_WAITQ is set in the passed in iocb. The caller must expect an -EIOCBQUEUED return value, which means that IO is started but not done yet. This is similar to how O_DIRECT signals the same operation. Once the callback is received by the caller for

[PATCH 13/15] ext4: flag as supporting buffered async reads

2020-06-18 Thread Jens Axboe
ext4 uses generic_file_read_iter(), which already supports this. Cc: Theodore Ts'o Signed-off-by: Jens Axboe --- fs/ext4/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext4/file.c b/fs/ext4/file.c index 2a01e31a032c..1e827410e9e1 100644 --- a/fs/ext4/file.c +++

[PATCH 03/15] io_uring: catch -EIO from buffered issue request failure

2020-06-18 Thread Jens Axboe
-EIO bubbles up like -EAGAIN if we fail to allocate a request at the lower level. Play it safe and treat it like -EAGAIN in terms of sync retry, to avoid passing back an errant -EIO. Catch some of these early for block based file, as non-mq devices generally do not support NOWAIT. That saves us

[PATCH 05/15] mm: allow read-ahead with IOCB_NOWAIT set

2020-06-18 Thread Jens Axboe
The read-ahead shouldn't block, so allow it to be done even if IOCB_NOWAIT is set in the kiocb. Acked-by: Johannes Weiner Signed-off-by: Jens Axboe --- mm/filemap.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/mm/filemap.c b/mm/filemap.c index f0ae9a6308cb..3378d4fca883 100644 ---

[PATCH 14/15] mm: add kiocb_wait_page_queue_init() helper

2020-06-18 Thread Jens Axboe
Checks if the file supports it, and initializes the values that we need. Caller passes in 'data' pointer, if any, and the callback function to be used. Acked-by: Johannes Weiner Signed-off-by: Jens Axboe --- include/linux/pagemap.h | 21 + 1 file changed, 21 insertions(+)

[PATCH 10/15] block: flag block devices as supporting IOCB_WAITQ

2020-06-18 Thread Jens Axboe
Signed-off-by: Jens Axboe --- fs/block_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/block_dev.c b/fs/block_dev.c index 47860e589388..54720c90dad0 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -1850,7 +1850,7 @@ static int blkdev_open(struct inode * inode,

[PATCH 11/15] xfs: flag files as supporting buffered async reads

2020-06-18 Thread Jens Axboe
XFS uses generic_file_read_iter(), which already supports this. Acked-by: Darrick J. Wong Signed-off-by: Jens Axboe --- fs/xfs/xfs_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index 00db81eac80d..fdbff4860d61 100644 ---

[PATCH 15/15] io_uring: support true async buffered reads, if file provides it

2020-06-18 Thread Jens Axboe
If the file is flagged with FMODE_BUF_RASYNC, then we don't have to punt the buffered read to an io-wq worker. Instead we can rely on page unlocking callbacks to support retry based async IO. This is a lot more efficient than doing async thread offload. The retry is done similarly to how we

[PATCH 02/15] io_uring: always plug for any number of IOs

2020-06-18 Thread Jens Axboe
Currently we only plug if we're doing more than two request. We're going to be relying on always having the plug there to pass down information, so plug unconditionally. Signed-off-by: Jens Axboe --- fs/io_uring.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff

[no subject]

2020-06-18 Thread Jens Axboe
We technically support this already through io_uring, but it's implemented with a thread backend to support cases where we would block. This isn't ideal. After a few prep patches, the core of this patchset is adding support for async callbacks on page unlock. With this primitive, we can simply

[tip: locking/core] lockdep: Split header file into lockdep and lockdep_types

2020-06-18 Thread tip-bot2 for Herbert Xu
The following commit has been merged into the locking/core branch of tip: Commit-ID: c935cd62d3fe985d7f0ebea185d2759e8992e96f Gitweb: https://git.kernel.org/tip/c935cd62d3fe985d7f0ebea185d2759e8992e96f Author:Herbert Xu AuthorDate:Wed, 17 Jun 2020 17:17:19 +10:00

Re: [Linaro-mm-sig] [PATCH 04/18] dma-fence: prime lockdep annotations

2020-06-18 Thread Daniel Vetter
On Wed, Jun 17, 2020 at 12:29:40PM -0300, Jason Gunthorpe wrote: > On Wed, Jun 17, 2020 at 09:57:54AM +0200, Daniel Vetter wrote: > > > > At the very least I think there should be some big warning that > > > dma_fence in notifiers should be avoided. > > > > Yeah I'm working on documentation, and

Re: [PATCH 4/4] X86: Use KVM CR pin MSRs

2020-06-18 Thread Dave Hansen
On 6/17/20 12:07 PM, John Andersen wrote: > diff --git a/Documentation/admin-guide/kernel-parameters.txt > b/Documentation/admin-guide/kernel-parameters.txt > index 89386f6f3ab6..54fb2b5ab8fc 100644 > --- a/Documentation/admin-guide/kernel-parameters.txt > +++

Re: linux-next: Tree for Jun 18 (fs/io_uring)

2020-06-18 Thread Jens Axboe
On 6/17/20 11:38 PM, Randy Dunlap wrote: > On 6/17/20 9:15 PM, Stephen Rothwell wrote: >> Hi all, >> >> News: there will be no linux-next release tomorrow. >> >> Changes since 20200617: >> > > when CONFIG_BLOCK is not set/enabled: > > ../fs/io_uring.c: In function 'io_async_task_func': >

[PATCH][next] taprio: Use struct_size() in kzalloc()

2020-06-18 Thread Gustavo A. R. Silva
Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. Also, remove unnecessary variable _size_. This code was detected with the help of Coccinelle and, audited and fixed manually. Signed-off-by: Gustavo A. R. Silva ---

Re: [PATCH] staging: rtl8723bs: os_dep: ioctl_cfg80211: fixed code styl issues

2020-06-18 Thread Dan Carpenter
On Thu, Jun 18, 2020 at 04:10:02PM +0200, Shihab Rashed wrote: > Fixed two brace coding style issues and one comment style issue found by > checkpatch. > > Signed-off-by: Shihab Rashed > --- > drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 15 +++ > 1 file changed, 7

Re: [PATCH AUTOSEL 5.7 004/388] ASoC: tegra: tegra_wm8903: Support nvidia, headset property

2020-06-18 Thread Mark Brown
On Thu, Jun 18, 2020 at 10:30:46AM -0400, Sasha Levin wrote: > On Thu, Jun 18, 2020 at 12:00:23PM +0100, Mark Brown wrote: > > On Wed, Jun 17, 2020 at 09:01:41PM -0400, Sasha Levin wrote: > > > From: Dmitry Osipenko > > > > > > [ Upstream commit 3ef9d5073b552d56bd6daf2af1e89b7e8d4df183 ] > > >

Re: [PATCH] drm/arm: fix unintentional integer overflow on left shift

2020-06-18 Thread Colin Ian King
On 18/06/2020 15:36, Garrit Franke wrote: > Hi all, newbie here. > Can the BIT macro be safely used on other parts of the kernel as well? > Just using git grep "1 <<" returns a ton of results where bit shifting > is used the old fashioned way. The BIT macro casts the 1 it a UL before shifting so

Re: [PATCH 07/25] mm/csky: Use mm_fault_accounting()

2020-06-18 Thread Peter Xu
On Wed, Jun 17, 2020 at 01:15:31PM -0700, Linus Torvalds wrote: > On Wed, Jun 17, 2020 at 12:58 PM Peter Xu wrote: > > > > But currently remote GUP will still do the page fault accounting on the > > remote > > task_struct, am I right? E.g., when the get_user_pages_remote() is called > > with >

[tip: x86/cpu] x86/stackprotector: Pre-initialize canary for secondary CPUs

2020-06-18 Thread tip-bot2 for Brian Gerst
The following commit has been merged into the x86/cpu branch of tip: Commit-ID: c9a1ff316bc9b1d1806a4366d0aef6e18833ba52 Gitweb: https://git.kernel.org/tip/c9a1ff316bc9b1d1806a4366d0aef6e18833ba52 Author:Brian Gerst AuthorDate:Wed, 17 Jun 2020 18:56:24 -04:00 Committer:

Re: [v3 PATCH 1/2] lockdep: Split header file into lockdep and lockdep_types

2020-06-18 Thread Peter Zijlstra
On Wed, Jun 17, 2020 at 02:24:50PM +0200, Petr Mladek wrote: > On Wed 2020-06-17 10:24:59, Peter Zijlstra wrote: > > On Wed, Jun 17, 2020 at 05:17:19PM +1000, Herbert Xu wrote: > > > There is a header file inclusion loop between asm-generic/bug.h > > > and linux/kernel.h. This causes potential

Re: [PATCH] drm/arm: fix unintentional integer overflow on left shift

2020-06-18 Thread Garrit Franke
Hi all, newbie here. Can the BIT macro be safely used on other parts of the kernel as well? Just using git grep "1 <<" returns a ton of results where bit shifting is used the old fashioned way. Am Do., 18. Juni 2020 um 16:23 Uhr schrieb Liviu Dudau : > > On Thu, Jun 18, 2020 at 01:50:34PM +0100,

Re: [PATCH] arm64: dts: imx8mm-beacon: Fix voltages on LDO1 and LDO2

2020-06-18 Thread Shawn Guo
On Tue, May 26, 2020 at 08:43:24PM +0300, Daniel Baluta wrote: > On Tue, May 26, 2020 at 8:11 PM Adam Ford wrote: > > > > LDO1 and LDO2 settings are wrong and case the voltage to go above the > > maximum level of 2.15V permitted by the SoC to 3.0V. > > > > This patch is based on work done on the

Re: next/master bisection: baseline.login on ox820-cloudengines-pogoplug-series-3

2020-06-18 Thread Boris Brezillon
ures on kernelci.org but this one > >>> looks valid. > >>> > >>> See the kernel Oops due to a NULL pointer followed by a panic: > >>> > >>> > >>> https://storage.kernelci.org/next/master/next-20200618/arm/oxnas_v6_defcon

Re: [PATCH] arm64: dts: ls1028a: add one more thermal zone support

2020-06-18 Thread Shawn Guo
On Mon, May 25, 2020 at 03:38:27PM +0800, Yuantian Tang wrote: > There are 2 thermal zones in ls1028a soc. Current dts only > includes one. This patch adds the other thermal zone node > in dts to enable it. > > Signed-off-by: Yuantian Tang Applied, thanks.

[PATCH 2/2] nvmet: remove workarounds for gcc bug wrt unnamed fields in initializers

2020-06-18 Thread Niklas Cassel
Workarounds for gcc issues with initializers and anon unions was first introduced in commit e44ac588cd61 ("drivers/block/nvme-core.c: fix build with gcc-4.4.4"). The gcc bug in question has been fixed since gcc 4.6.0: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10676 The minimum gcc version for

[PATCH 1/2] nvme: remove workarounds for gcc bug wrt unnamed fields in initializers

2020-06-18 Thread Niklas Cassel
Workarounds for gcc issues with initializers and anon unions was first introduced in commit e44ac588cd61 ("drivers/block/nvme-core.c: fix build with gcc-4.4.4"). The gcc bug in question has been fixed since gcc 4.6.0: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10676 The minimum gcc version for

[PATCH] mm/debug_vm_pgtable: Fix build failure with powerpc 8xx

2020-06-18 Thread Christophe Leroy
Since commit 9e343b467c70 ("READ_ONCE: Enforce atomicity for {READ,WRITE}_ONCE() memory accesses"), READ_ONCE() cannot be used anymore to read complex page table entries. This leads to: CC mm/debug_vm_pgtable.o In file included from ./include/asm-generic/bug.h:5, from

Re: [PATCH AUTOSEL 5.7 004/388] ASoC: tegra: tegra_wm8903: Support nvidia, headset property

2020-06-18 Thread Sasha Levin
On Thu, Jun 18, 2020 at 12:00:23PM +0100, Mark Brown wrote: On Wed, Jun 17, 2020 at 09:01:41PM -0400, Sasha Levin wrote: From: Dmitry Osipenko [ Upstream commit 3ef9d5073b552d56bd6daf2af1e89b7e8d4df183 ] The microphone-jack state needs to be masked in a case of a 4-pin jack when microphone

Re: [PATCH v8 3/5] ARM: dts: add Protonic VT7 board

2020-06-18 Thread Shawn Guo
On Wed, May 20, 2020 at 05:41:14PM +0200, Oleksij Rempel wrote: > The Protonic VT7 is a mid-class ISObus Virtual Terminal with a 7 inch > touchscreen display. > > Reviewed-by: Rob Herring > Signed-off-by: Robin van der Gracht > Signed-off-by: David Jander > Signed-off-by: Oleksij Rempel > ---

Re: [PATCH AUTOSEL 5.7 280/388] vfio/pci: fix memory leaks of eventfd ctx

2020-06-18 Thread Sasha Levin
On Wed, Jun 17, 2020 at 07:25:01PM -0600, Alex Williamson wrote: On Wed, 17 Jun 2020 21:06:17 -0400 Sasha Levin wrote: From: Qian Cai [ Upstream commit 1518ac272e789cae8c555d69951b032a275b7602 ] Finished a qemu-kvm (-device vfio-pci,host=0001:01:00.0) triggers a few memory leaks after a

Re: [PATCH v8 2/5] ARM: dts: add Protonic WD2 board

2020-06-18 Thread Shawn Guo
On Wed, May 20, 2020 at 05:41:13PM +0200, Oleksij Rempel wrote: > Add support for the Protonic WD2 board, which is an internal development > platform for low-cost agricultural Virtual Terminals based on COTS tablets > and web applications. > It inherits from the PRTI6Q base class. > >

<    3   4   5   6   7   8   9   10   11   12   >