Re: [PATCH v4] lockdown,selinux: fix wrong subject in some SELinux lockdown checks

2021-09-15 Thread Paul Moore
On Mon, Sep 13, 2021 at 5:05 PM Paul Moore wrote: > > On Mon, Sep 13, 2021 at 10:02 AM Ondrej Mosnacek wrote: > > > > Commit 59438b46471a ("security,lockdown,selinux: implement SELinux > > lockdown") added an implementation of the locked_down LSM hook to > > SELinux, with the aim to restrict

Re: [PATCH v6 4/4] powerpc/64s: Initialize and use a temporary mm for patching on Radix

2021-09-15 Thread Jordan Niethe
On Thu, Sep 16, 2021 at 10:40 AM Christopher M. Riedl wrote: > > On Tue Sep 14, 2021 at 11:24 PM CDT, Jordan Niethe wrote: > > On Sat, Sep 11, 2021 at 12:39 PM Christopher M. Riedl > > wrote: > > > ... > > > +/* > > > + * This can be called for kernel text or a module. > > > + */ > > > +static

Re: [PATCH v6 4/4] powerpc/64s: Initialize and use a temporary mm for patching on Radix

2021-09-15 Thread Jordan Niethe
On Thu, Sep 16, 2021 at 10:38 AM Christopher M. Riedl wrote: > > On Sat Sep 11, 2021 at 4:14 AM CDT, Jordan Niethe wrote: > > On Sat, Sep 11, 2021 at 12:39 PM Christopher M. Riedl > > wrote: > > > > > > When code patching a STRICT_KERNEL_RWX kernel the page containing the > > > address to be

Re: [PATCH v6 4/4] powerpc/64s: Initialize and use a temporary mm for patching on Radix

2021-09-15 Thread Christopher M. Riedl
On Tue Sep 14, 2021 at 11:24 PM CDT, Jordan Niethe wrote: > On Sat, Sep 11, 2021 at 12:39 PM Christopher M. Riedl > wrote: > > ... > > +/* > > + * This can be called for kernel text or a module. > > + */ > > +static int map_patch_mm(const void *addr, struct patch_mapping > > *patch_mapping) > >

Re: [PATCH v6 4/4] powerpc/64s: Initialize and use a temporary mm for patching on Radix

2021-09-15 Thread Christopher M. Riedl
On Sat Sep 11, 2021 at 4:14 AM CDT, Jordan Niethe wrote: > On Sat, Sep 11, 2021 at 12:39 PM Christopher M. Riedl > wrote: > > > > When code patching a STRICT_KERNEL_RWX kernel the page containing the > > address to be patched is temporarily mapped as writeable. Currently, a > > per-cpu vmalloc

Re: [PATCH v6 1/4] powerpc/64s: Introduce temporary mm for Radix MMU

2021-09-15 Thread Christopher M. Riedl
On Sat Sep 11, 2021 at 3:26 AM CDT, Jordan Niethe wrote: > On Sat, Sep 11, 2021 at 12:35 PM Christopher M. Riedl > wrote: > > > > x86 supports the notion of a temporary mm which restricts access to > > temporary PTEs to a single CPU. A temporary mm is useful for situations > > where a CPU needs

Re: [PATCH v3 4/8] powerpc/pseries/svm: Add a powerpc version of cc_platform_has()

2021-09-15 Thread Borislav Petkov
On Wed, Sep 15, 2021 at 07:18:34PM +0200, Christophe Leroy wrote: > Could you please provide more explicit explanation why inlining such an > helper is considered as bad practice and messy ? Tom already told you to look at the previous threads. Let's read them together. This one, for example:

Re: [PATCH] swiotlb: set IO TLB segment size via cmdline

2021-09-15 Thread Jan Beulich
On 15.09.2021 15:37, Roman Skakun wrote: >>> From: Roman Skakun >>> >>> It is possible when default IO TLB size is not >>> enough to fit a long buffers as described here [1]. >>> >>> This patch makes a way to set this parameter >>> using cmdline instead of recompiling a kernel. >>> >>> [1]

Re: [PATCH v3 0/8] Implement generic cc_platform_has() helper function

2021-09-15 Thread Kuppuswamy, Sathyanarayanan
On 9/15/21 9:46 AM, Borislav Petkov wrote: Sathya, if you want to prepare the Intel variant intel_cc_platform_has() ontop of those and send it to me, that would be good because then I can integrate it all in one branch which can be used to base future work ontop. I have a Intel variant

Re: [PATCH v3 4/8] powerpc/pseries/svm: Add a powerpc version of cc_platform_has()

2021-09-15 Thread Christophe Leroy
Le 15/09/2021 à 12:08, Borislav Petkov a écrit : On Wed, Sep 15, 2021 at 10:28:59AM +1000, Michael Ellerman wrote: I don't love it, a new C file and an out-of-line call to then call back to a static inline that for most configuration will return false ... but whatever :) Yeah, hch thinks

Re: [PATCH v3 0/8] Implement generic cc_platform_has() helper function

2021-09-15 Thread Borislav Petkov
On Wed, Sep 08, 2021 at 05:58:31PM -0500, Tom Lendacky wrote: > This patch series provides a generic helper function, cc_platform_has(), > to replace the sme_active(), sev_active(), sev_es_active() and > mem_encrypt_active() functions. > > It is expected that as new confidential computing

