[PATCH] ethernet: cxgb4: convert tasklets to use new tasklet_setup() API

2020-08-17 Thread Allen Pais
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais ---

[PATCH 01/20] ethernet: alteon: convert tasklets to use new tasklet_setup() API

2020-08-17 Thread Allen Pais
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais ---

[PATCH 00/20] ethernet: convert tasklets to use new tasklet_setup() API

2020-08-17 Thread Allen Pais
Commit 12cc923f1ccc ("tasklet: Introduce new initialization API")' introduced a new tasklet initialization API. This series converts all the crypto modules to use the new tasklet_setup() API Allen Pais (20): ethernet: alteon: convert tasklets to use new tasklet_setup() API ethernet: amd:

RE: [PATCH 09/11] x86: remove address space overrides using set_fs()

2020-08-17 Thread David Laight
From: Christoph Hellwig > Sent: 17 August 2020 08:32 > > Stop providing the possibility to override the address space using > set_fs() now that there is no need for that any more. To properly > handle the TASK_SIZE_MAX checking for 4 vs 5-level page tables on > x86 a new alternative is

Re: [PATCH v1] powerpc/process: Remove unnecessary #ifdef CONFIG_FUNCTION_GRAPH_TRACER

2020-08-17 Thread Naveen N. Rao
Christophe Leroy wrote: ftrace_graph_ret_addr() is always defined and returns 'ip' when CONFIG_FUNCTION GRAPH_TRACER is not set. So the #ifdef is not needed, remove it. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/process.c | 4 1 file changed, 4 deletions(-) LGTM.

Re: [PATCH 05/11] test_bitmap: skip user bitmap tests for !CONFIG_SET_FS

2020-08-17 Thread Christoph Hellwig
On Mon, Aug 17, 2020 at 09:50:05AM +0200, Christophe Leroy wrote: > > > Le 17/08/2020 à 09:32, Christoph Hellwig a écrit : >> We can't run the tests for userspace bitmap parsing if set_fs() doesn't >> exist. >> >> Signed-off-by: Christoph Hellwig >> --- >> lib/test_bitmap.c | 10 -- >>

Re: [PATCH 05/11] test_bitmap: skip user bitmap tests for !CONFIG_SET_FS

2020-08-17 Thread Christophe Leroy
Le 17/08/2020 à 09:32, Christoph Hellwig a écrit : We can't run the tests for userspace bitmap parsing if set_fs() doesn't exist. Signed-off-by: Christoph Hellwig --- lib/test_bitmap.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/test_bitmap.c

Re: remove the last set_fs() in common code, and remove it for x86 and powerpc

2020-08-17 Thread Christoph Hellwig
Adding Linus as I forgot to add him to the patch bomb, sorry.. On Mon, Aug 17, 2020 at 09:32:01AM +0200, Christoph Hellwig wrote: > Hi all, > > this series removes the last set_fs() used to force a kernel address > space for the uaccess code in the kernel read/write/splice code, and then > stops

[PATCH 11/11] powerpc: remove address space overrides using set_fs()

2020-08-17 Thread Christoph Hellwig
Stop providing the possibility to override the address space using set_fs() now that there is no need for that any more. Signed-off-by: Christoph Hellwig --- arch/powerpc/Kconfig | 1 - arch/powerpc/include/asm/processor.h | 7 --- arch/powerpc/include/asm/thread_info.h |

[PATCH 10/11] powerpc: use non-set_fs based maccess routines

2020-08-17 Thread Christoph Hellwig
Provide __get_kernel_nofault and __put_kernel_nofault routines to implement the maccess routines without messing with set_fs and without opening up access to user space. Signed-off-by: Christoph Hellwig --- arch/powerpc/include/asm/uaccess.h | 16 1 file changed, 16

[PATCH 09/11] x86: remove address space overrides using set_fs()

2020-08-17 Thread Christoph Hellwig
Stop providing the possibility to override the address space using set_fs() now that there is no need for that any more. To properly handle the TASK_SIZE_MAX checking for 4 vs 5-level page tables on x86 a new alternative is introduced, which just like the one in entry_64.S has to use the

[PATCH 08/11] x86: make TASK_SIZE_MAX usable from assembly code

2020-08-17 Thread Christoph Hellwig
For 64-bit the only hing missing was a strategic _AC, and for 32-bit we need to use __PAGE_OFFSET instead of PAGE_OFFSET in the TASK_SIZE definition to escape the explicit unsigned long cast. This just works because __PAGE_OFFSET is defined using _AC itself and thus never needs the cast anyway.

remove the last set_fs() in common code, and remove it for x86 and powerpc

2020-08-17 Thread Christoph Hellwig
Hi all, this series removes the last set_fs() used to force a kernel address space for the uaccess code in the kernel read/write/splice code, and then stops implementing the address space overrides entirely for x86 and powerpc. The file system part has been posted a few times, and the read/write

[PATCH 07/11] x86: move PAGE_OFFSET, TASK_SIZE & friends to page_{32, 64}_types.h

