Re: [PATCH] tomoyo: don't special case PF_IO_WORKER for PF_KTHREAD

2021-03-26 Thread Jens Axboe
On 3/26/21 10:03 AM, Casey Schaufler wrote: > On 3/25/2021 5:44 PM, Jens Axboe wrote: >> The io_uring PF_IO_WORKER threads no longer have PF_KTHREAD set, so no >> need to special case them for credential checks. > > Could you cite the commit where that change was made? See previous reply, same

Re: [PATCH] Revert "Smack: Handle io_uring kernel thread privileges"

2021-03-26 Thread Jens Axboe
On 3/26/21 10:00 AM, Casey Schaufler wrote: > On 3/25/2021 5:42 PM, Jens Axboe wrote: >> This reverts commit 942cb357ae7d9249088e3687ee6a00ed2745a0c7. >> >> The io_uring PF_IO_WORKER threads no longer have PF_KTHREAD set, so no >> need to special case them for credential checks. > > Could you

Re: [PATCH] tomoyo: don't special case PF_IO_WORKER for PF_KTHREAD

2021-03-26 Thread Casey Schaufler
On 3/25/2021 5:44 PM, Jens Axboe wrote: > The io_uring PF_IO_WORKER threads no longer have PF_KTHREAD set, so no > need to special case them for credential checks. Could you cite the commit where that change was made? > > Cc: Tetsuo Handa > Signed-off-by: Jens Axboe > --- >

Re: [PATCH v5 1/5] mm,memory_hotplug: Allocate memmap from the added memory range

2021-03-26 Thread David Hildenbrand
On 26.03.21 16:31, Michal Hocko wrote: On Fri 26-03-21 15:53:41, David Hildenbrand wrote: On 26.03.21 15:38, Michal Hocko wrote: On Fri 26-03-21 09:52:58, David Hildenbrand wrote: [...] 2. We won't allocate kasan shadow memory. We most probably have to do it explicitly via

[patch V2 14/15] locking/rtmutex: Restrict the trylock WARN_ON() to debug

2021-03-26 Thread Thomas Gleixner
The warning as written is expensive and not really required for a production kernel. Make it depend on rt mutex debugging and use !in_task() for the condition which generates far better code and gives the same answer. Signed-off-by: Thomas Gleixner --- kernel/locking/rtmutex.c |2 +- 1 file

[patch V2 15/15] locking/rtmutex: Cleanup signal handling in __rt_mutex_slowlock()

2021-03-26 Thread Thomas Gleixner
From: Thomas Gleixner The signal handling in __rt_mutex_slowlock() is open coded. Use signal_pending_state() instead. Aside of the cleanup this also prepares for the RT lock substituions which require support for TASK_KILLABLE. Signed-off-by: Thomas Gleixner --- kernel/locking/rtmutex.c |

[patch V2 13/15] locking/rtmutex: Fix misleading comment in rt_mutex_postunlock()

2021-03-26 Thread Thomas Gleixner
Preemption is disabled in mark_wakeup_next_waiter() not in rt_mutex_slowunlock(). Signed-off-by: Thomas Gleixner --- kernel/locking/rtmutex.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/kernel/locking/rtmutex.c +++ b/kernel/locking/rtmutex.c @@ -1305,7 +1305,7 @@ void

[patch V2 12/15] locking/rtmutex: Consolidate the fast/slowpath invocation

2021-03-26 Thread Thomas Gleixner
The indirection via a function pointer (which is at least optimized into a tail call by the compiler) is making the code hard to read. Clean it up and move the futex related trylock functions down to the futex section. Move the wake_q wakeup into rt_mutex_slowunlock(). No point in handing it to

[patch V2 11/15] locking/rtmutex: Make text section and inlining consistent

2021-03-26 Thread Thomas Gleixner
rtmutex is half __sched and the other half is not. If the compiler decides to not inline larger static functions then part of the code ends up in the regular text section. There are also quite some performance related small helpers which are either static or plain inline. Force inline those which

[patch V2 09/15] locking/rtmutex: Decrapify __rt_mutex_init()

2021-03-26 Thread Thomas Gleixner
The conditional debug handling is just another layer of obfuscation. Split the function so rt_mutex_init_proxy_locked() can invoke the inner init and __rt_mutex_init() gets the full treatment. Signed-off-by: Thomas Gleixner --- kernel/locking/rtmutex.c| 10 --

[PATCH next 1/2] mfd: Add Renesas Synchronization Management Unit (SMU) support

2021-03-26 Thread min.li.xe
From: Min Li Add support for ClockMatrix(TM) and 82P33xxx families of timing and synchronization devices. The access interface can be either SPI or I2C. Currently, it will create 2 types of MFD devices, which are to be used by the corresponding rsmu character device driver and the PTP hardware

[patch V2 10/15] locking/rtmutex: Move debug functions as inlines into common header

2021-03-26 Thread Thomas Gleixner
There is no value in having two header files providing just empty stubs and a C file which implements trivial debug functions which can just be inlined. Signed-off-by: Thomas Gleixner --- kernel/locking/Makefile |2 - kernel/locking/rtmutex-debug.c | 65

[patch V2 08/15] locking/rtmutex: Remove pointless CONFIG_RT_MUTEXES=n stubs