Re: [PATCH v5 6/6] sched/fair: Consider SMT in ASYM_PACKING load balance

2021-09-15 Thread Vincent Guittot
On Sat, 11 Sept 2021 at 03:19, Ricardo Neri wrote: > > When deciding to pull tasks in ASYM_PACKING, it is necessary not only to > check for the idle state of the destination CPU, dst_cpu, but also of > its SMT siblings. > > If dst_cpu is idle but its SMT siblings are busy, performance suffers >

[PATCH] powerpc: warn on emulation of dcbz instruction

2021-09-15 Thread Christophe Leroy
dcbz instruction shouldn't be used on non-cached memory. Using it on non-cached memory can result in alignment exception and implies a heavy handling. Instead of silentely emulating the instruction and resulting in high performance degradation, warn whenever an alignment exception is taken due to

[PATCH] powerpc/32s: Fix kuap_kernel_restore()

2021-09-15 Thread Christophe Leroy
At interrupt exit, kuap_kernel_restore() calls kuap_unclok() with the value contained in regs->kuap. However, when regs->kuap contains 0x it means that KUAP was not unlocked so calling kuap_unlock() is unrelevant and results in jeopardising the contents of kernel space segment registers.

Re: [PATCH] swiotlb: set IO TLB segment size via cmdline

2021-09-15 Thread Christoph Hellwig
On Wed, Sep 15, 2021 at 03:49:52PM +0200, Jan Beulich wrote: > But the question remains: Why does the framebuffer need to be mapped > in a single giant chunk? More importantly: if you use dynamic dma mappings for your framebuffer you're doing something wrong.

Re: [PATCH] swiotlb: set IO TLB segment size via cmdline

2021-09-15 Thread Roman Skakun
Hi Jan, Thanks for the answer. >> From: Roman Skakun >> >> It is possible when default IO TLB size is not >> enough to fit a long buffers as described here [1]. >> >> This patch makes a way to set this parameter >> using cmdline instead of recompiling a kernel. >> >> [1]

[PATCH] video: fbdev: use memset_io() instead of memset()

2021-09-15 Thread Christophe Leroy
While investigating a lockup at startup on Powerbook 3400C, it was identified that the fbdev driver generates alignment exception at startup: --- interrupt: 600 at memset+0x60/0xc0 NIP: c0021414 LR: c03fc49c CTR: 7fff REGS: ca021c10 TRAP: 0600 Tainted: GW

[PATCH] serial: 8250: SERIAL_8250_FSL should not default to y when compile-testing

2021-09-15 Thread Geert Uytterhoeven
Commit b1442c55ce8977aa ("serial: 8250: extend compile-test coverage") added compile-test support to the Freescale 16550 driver. However, as SERIAL_8250_FSL is an invisible symbol, merely enabling COMPILE_TEST now enables this driver. Fix this by making SERIAL_8250_FSL visible. Tighten the

Re: [PATCH] pci: Rename pcibios_add_device to match

2021-09-15 Thread Niklas Schnelle
On Tue, 2021-09-14 at 01:27 +1000, Oliver O'Halloran wrote: > The general convention for pcibios_* hooks is that they're named after > the corresponding pci_* function they provide a hook for. The exception > is pcibios_add_device() which provides a hook for pci_device_add(). This > has been

Re: [PATCH v3 4/8] powerpc/pseries/svm: Add a powerpc version of cc_platform_has()

2021-09-15 Thread Borislav Petkov
On Wed, Sep 15, 2021 at 10:28:59AM +1000, Michael Ellerman wrote: > I don't love it, a new C file and an out-of-line call to then call back > to a static inline that for most configuration will return false ... but > whatever :) Yeah, hch thinks it'll cause a big mess otherwise:

Re: [PATCH trivial v2] powerpc/powernv/dump: Fix typo in comment

2021-09-15 Thread Joel Stanley
On Tue, 14 Sept 2021 at 14:38, Vasant Hegde wrote: > > Signed-off-by: Vasant Hegde Reviewed-by: Joel Stanley > --- > arch/powerpc/platforms/powernv/opal-dump.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/powerpc/platforms/powernv/opal-dump.c >

Re: [PATCH] powerpc/powernv/flash: Check OPAL flash calls exist before using

2021-09-15 Thread Vasant Hegde
On 9/15/21 11:53 AM, Michael Ellerman wrote: Vasant Hegde writes: Currently only FSP based powernv systems supports firmware update interfaces. Hence check that the token OPAL_FLASH_VALIDATE exists before initalising the flash driver. Signed-off-by: Vasant Hegde ---

Re: [PATCH] powerpc/powernv/flash: Check OPAL flash calls exist before using

2021-09-15 Thread Vasant Hegde
On 9/15/21 11:53 AM, Michael Ellerman wrote: Vasant Hegde writes: Currently only FSP based powernv systems supports firmware update interfaces. Hence check that the token OPAL_FLASH_VALIDATE exists before initalising the flash driver. Signed-off-by: Vasant Hegde ---

Re: [PATCH] powerpc/powernv/flash: Check OPAL flash calls exist before using

2021-09-15 Thread Michael Ellerman
Vasant Hegde writes: > Currently only FSP based powernv systems supports firmware update > interfaces. Hence check that the token OPAL_FLASH_VALIDATE exists > before initalising the flash driver. > > Signed-off-by: Vasant Hegde > --- > arch/powerpc/platforms/powernv/opal-flash.c | 4 > 1