2020-08-17 Thread Christoph Hellwig
At least for 64-bit this moves them closer to some of the defines they are based on, and it prepares for using the TASK_SIZE_MAX definition from assembly. Signed-off-by: Christoph Hellwig --- arch/x86/include/asm/page_32_types.h | 11 +++ arch/x86/include/asm/page_64_types.h | 38

[PATCH 01/11] mem: remove duplicate ops for /dev/zero and /dev/null

2020-08-17 Thread Christoph Hellwig
There is no good reason to implement both the traditional ->read and ->write as well as the iter based ops. So implement just the iter based ones. Suggested-by: Al Viro Signed-off-by: Christoph Hellwig --- drivers/char/mem.c | 16 1 file changed, 16 deletions(-) diff --git

[PATCH 04/11] uaccess: add infrastructure for kernel builds with set_fs()

2020-08-17 Thread Christoph Hellwig
Add a CONFIG_SET_FS option that is selected by architecturess that implement set_fs, which is all of them initially. If the option is not set stubs for routines related to overriding the address space are provided so that architectures can start to opt out of providing set_fs. Signed-off-by:

[PATCH 06/11] lkdtm: disable set_fs-based tests for !CONFIG_SET_FS

2020-08-17 Thread Christoph Hellwig
Once we can't manipulate the address limit, we also can't test what happens when the manipulation is abused. Signed-off-by: Christoph Hellwig --- drivers/misc/lkdtm/bugs.c | 2 ++ drivers/misc/lkdtm/core.c | 4 drivers/misc/lkdtm/usercopy.c | 2 ++ 3 files changed, 8 insertions(+)

[PATCH 02/11] fs: don't allow kernel reads and writes without iter ops

2020-08-17 Thread Christoph Hellwig
Don't allow calling ->read or ->write with set_fs as a preparation for killing off set_fs. All the instances that we use kernel_read/write on are using the iter ops already. If a file has both the regular ->read/->write methods and the iter variants those could have different semantics for

[PATCH 03/11] fs: don't allow splice read/write without explicit ops

2020-08-17 Thread Christoph Hellwig
default_file_splice_write is the last piece of generic code that uses set_fs to make the uaccess routines operate on kernel pointers. It implements a "fallback loop" for splicing from files that do not actually provide a proper splice_read method. The usual file systems and other high bandwith

[PATCH 05/11] test_bitmap: skip user bitmap tests for !CONFIG_SET_FS

2020-08-17 Thread Christoph Hellwig
We can't run the tests for userspace bitmap parsing if set_fs() doesn't exist. Signed-off-by: Christoph Hellwig --- lib/test_bitmap.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/test_bitmap.c b/lib/test_bitmap.c index df903c53952bb9..49b1d25fbaf546 100644

[PATCH] powerpc/fixmap: Fix the size of the early debug area

2020-08-17 Thread Christophe Leroy
Commit ("03fd42d458fb powerpc/fixmap: Fix FIX_EARLY_DEBUG_BASE when page size is 256k") reworked the setup of the early debug area and mistakenly replaced 128 * 1024 by SZ_128. Change to SZ_128K to restore the original 128 kbytes size of the area. Fixes: 03fd42d458fb ("powerpc/fixmap: Fix

[PATCH v3] powerpc/numa: Restrict possible nodes based on platform

2020-08-17 Thread Srikar Dronamraju
As per draft LoPAPR (Revision 2.9_pre7), section B.5.3 "Run Time Abstaction Services (RTAS) Node at https://openpowerfoundation.org/wp-content/uploads/2020/07/LoPAR-20200611.pdf, there are 2 device tree property ibm,max-associativity-domains (which defines the maximum number of domains that the

[PATCH v1 3/4] powerpc/process: Remove useless #ifdef CONFIG_SPE

2020-08-17 Thread Christophe Leroy
cpu_has_feature(CPU_FTR_SPE) returns false when CONFIG_SPE is not set. There is no need to enclose the test in an #ifdef CONFIG_SPE. Remove it. CPU_FTR_SPE only exists on 32 bits. Define it as 0 on 64 bits. We have a couple of places like: #ifdef CONFIG_SPE if

[PATCH v1 4/4] powerpc/process: Remove useless #ifdef CONFIG_PPC_FPU

2020-08-17 Thread Christophe Leroy
Add a stub for __giveup_fpu() when CONFIG_PPC_FPU is not selected, as done for CONFIG_SPE and CONFIG_ALTIVEC. This allows to remove some #ifdef CONFIG_PPC_FPU. Also change one to IS_ENABLED(). Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/process.c | 9 - 1 file changed, 4

[PATCH v1 2/4] powerpc/process: Remove useless #ifdef CONFIG_ALTIVEC

2020-08-17 Thread Christophe Leroy
cpu_has_feature(CPU_FTR_ALTIVEC) returns false when CONFIG_ALTIVEC is not set. There is no need to enclose the test in an #ifdef CONFIG_ALTIVEC. Remove it. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/process.c | 4 1 file changed, 4 deletions(-) diff --git

<    1   2