2021-03-26 Thread Thomas Gleixner
None of these functions is used when CONFIG_RT_MUTEXES=n. Remove the gunk. Remove pointless comments and clean up the coding style mess while at it. Signed-off-by: Thomas Gleixner --- V2: Bring back the #ifdef and provide a proper stub for rt_mutex_owner() which is used unconditionally in

[patch V2 03/15] locking/rtmutex: Remove output from deadlock detector.

2021-03-26 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior The rtmutex specific deadlock detector predates lockdep coverage of rtmutex and since commit f5694788ad8da ("rt_mutex: Add lockdep annotations") it contains a lot of redundant functionality. - lockdep will detect an potential deadlock before rtmutex-debug has

[patch V2 05/15] locking/rtmutex: Remove empty and unused debug stubs

2021-03-26 Thread Thomas Gleixner
No users or useless and therefore just ballast. Signed-off-by: Thomas Gleixner --- V2: Remove them properly --- include/linux/rtmutex.h| 14 ++ kernel/locking/rtmutex-debug.c |9 - kernel/locking/rtmutex-debug.h |3 --- kernel/locking/rtmutex.c |

[patch V2 06/15] locking/rtmutex: Move rt_mutex_debug_task_free() to rtmutex.c

2021-03-26 Thread Thomas Gleixner
Prepare for removing the header maze. Signed-off-by: Thomas Gleixner --- kernel/locking/rtmutex-debug.c |6 -- kernel/locking/rtmutex.c |8 2 files changed, 8 insertions(+), 6 deletions(-) --- a/kernel/locking/rtmutex-debug.c +++ b/kernel/locking/rtmutex-debug.c @@

[patch V2 07/15] locking/rtmutex: Inline chainwalk depth check

