Re: [PATCH 2/2] mm: make copy_to_kernel_nofault() not fault on user addresses

2024-09-04 Thread Omar Sandoval
On Wed, Sep 04, 2024 at 09:50:56AM +0200, Christophe Leroy wrote: > Hi, > > Le 02/09/2024 à 07:31, Omar Sandoval a écrit : > > [Vous ne recevez pas souvent de courriers de osan...@osandov.com. Découvrez > > pourquoi ceci est important à https://aka.ms/LearnAbou

Re: [PATCH 0/2] mm: make copy_to_kernel_nofault() not fault on user addresses

2024-09-02 Thread Omar Sandoval
On Mon, Sep 02, 2024 at 10:56:27AM +0200, David Hildenbrand wrote: > On 02.09.24 08:31, Omar Sandoval wrote: > > On Mon, Sep 02, 2024 at 08:19:33AM +0200, Christophe Leroy wrote: > > > > > > > > > Le 02/09/2024 à 07:31, Omar Sandoval a écrit : > > > &

Re: [PATCH 0/2] mm: make copy_to_kernel_nofault() not fault on user addresses

2024-09-01 Thread Omar Sandoval
On Mon, Sep 02, 2024 at 08:19:33AM +0200, Christophe Leroy wrote: > > > Le 02/09/2024 à 07:31, Omar Sandoval a écrit : > > [Vous ne recevez pas souvent de courriers de osan...@osandov.com. Découvrez > > pourquoi ceci est important à https://aka.ms/LearnAbou

[PATCH 2/2] mm: make copy_to_kernel_nofault() not fault on user addresses

2024-09-01 Thread Omar Sandoval
From: Omar Sandoval I found that on x86, copy_to_kernel_nofault() still faults on addresses outside of the kernel address range (including NULL): # echo ttyS0 > /sys/module/kgdboc/parameters/kgdboc # echo g > /proc/sysrq-trigger ... [15]kdb> mm 0 1234 [ 94.652476] BUG: ke

[PATCH 0/2] mm: make copy_to_kernel_nofault() not fault on user addresses

2024-09-01 Thread Omar Sandoval
From: Omar Sandoval Hi, I hit a case where copy_to_kernel_nofault() will fault (lol): if the destination address is in userspace and x86 Supervisor Mode Access Prevention is enabled. Patch 2 has the details and the fix. Patch 1 renames a helper function so that its use in patch 2 makes more

[PATCH 1/2] mm: rename copy_from_kernel_nofault_allowed() to copy_kernel_nofault_allowed()

2024-09-01 Thread Omar Sandoval
From: Omar Sandoval All of the existing checks are applicable to both the "from" and "to" directions, and the next patch needs it for copy_to_kernel_nofault(). Signed-off-by: Omar Sandoval --- arch/arm/mm/fault.c | 2 +- arch/loongarch/mm/maccess.c | 2 +- ar

[PATCH 2/2] powerpc/crypto: don't build aes-gcm-p10 by default

2023-07-10 Thread Omar Sandoval
From: Omar Sandoval None of the other accelerated crypto modules are built by default. Signed-off-by: Omar Sandoval --- arch/powerpc/crypto/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/powerpc/crypto/Kconfig b/arch/powerpc/crypto/Kconfig index 81ae015861c0..97802c72317c

[PATCH 1/2] powerpc/crypto: fix missing skcipher dependency for aes-gcm-p10

2023-07-10 Thread Omar Sandoval
From: Omar Sandoval My stripped down configuration fails to build with: ERROR: modpost: "skcipher_walk_aead_encrypt" [arch/powerpc/crypto/aes-gcm-p10-crypto.ko] undefined! ERROR: modpost: "skcipher_walk_done" [arch/powerpc/crypto/aes-gcm-p10-crypto.ko] undefin

Re: [PATCH 2/2] Discard .note.gnu.property sections in generic NOTES

2022-09-19 Thread Omar Sandoval
On Mon, Sep 19, 2022 at 06:33:40PM +0100, Mark Brown wrote: > On Mon, Sep 19, 2022 at 10:26:17AM -0700, Omar Sandoval wrote: > > In general if you're going to CC someone into a thread please put > a note at the start of your mail explaining why, many of us get > copied on

Re: [PATCH 2/2] Discard .note.gnu.property sections in generic NOTES

2022-09-19 Thread Omar Sandoval
On Sat, Sep 17, 2022 at 06:31:20AM +, Christophe Leroy wrote: > > > Le 16/09/2022 à 21:40, Omar Sandoval a écrit : > > [Vous ne recevez pas souvent de courriers de osan...@osandov.com. D?couvrez > > pourquoi ceci est important ? https://aka.ms/LearnAbou

Re: [PATCH 2/2] Discard .note.gnu.property sections in generic NOTES

2022-09-16 Thread Omar Sandoval
On Tue, Apr 28, 2020 at 06:21:05AM -0700, H.J. Lu wrote: > With the command-line option, -mx86-used-note=yes, the x86 assembler > in binutils 2.32 and above generates a program property note in a note > section, .note.gnu.property, to encode used x86 ISAs and features. But > kernel linker script o