2021-03-26 Thread Thomas Gleixner
There is no point for this wrapper at all. Signed-off-by: Thomas Gleixner --- kernel/locking/rtmutex.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) --- a/kernel/locking/rtmutex.c +++ b/kernel/locking/rtmutex.c @@ -343,14 +343,9 @@ static void rt_mutex_adjust_prio(struct

[patch V2 02/15] locking/rtmutex: Remove rtmutex deadlock tester leftovers

2021-03-26 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior The following debug members of struct rtmutex are unused: - save_state: No users - file,line: Printed if ::name is NULL. This is only used for non-futex locks so ::name is never NULL - magic: Assigned to NULL by rt_mutex_destroy(), no

[patch V2 04/15] locking/rtmutex: Consolidate rt_mutex_init()

2021-03-26 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior rt_mutex_init() only initializes lockdep if CONFIG_DEBUG_RT_MUTEXES is enabled which is fine because all lockdep variants select it, but there is no reason to do so. Move the function outside of the CONFIG_DEBUG_RT_MUTEXES block which removes #ifdeffery.

[patch V2 00/15] locking/rtmutex: Spring cleaning

2021-03-26 Thread Thomas Gleixner
This is V2 of this cleanup. V1 can be found here: https://lore.kernel.org/r/87h7kydka0@nanos.tec.linutronix.de While working on the rtmutex related RT bits we noticed quite some inconsistencies and bitrot in the rtmutex code. The series is based on

[patch V2 01/15] locking/rtmutex: Remove rt_mutex_timed_lock()

2021-03-26 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior rt_mutex_timed_lock() has no callers since commit c051b21f71d1f ("rtmutex: Confine deadlock logic to futex") Remove it. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner --- include/linux/rtmutex.h |3 --- kernel/locking/rtmutex.c |

Re: [PATCH] Revert "Smack: Handle io_uring kernel thread privileges"

2021-03-26 Thread Casey Schaufler
On 3/25/2021 5:42 PM, Jens Axboe wrote: > This reverts commit 942cb357ae7d9249088e3687ee6a00ed2745a0c7. > > The io_uring PF_IO_WORKER threads no longer have PF_KTHREAD set, so no > need to special case them for credential checks. Could you cite the commit making that change? I wouldn't want to

Re: [PATCH 0/3] Apple M1 DART IOMMU driver

2021-03-26 Thread Mark Kettenis
> From: Arnd Bergmann > Date: Thu, 25 Mar 2021 22:41:09 +0100 > > On Thu, Mar 25, 2021 at 8:53 AM Sven Peter wrote: > > On Tue, Mar 23, 2021, at 21:53, Rob Herring wrote: > > > > I'm probably just confused or maybe the documentation is outdated but I > > don't > > see how I could specify "this

[PATCH next 2/2] misc: Add Renesas Synchronization Management Unit (SMU) support

2021-03-26 Thread min.li.xe
From: Min Li This driver is developed for the IDT ClockMatrix(TM) and 82P33xxx families of timing and synchronization devices.It will be used by Renesas PTP Clock Manager for Linux (pcm4l) software to provide support to GNSS assisted partial timing support (APTS) and other networking timing

Re: [PATCH v3 01/17] cmdline: Add generic function to build command line.

2021-03-26 Thread Christophe Leroy
Le 26/03/2021 à 16:42, Rob Herring a écrit : On Fri, Mar 26, 2021 at 7:44 AM Christophe Leroy wrote: This code provides architectures with a way to build command line based on what is built in the kernel and what is handed over by the bootloader, based on selected compile-time options.

Re: [PATCH][next] cifs: cifspdu.h: Replace one-element array with flexible-array member

2021-03-26 Thread Aurélien Aptel
"Gustavo A. R. Silva" writes: > There is a regular need in the kernel to provide a way to declare having > a dynamically sized set of trailing elements in a structure. Kernel code > should always use “flexible array members”[1] for these cases. The older > style of one-element or zero-length

[PATCH] MAINTAINERS: Add CoreSight header files

2021-03-26 Thread Mathieu Poirier
Adding CoreSight headers to the list of supported files so that maintainers can be notified when changes are submitted. Signed-off-by: Mathieu Poirier --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index d92f85ca831d..caf7ad0bb12b 100644 ---

[PATCH] mm: cma: Add the CMA instance name to the cma_alloc_start trace event

2021-03-26 Thread Georgi Djakov
During CMA allocation, print also the name to identify the CMA instance. Suggested-by: Minchan Kim Signed-off-by: Georgi Djakov --- include/trace/events/cma.h | 9 ++--- mm/cma.c | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git

Re: [PATCHSET v2 0/7] Allow signals for IO threads

2021-03-26 Thread Jens Axboe
On 3/26/21 9:51 AM, Jens Axboe wrote: > Hi, > > For the v1 posting, see here: Sigh, just ignore the last 4 patches (07...10/10) in this series, there are sitting on top of this series and I messed up the git send-email. This patch series ends in the 4 reverts. -- Jens Axboe

[PATCH] Fixes: 65f183001f6e (staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_INTERRUPT_BASED_TXBCN*)

2021-03-26 Thread Fabio Aiuto
fix indentation broken by patch removing conditional code blocks checked by unused CONFIG_INTERRUPT_BASED_TXBCN family defines https://lore.kernel.org/r/9157000821fd6febf25566b8c712fad1995c7c78.1615907632.git.fabioaiut...@gmail.com Reported-by: Dan Carpenter Signed-off-by: Fabio Aiuto ---

[PATCH 08/10] io_uring: do post-completion chore on t-out cancel

2021-03-26 Thread Jens Axboe
From: Pavel Begunkov Don't forget about io_commit_cqring() + io_cqring_ev_posted() after exit/exec cancelling timeouts. Both functions declared only after io_kill_timeouts(), so to avoid tons of forward declarations move it down. Signed-off-by: Pavel Begunkov Link:

[PATCH 10/10] io_uring: don't cancel extra on files match

2021-03-26 Thread Jens Axboe
From: Pavel Begunkov As tasks always wait and kill their io-wq on exec/exit, files are of no more concern to us, so we don't need to specifically cancel them by hand in those cases. Moreover we should not, because io_match_task() looks at req->task->files now, which is always true and so leads

[PATCH 09/10] io_uring: don't cancel-track common timeouts

2021-03-26 Thread Jens Axboe
From: Pavel Begunkov Don't account usual timeouts (i.e. not linked) as REQ_F_INFLIGHT but keep behaviour prior to dd59a3d595cc1 ("io_uring: reliably cancel linked timeouts"). Signed-off-by: Pavel Begunkov Link:

[PATCH 06/10] Revert "signal: don't allow STOP on PF_IO_WORKER threads"

2021-03-26 Thread Jens Axboe
This reverts commit 4db4b1a0d1779dc159f7b87feb97030ec0b12597. The IO threads allow and handle SIGSTOP now, so don't special case them anymore in task_set_jobctl_pending(). Signed-off-by: Jens Axboe --- kernel/signal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[PATCH 4/7] Revert "signal: don't allow sending any signals to PF_IO_WORKER threads"

2021-03-26 Thread Jens Axboe
This reverts commit 5be28c8f85ce99ed2d329d2ad8bdd18ea19473a5. IO threads now take signals just fine, so there's no reason to limit them specifically. Revert the change that prevented that from happening. Signed-off-by: Jens Axboe --- kernel/signal.c | 3 --- 1 file changed, 3 deletions(-)

[PATCH 07/10] io_uring: fix timeout cancel return code

2021-03-26 Thread Jens Axboe
From: Pavel Begunkov When we cancel a timeout we should emit a sensible return code, like -ECANCELED but not 0, otherwise it may trick users. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/7b0ad1065e3bd1994722702bd0ba9e7bc9b0683b.1616696997.git.asml.sile...@gmail.com

[PATCH 5/7] Revert "kernel: treat PF_IO_WORKER like PF_KTHREAD for ptrace/signals"

2021-03-26 Thread Jens Axboe
This reverts commit 6fb8f43cede0e4bd3ead847de78d531424a96be9. The IO threads do allow signals now, including SIGSTOP, and we can allow ptrace attach. Attaching won't reveal anything interesting for the IO threads, but it will allow eg gdb to attach to a task with io_urings and IO threads without

[PATCH 05/10] Revert "kernel: freezer should treat PF_IO_WORKER like PF_KTHREAD for freezing"

2021-03-26 Thread Jens Axboe
This reverts commit 15b2219facadec583c24523eed40fa45865f859f. Before IO threads accepted signals, the freezer using take signals to wake up an IO thread would cause them to loop without any way to clear the pending signal. That is no longer the case, so stop special casing PF_IO_WORKER in the

[PATCH 6/7] Revert "kernel: freezer should treat PF_IO_WORKER like PF_KTHREAD for freezing"

2021-03-26 Thread Jens Axboe
This reverts commit 15b2219facadec583c24523eed40fa45865f859f. Before IO threads accepted signals, the freezer using take signals to wake up an IO thread would cause them to loop without any way to clear the pending signal. That is no longer the case, so stop special casing PF_IO_WORKER in the

[PATCH 7/7] Revert "signal: don't allow STOP on PF_IO_WORKER threads"

2021-03-26 Thread Jens Axboe
This reverts commit 4db4b1a0d1779dc159f7b87feb97030ec0b12597. The IO threads allow and handle SIGSTOP now, so don't special case them anymore in task_set_jobctl_pending(). Signed-off-by: Jens Axboe --- kernel/signal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[PATCH 04/10] Revert "kernel: treat PF_IO_WORKER like PF_KTHREAD for ptrace/signals"

2021-03-26 Thread Jens Axboe
This reverts commit 6fb8f43cede0e4bd3ead847de78d531424a96be9. The IO threads do allow signals now, including SIGSTOP, and we can allow ptrace attach. Attaching won't reveal anything interesting for the IO threads, but it will allow eg gdb to attach to a task with io_urings and IO threads without

[PATCH 2/7] io_uring: handle signals for IO threads like a normal thread

2021-03-26 Thread Jens Axboe
We go through various hoops to disallow signals for the IO threads, but there's really no reason why we cannot just allow them. The IO threads never return to userspace like a normal thread, and hence don't go through normal signal processing. Instead, just check for a pending signal as part of

[PATCH 3/7] kernel: stop masking signals in create_io_thread()

2021-03-26 Thread Jens Axboe
This is racy - move the blocking into when the task is created and we're marking it as PF_IO_WORKER anyway. The IO threads are now prepared to handle signals like SIGSTOP as well, so clear that from the mask to allow proper stopping of IO threads. Reported-by: Oleg Nesterov Signed-off-by: Jens

[PATCH 03/10] Revert "signal: don't allow sending any signals to PF_IO_WORKER threads"

2021-03-26 Thread Jens Axboe
This reverts commit 5be28c8f85ce99ed2d329d2ad8bdd18ea19473a5. IO threads now take signals just fine, so there's no reason to limit them specifically. Revert the change that prevented that from happening. Signed-off-by: Jens Axboe --- kernel/signal.c | 3 --- 1 file changed, 3 deletions(-)

[PATCH 1/7] kernel: don't call do_exit() for PF_IO_WORKER threads

2021-03-26 Thread Jens Axboe
Right now we're never calling get_signal() from PF_IO_WORKER threads, but in preparation for doing so, don't handle a fatal signal for them. The workers have state they need to cleanup when exiting, and they don't do coredumps, so just return instead of performing either a dump or calling

[PATCHSET v2 0/7] Allow signals for IO threads

2021-03-26 Thread Jens Axboe
Hi, For the v1 posting, see here: https://lore.kernel.org/io-uring/20210326003928.978750-1-ax...@kernel.dk/ I've run this through the usual testing, and it's running long term right now. I've tested the cases that Stefan reported, and we seem fine now. Changes since v1: - Catch fatal signals

Re: [PATCH v8] mm: cma: support sysfs

2021-03-26 Thread Minchan Kim
t; > Reviewed-by: Dmitry Osipenko > > Reviewed-by: Greg Kroah-Hartman > > Reviewed-by: John Hubbard > > Link: > > https://lore.kernel.org/linux-mm/20210316100433.17665-1-colin.k...@canonical.com/ > > Addresses-Coverity: ("Dereference after null check") > >

Re: [PATCH V2 3/5] tools/perf: Add powerpc support for PERF_SAMPLE_WEIGHT_STRUCT

2021-03-26 Thread Arnaldo
On March 26, 2021 12:23:04 PM GMT-03:00, Athira Rajeev wrote: > > >On 25-Mar-2021, at 1:13 AM, Jiri Olsa wrote: > >On Mon, Mar 22, 2021 at 10:57:25AM -0400, Athira Rajeev wrote: > >Add arch specific arch_evsel__set_sample_weight() to set the new >sample type for powerpc. > >Add arch specific

core.c:undefined reference to `cmpxchg8b_emu'

2021-03-26 Thread kernel test robot
-20210326 (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce (this is a W=1 build): # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5ca419f2864a2c60940dcf4bbaeb69546200e36f git remote add linus https://git.kernel.org/pub/scm/linux

Re: [PATCH v3 05/17] arm: Convert to GENERIC_CMDLINE

2021-03-26 Thread Christophe Leroy
Le 26/03/2021 à 16:47, Rob Herring a écrit : On Fri, Mar 26, 2021 at 7:44 AM Christophe Leroy wrote: This converts the architecture to GENERIC_CMDLINE. Signed-off-by: Christophe Leroy --- arch/arm/Kconfig | 38 +--

Re: [PATCH v4 22/22] x86/fpu/xstate: Introduce boot-parameters to control state component support

2021-03-26 Thread Andy Lutomirski
On Fri, Mar 26, 2021 at 8:34 AM Len Brown wrote: > > On Thu, Mar 25, 2021 at 9:42 PM Andy Lutomirski wrote: > > > Regardless of what you call AMX, AMX requires kernel enabling. > > I submit, that after the generic XFD support is in place, > there is exactly 1 bit that needs to be flipped to

Re: [PATCH v3 05/17] arm: Convert to GENERIC_CMDLINE

2021-03-26 Thread Rob Herring
On Fri, Mar 26, 2021 at 7:44 AM Christophe Leroy wrote: > > This converts the architecture to GENERIC_CMDLINE. > > Signed-off-by: Christophe Leroy > --- > arch/arm/Kconfig | 38 +-- > arch/arm/kernel/atags_parse.c | 15 +- > 2 files

Re: [PATCH v23 18/28] mm/mmap: Add shadow stack pages to memory accounting

2021-03-26 Thread Yu, Yu-cheng
On 3/22/2021 3:57 AM, Kirill A. Shutemov wrote: On Tue, Mar 16, 2021 at 08:10:44AM -0700, Yu-cheng Yu wrote: Account shadow stack pages to stack memory. Signed-off-by: Yu-cheng Yu Reviewed-by: Kees Cook --- arch/x86/mm/pgtable.c | 7 +++ include/linux/pgtable.h | 11 +++

Re: [PATCH 1/1] block: fix trivial typos in comments

2021-03-26 Thread Jens Axboe
On 3/26/21 9:45 AM, Tom Saeger wrote: > On Fri, Mar 26, 2021 at 09:41:49AM -0600, Jens Axboe wrote: >> On 3/25/21 9:04 PM, Tom Saeger wrote: >>> >>> s/Additonal/Additional/ >>> s/assocaited/associated/ >>> s/assocaited/associated/ >>> s/assocating/associating/ >>> s/becasue/because/ >>>

Re: [PATCH 1/1] block: fix trivial typos in comments

2021-03-26 Thread Tom Saeger
On Fri, Mar 26, 2021 at 09:41:49AM -0600, Jens Axboe wrote: > On 3/25/21 9:04 PM, Tom Saeger wrote: > > > > s/Additonal/Additional/ > > s/assocaited/associated/ > > s/assocaited/associated/ > > s/assocating/associating/ > > s/becasue/because/ > > s/configred/configured/ > > s/deactive/deactivate/

Re: [RFC Part1 PATCH 03/13] x86: add a helper routine for the PVALIDATE instruction

2021-03-26 Thread Brijesh Singh
On 3/26/21 9:30 AM, Borislav Petkov wrote: > On Wed, Mar 24, 2021 at 11:44:14AM -0500, Brijesh Singh wrote: >> arch/x86/include/asm/sev-snp.h | 52 ++ > Hmm, a separate header. > > Yeah, I know we did sev-es.h but I think it all should be in a single > sev.h which

Re: [PATCH 2/4] exec: remove compat_do_execve

2021-03-26 Thread Andreas Schwab
On Mär 26 2021, Christoph Hellwig wrote: > Just call compat_do_execve instead. ITYM compat_do_execveat here. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."

Re: [PATCH v6 7/8] Documentation: Add documentation for the Brute LSM

2021-03-26 Thread John Wood
On Sun, Mar 21, 2021 at 12:50:47PM -0600, Jonathan Corbet wrote: > John Wood writes: > > > Add some info detailing what is the Brute LSM, its motivation, weak > > points of existing implementations, proposed solutions, enabling, > > disabling and self-tests. > > > > Signed-off-by: John Wood > >

Re: [PATCH v3 01/17] cmdline: Add generic function to build command line.

2021-03-26 Thread Rob Herring
On Fri, Mar 26, 2021 at 7:44 AM Christophe Leroy wrote: > > This code provides architectures with a way to build command line > based on what is built in the kernel and what is handed over by the > bootloader, based on selected compile-time options. Note that I have this patch pending:

Re: [PATCH 1/1] block: fix trivial typos in comments

2021-03-26 Thread Jens Axboe
On 3/25/21 9:04 PM, Tom Saeger wrote: > > s/Additonal/Additional/ > s/assocaited/associated/ > s/assocaited/associated/ > s/assocating/associating/ > s/becasue/because/ > s/configred/configured/ > s/deactive/deactivate/ > s/followings/following/ > s/funtion/function/ > s/heirarchy/hierarchy/ >

Re: [PATCH v4 22/22] x86/fpu/xstate: Introduce boot-parameters to control state component support

2021-03-26 Thread Len Brown
On Thu, Mar 25, 2021 at 9:50 PM Thomas Gleixner wrote: > Please provide the architectural document which guarantees that and does > so in a way that it can be evaluated by the kernel. Have not seen that, > so it does not exist at all. > > Future CPUID attributes are as useful as the tweet of

Re: [PATCH 9/9] sched,fair: Alternative sched_slice()

2021-03-26 Thread Vincent Guittot
On Fri, 26 Mar 2021 at 11:43, Peter Zijlstra wrote: > > The current sched_slice() seems to have issues; there's two possible > things that could be improved: > > - the 'nr_running' used for __sched_period() is daft when cgroups are >considered. Using the RQ wide h_nr_running seems like a

Re: [PATCH] mm/page_alloc: try oom if reclaim is unable to make forward progress

2021-03-26 Thread Michal Hocko
On Fri 26-03-21 11:22:54, Aaron Tomlin wrote: [...] > > Both reclaim and compaction maintain their own retries counters as they > > are targeting a different operation. Although the compaction really > > depends on the reclaim to do some progress. > > Yes. Looking at should_compact_retry() if the

Re: [PATCH v3 05/25] x86/sgx: Introduce virtual EPC for use by KVM guests

2021-03-26 Thread Dave Hansen
On 3/26/21 8:29 AM, Borislav Petkov wrote: > On Fri, Mar 26, 2021 at 08:17:38AM -0700, Dave Hansen wrote: >> We're working on a cgroup controller just for enclave pages that will >> apply to guest use and bare metal. It would have been nice to have up >> front, but we're trying to do things

Re: [PATCH v4 22/22] x86/fpu/xstate: Introduce boot-parameters to control state component support

2021-03-26 Thread Len Brown
On Thu, Mar 25, 2021 at 9:42 PM Andy Lutomirski wrote: > Regardless of what you call AMX, AMX requires kernel enabling. I submit, that after the generic XFD support is in place, there is exactly 1 bit that needs to be flipped to enable user applications to benefit from AMX. I submit the patch

Re: [PATCH] coresight-pmu.h: Fix a typo

2021-03-26 Thread Mathieu Poirier
Hi Bhaskar, On Fri, Mar 26, 2021 at 07:52:44PM +0530, Bhaskar Chowdhury wrote: > > s/orignally/originally/ Even if the change is trivial this changelog is insufficient. Moreover, if you found the problem with an automated tool, please add the name of the tool to the changelog. Thanks, Mathieu

Re: [PATCH v5 1/5] mm,memory_hotplug: Allocate memmap from the added memory range

2021-03-26 Thread Michal Hocko
On Fri 26-03-21 15:53:41, David Hildenbrand wrote: > On 26.03.21 15:38, Michal Hocko wrote: > > On Fri 26-03-21 09:52:58, David Hildenbrand wrote: [...] > > > 2. We won't allocate kasan shadow memory. We most probably have to do it > > > explicitly via

Re: [PATCH v3 05/25] x86/sgx: Introduce virtual EPC for use by KVM guests

2021-03-26 Thread Borislav Petkov
On Fri, Mar 26, 2021 at 08:17:38AM -0700, Dave Hansen wrote: > We're working on a cgroup controller just for enclave pages that will > apply to guest use and bare metal. It would have been nice to have up > front, but we're trying to do things incrementally. A cgroup controller > should solve he

Re: [PATCH 2/8] kernel: unmask SIGSTOP for IO threads

2021-03-26 Thread Jens Axboe
On 3/26/21 9:23 AM, Stefan Metzmacher wrote: > Am 26.03.21 um 16:01 schrieb Jens Axboe: >> On 3/26/21 7:48 AM, Oleg Nesterov wrote: >>> Jens, sorry, I got lost :/ >> >> Let's bring you back in :-) >> >>> On 03/25, Jens Axboe wrote: With IO threads accepting signals, including SIGSTOP,

Re: [PATCH v6 13/13] arm64: dts: imx8mq: Add node to G2 hardware

2021-03-26 Thread Ezequiel Garcia
On Fri, 2021-03-26 at 15:33 +0100, Benjamin Gaignard wrote: > > Le 26/03/2021 à 15:24, Philipp Zabel a écrit : > > On Thu, Mar 18, 2021 at 09:20:46AM +0100, Benjamin Gaignard wrote: > > > Split VPU node in two: one for G1 and one for G2 since they are > > > different hardware blocks. > > > Add

Re: [RFC PATCH] USB:ohci:fix ohci interruption problem

2021-03-26 Thread Alan Stern
On Fri, Mar 26, 2021 at 04:54:56PM +0800, Longfang Liu wrote: > When OHCI enters the S4 sleep state, the USB sleep process will call > check_root_hub_suspend() and ohci_bus_suspend() instead of > ohci_suspend() and ohci_bus_suspend(), this causes the OHCI interrupt > to not be closed. What on

Re: [PATCH v4 22/22] x86/fpu/xstate: Introduce boot-parameters to control state component support

2021-03-26 Thread Len Brown
On Thu, Mar 25, 2021 at 7:10 PM Dave Hansen wrote: > > On 3/25/21 3:59 PM, Len Brown wrote: > > We call AMX a "simple state feature" -- it actually requires NO KERNEL > > ENABLING > > above the generic state save/restore to fully support userspace AMX > > applications. > > > > While not all ISA

[PATCH] libnvdimm/region: Allow setting align attribute on regions without mappings

2021-03-26 Thread Tyler Hicks
The alignment constraint for namespace creation in a region was increased, from 2M to 16M, for non-PowerPC architectures in v5.7 with commit 2522afb86a8c ("libnvdimm/region: Introduce an 'align' attribute"). The thought behind the change was that region alignment should be uniform across all

Re: [PATCH v3 11/17] riscv: Convert to GENERIC_CMDLINE

2021-03-26 Thread Rob Herring
On Fri, Mar 26, 2021 at 8:20 AM Christophe Leroy wrote: > > > > Le 26/03/2021 à 15:08, Andreas Schwab a écrit : > > On Mär 26 2021, Christophe Leroy wrote: > > > >> diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c > >> index f8f15332caa2..e7c91ee478d1 100644 > >> ---

Re: [PATCH 2/8] kernel: unmask SIGSTOP for IO threads

2021-03-26 Thread Stefan Metzmacher
Am 26.03.21 um 16:01 schrieb Jens Axboe: > On 3/26/21 7:48 AM, Oleg Nesterov wrote: >> Jens, sorry, I got lost :/ > > Let's bring you back in :-) > >> On 03/25, Jens Axboe wrote: >>> >>> With IO threads accepting signals, including SIGSTOP, >> >> where can I find this change? Looks like I wasn't

Re: [PATCH 1/2] media: videobuf2: use dmabuf size for length

2021-03-26 Thread John Cox
Hi Helen >On 3/26/21 10:03 AM, John Cox wrote: >> Hi Helen >> >>> Hi John, >>> >>> On 3/25/21 7:20 AM, John Cox wrote: Hi > Always use dmabuf size when considering the length of the buffer. > Discard userspace provided length. > Fix length check error in _verify_length(),

Re: [PATCH v5] PCI: endpoint: Fix NULL pointer dereference for ->get_features()

2021-03-26 Thread Lorenzo Pieralisi
On Wed, 24 Mar 2021 15:46:09 +0530, Shradha Todi wrote: > get_features ops of pci_epc_ops may return NULL, causing NULL pointer > dereference in pci_epf_test_alloc_space function. Let us add a check for > pci_epc_feature pointer in pci_epf_test_bind before we access it to avoid > any such NULL

[PATCH] greybus: remove stray nul byte in apb_log_enable_read output

2021-03-26 Thread Rasmus Villemoes
Including a nul byte in the otherwise human-readable ascii output from this debugfs file is probably not intended. Signed-off-by: Rasmus Villemoes --- drivers/greybus/es2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/greybus/es2.c b/drivers/greybus/es2.c index

Re: [RFC PATCH 1/3] dt-bindings: display: simple: Add the panel on sc7180-trogdor-pompom

2021-03-26 Thread Rob Clark
On Fri, Mar 26, 2021 at 8:18 AM Rob Clark wrote: > > On Fri, Mar 26, 2021 at 5:38 AM Thierry Reding > wrote: > > > > On Wed, Mar 17, 2021 at 06:53:04PM -0700, Rob Clark wrote: > > > On Wed, Mar 17, 2021 at 4:27 PM Matthias Kaehlcke > > > wrote: > > > > > > > > On Tue, Mar 16, 2021 at

[GIT PULL] xen: branch for v5.12-rc5

2021-03-26 Thread Juergen Gross
Linus, Please git pull the following tag: git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git for-linus-5.12b-rc5-tag xen: branch for v5.12-rc5 It contains a small series with a more elegant fix of a problem which was originally fixed in rc2. Thanks. Juergen

Re: [PATCH v2 6/9] debugfs: Implement debugfs_create_str()

2021-03-26 Thread Peter Zijlstra
On Fri, Mar 26, 2021 at 03:58:37PM +0100, Rasmus Villemoes wrote: > > kmalloc(len + 2, ...); > > No, because nul-terminating the stuff you pass to > simple_read_from_buffer is pointless cargo-culting. Yeah, read_file_bool > does it, but that's just bogus. Urgh, feel yuck to not have it zero

Re: [PATCH v3 05/25] x86/sgx: Introduce virtual EPC for use by KVM guests

2021-03-26 Thread Dave Hansen
On 3/26/21 8:03 AM, Borislav Petkov wrote: > Let's say all guests start using enclaves and baremetal cannot start any > new ones anymore due to no more memory. Are we ok with that? Yes, for now. > What if baremetal creates a big fat enclave and starves guests all of a > sudden. Are we ok with

Re: [RFC PATCH 1/3] dt-bindings: display: simple: Add the panel on sc7180-trogdor-pompom

2021-03-26 Thread Rob Clark
On Fri, Mar 26, 2021 at 5:38 AM Thierry Reding wrote: > > On Wed, Mar 17, 2021 at 06:53:04PM -0700, Rob Clark wrote: > > On Wed, Mar 17, 2021 at 4:27 PM Matthias Kaehlcke wrote: > > > > > > On Tue, Mar 16, 2021 at 02:08:19PM -0700, Douglas Anderson wrote: > > > > The sc7180-trogdor-pompom board

[PATCH v3 09/16] objtool: Implicitly create reloc sections

2021-03-26 Thread Peter Zijlstra
Have elf_add_reloc() create the relocation section implicity. Suggested-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) --- tools/objtool/check.c |6 -- tools/objtool/elf.c |9 - tools/objtool/include/objtool/elf.h |1 -

[PATCH v3 16/16] objtool,x86: Rewrite retpoline thunk calls

2021-03-26 Thread Peter Zijlstra
When the compiler emits: "CALL __x86_indirect_thunk_\reg" for an indirect call, have objtool rewrite it to: ALTERNATIVE "call __x86_indirect_thunk_\reg", "call *%reg", ALT_NOT(X86_FEATURE_RETPOLINE) Additionally, in order to not emit endless identical

[PATCH v3 06/16] objtool: Fix static_call list generation

2021-03-26 Thread Peter Zijlstra
Currently objtool generates tail call entries in add_jump_destination() but waits until validate_branch() to generate the regular call entries, move these to add_call_destination() for consistency. Signed-off-by: Peter Zijlstra (Intel) --- tools/objtool/check.c | 18 +- 1 file

[PATCH v3 00/16] x86,objtool: Optimize !RETPOLINE

2021-03-26 Thread Peter Zijlstra
Hi, another week, another update :-) Respin of the !RETPOLINE optimization patches. Boris, the first 3 should probably go into tip/x86/core, it's an ungodly tangle since it relies on the insn decoder patches in tip/x86/core, the NOP patches in tip/x86/cpu and the alternative patches in

[PATCH v3 02/16] x86/alternatives: Optimize optimize_nops()

2021-03-26 Thread Peter Zijlstra
Currently optimize_nops() scans to see if the alternative starts with NOPs. However, the emit pattern is: 141: \oldinstr 142: .skip (len-(142b-141b)), 0x90 That is, when oldinstr is short, we pad the tail with NOPs. This case never gets optimized. Rewrite optimize_nops() to replace any

[PATCH v3 07/16] objtool: Rework rebuild_reloc logic

2021-03-26 Thread Peter Zijlstra
Instead of manually calling elf_rebuild_reloc_section() on sections we've called elf_add_reloc() on, have elf_write() DTRT. This makes it easier to add random relocations in places without carefully tracking when we're done and need to flush what section. Signed-off-by: Peter Zijlstra (Intel)

[PATCH v3 03/16] x86/retpoline: Simplify retpolines

2021-03-26 Thread Peter Zijlstra
Due to commit c9c324dc22aa ("objtool: Support stack layout changes in alternatives"), it is possible to simplify the retpolines. Currently our retpolines consist of 2 symbols, __x86_indirect_thunk_\reg, which is the compiler target, and __x86_retpoline_\reg, which is the actual retpoline. Both

[PATCH v3 15/16] objtool: Skip magical retpoline .altinstr_replacement

2021-03-26 Thread Peter Zijlstra
When the .altinstr_replacement is a retpoline, skip the alternative. We already special case retpolines anyway. Signed-off-by: Peter Zijlstra (Intel) --- tools/objtool/special.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) --- a/tools/objtool/special.c +++

[PATCH] debugfs: drop pointless nul-termination in debugfs_read_file_bool()

2021-03-26 Thread Rasmus Villemoes
simple_read_from_buffer() doesn't care about any bytes in the buffer beyond "available". Making the buffer nul-terminated is therefore completely pointless. Signed-off-by: Rasmus Villemoes --- fs/debugfs/file.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[PATCH v3 12/16] objtool: Add elf_create_undef_symbol()

2021-03-26 Thread Peter Zijlstra
Allow objtool to create undefined symbols; this allows creating relocations to symbols not currently in the symbol table. Signed-off-by: Peter Zijlstra (Intel) --- tools/objtool/elf.c | 60 tools/objtool/include/objtool/elf.h |1 2

[PATCH v3 11/16] objtool: Extract elf_symbol_add()

2021-03-26 Thread Peter Zijlstra
Create a common helper to add symbols. Signed-off-by: Peter Zijlstra (Intel) --- tools/objtool/elf.c | 56 1 file changed, 31 insertions(+), 25 deletions(-) --- a/tools/objtool/elf.c +++ b/tools/objtool/elf.c @@ -290,12 +290,39 @@ static

[PATCH v3 13/16] objtool: Keep track of retpoline call sites

2021-03-26 Thread Peter Zijlstra
Provide infrastructure for architectures to rewrite/augment compiler generated retpoline calls. Similar to what we do for static_call()s, keep track of the instructions that are retpoline calls. Use the same list_head, since a retpoline call cannot also be a static_call. Signed-off-by: Peter

[PATCH v3 14/16] objtool: Cache instruction relocs

2021-03-26 Thread Peter Zijlstra
Track the reloc of instructions to avoid having to look them up again later. (Technically x86 instructions can have two relocations, but not jumps and calls, for which we're using this.) Signed-off-by: Peter Zijlstra (Intel) --- tools/objtool/check.c | 28

[PATCH v3 10/16] objtool: Extract elf_strtab_concat()

2021-03-26 Thread Peter Zijlstra
Create a common helper to append strings to a strtab. Signed-off-by: Peter Zijlstra (Intel) --- tools/objtool/elf.c | 60 1 file changed, 38 insertions(+), 22 deletions(-) --- a/tools/objtool/elf.c +++ b/tools/objtool/elf.c @@ -666,13

[PATCH v3 08/16] objtool: Add elf_create_reloc() helper

2021-03-26 Thread Peter Zijlstra
We have 4 instances of adding a relocation. Create a common helper to avoid growing even more. Signed-off-by: Peter Zijlstra (Intel) --- tools/objtool/check.c | 78 ++-- tools/objtool/elf.c | 86 +++-

[PATCH v3 05/16] objtool: Per arch retpoline naming

2021-03-26 Thread Peter Zijlstra
The __x86_indirect_ naming is obviously not generic. Shorten to allow matching some additional magic names later. Signed-off-by: Peter Zijlstra (Intel) --- tools/objtool/arch/x86/decode.c |5 + tools/objtool/check.c|9 +++--

[PATCH v3 04/16] objtool: Correctly handle retpoline thunk calls

2021-03-26 Thread Peter Zijlstra
Just like JMP handling, convert a direct CALL to a retpoline thunk into a retpoline safe indirect CALL. Signed-off-by: Peter Zijlstra (Intel) --- tools/objtool/check.c | 12 1 file changed, 12 insertions(+) --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -953,6

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