Re: [PATCH] powerpc/powermac/pfunc_base: Fix refcount leak bug in macio_gpio_init_one()

2022-08-01 Thread Benjamin Herrenschmidt
On Sat, 2022-07-16 at 15:31 +0800, Liang He wrote: > We should call of_node_put() for the reference 'gparent' escaped > out of the for_each_child_of_node() as it has increased the refcount. Same comment as before. That stuff happens once at boot, there's never any dynamic allocation/deallocation

Re: [PATCH] powerpc/powermac/udbg_scc: Fix refcount leak bug in udbg_scc_init()

2022-08-01 Thread Benjamin Herrenschmidt
On Sat, 2022-07-16 at 15:43 +0800, Liang He wrote: > During the iteration of for_each_child_of_node(), we need to call > of_node_put() for the old references stored in to 'ch_def' and 'ch_a' > as their refcounters have been increased in last iteration. None of these matter since those nodes are

[PATCH v4] PCI/ERR: Use pcie_aer_is_native() to judge whether OS owns AER

2022-08-01 Thread Zhuo Chen
Use pcie_aer_is_native() in place of "host->native_aer || pcie_ports_native" to judge whether OS has native control of AER in aer_root_reset() and pcie_do_recovery(). Replace "dev->aer_cap && (pcie_ports_native || host->native_aer)" in get_port_device_capability() with pcie_aer_is_native(), which

Re: [PATCH v3 1/2] lib: generic accessor functions for arch keystore

2022-08-01 Thread Michael Ellerman
Hi Greg, gjo...@linux.vnet.ibm.com writes: > From: Greg Joyce > > Generic kernel subsystems may rely on platform specific persistent > KeyStore to store objects containing sensitive key material. In such case, > they need to access architecture specific functions to perform read/write >

[PATCH v8 27/31] Kbuild: add Rust support

2022-08-01 Thread Miguel Ojeda
Having all the new files in place, we now enable Rust support in the build system, including `Kconfig` entries related to Rust, the Rust configuration printer, the target specification generation script, the version detection script and a few other bits. Co-developed-by: Alex Gaynor

[PATCH v8 00/31] Rust support

2022-08-01 Thread Miguel Ojeda
Rust support This is the patch series (v8) to add support for Rust as a second language to the Linux kernel. If you are interested in following this effort, please join us in the mailing list at: rust-for-li...@vger.kernel.org and take a look at the project itself at:

RE: [RFC] Remove DECNET support from kernel

2022-08-01 Thread David Laight
From: Stephen Hemminger > Sent: 31 July 2022 20:06 > To: net...@vger.kernel.org > > Decnet is an obsolete network protocol that receives more attention > from kernel janitors than users. It belongs in computer protocol > history museum not in Linux kernel. > > It has been Orphaned in kernel

Re: [PATCH v3 1/2] lib: generic accessor functions for arch keystore

2022-08-01 Thread Michal Suchánek
On Mon, Aug 01, 2022 at 03:45:45PM -0400, Nayna wrote: > > On 8/1/22 09:40, Michal Suchánek wrote: > > Hello, > > > > On Mon, Aug 01, 2022 at 07:34:25AM -0500, gjo...@linux.vnet.ibm.com wrote: > > > From: Greg Joyce > > > > > > Generic kernel subsystems may rely on platform specific persistent

Re: [PATCH v3 1/2] lib: generic accessor functions for arch keystore

2022-08-01 Thread Nayna
On 8/1/22 09:40, Michal Suchánek wrote: Hello, On Mon, Aug 01, 2022 at 07:34:25AM -0500, gjo...@linux.vnet.ibm.com wrote: From: Greg Joyce Generic kernel subsystems may rely on platform specific persistent KeyStore to store objects containing sensitive key material. In such case, they need

[PATCH AUTOSEL 5.10 2/7] powerpc/64s: Disable stack variable initialisation for prom_init

2022-08-01 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit be640317a1d0b9cf42fedb2debc2887a7cfa38de ] With GCC 12 allmodconfig prom_init fails to build: Error: External symbol 'memset' referenced from prom_init.c make[2]: *** [arch/powerpc/kernel/Makefile:204: arch/powerpc/kernel/prom_init_check] Error 1

[PATCH AUTOSEL 5.15 3/8] powerpc/64s: Disable stack variable initialisation for prom_init

2022-08-01 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit be640317a1d0b9cf42fedb2debc2887a7cfa38de ] With GCC 12 allmodconfig prom_init fails to build: Error: External symbol 'memset' referenced from prom_init.c make[2]: *** [arch/powerpc/kernel/Makefile:204: arch/powerpc/kernel/prom_init_check] Error 1

[PATCH AUTOSEL 5.18 04/10] powerpc/64s: Disable stack variable initialisation for prom_init

2022-08-01 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit be640317a1d0b9cf42fedb2debc2887a7cfa38de ] With GCC 12 allmodconfig prom_init fails to build: Error: External symbol 'memset' referenced from prom_init.c make[2]: *** [arch/powerpc/kernel/Makefile:204: arch/powerpc/kernel/prom_init_check] Error 1

Re: [PATCH] powerpc/pseries: add lparctl driver for platform-specific functions

2022-08-01 Thread Laurent Dufour
Le 30/07/2022 à 02:04, Nathan Lynch a écrit : > This adds a chardev+ioctl-based interface for user space to access pseries > platform-specific functions which don't easily fit elsewhere. > > The immediate motivation is to unbreak librtas[1] with kernel lockdown > enabled. librtas provides a thin

Re: [PATCH v3] random: handle archrandom with multiple longs

2022-08-01 Thread Harald Freudenberger
On 2022-07-19 15:02, Jason A. Donenfeld wrote: The archrandom interface was originally designed for x86, which supplies RDRAND/RDSEED for receiving random words into registers, resulting in one function to generate an int and another to generate a long. However, other architectures don't

Re: [PATCH v3 1/2] lib: generic accessor functions for arch keystore

2022-08-01 Thread Michal Suchánek
Hello, On Mon, Aug 01, 2022 at 07:34:25AM -0500, gjo...@linux.vnet.ibm.com wrote: > From: Greg Joyce > > Generic kernel subsystems may rely on platform specific persistent > KeyStore to store objects containing sensitive key material. In such case, > they need to access architecture specific

[PATCH v3 2/2] powerpc/pseries: Override lib/arch_vars.c functions

2022-08-01 Thread gjoyce
From: Greg Joyce Self Encrypting Drives(SED) make use of POWER LPAR Platform KeyStore for storing its variables. Thus the block subsystem needs to access PowerPC specific functions to read/write objects in PLPKS. Override the default implementations in lib/arch_vars.c file with PowerPC specific

[PATCH v3 1/2] lib: generic accessor functions for arch keystore

2022-08-01 Thread gjoyce
From: Greg Joyce Generic kernel subsystems may rely on platform specific persistent KeyStore to store objects containing sensitive key material. In such case, they need to access architecture specific functions to perform read/write operations on these variables. Define the generic variable

[PATCH v3 0/2] generic and PowerPC accessor functions for arch keystore

2022-08-01 Thread gjoyce
From: Greg Joyce Architectural neutral functions have been defined for accessing architecture specific variable store. The neutral functions are defined as weak so that they may be superseded by platform specific versions. PowerPC/pseries versions of these functions provide read/write access to

Re: [PATCH 2/2] powerpc/64: poison __per_cpu_offset to catch use-before-init

2022-08-01 Thread Michael Ellerman
Nicholas Piggin writes: > If the boot CPU tries to access per-cpu data of other CPUs before > per cpu areas are set up, it will unexpectedly use offset 0. > > Try to catch such accesses by poisoning the __per_cpu_offset array. I wasn't sure about this. On bare metal it's just an instant

[PATCH] selftests/powerpc: Avoid GCC 12 uninitialised variable warning

2022-08-01 Thread Michael Ellerman
GCC 12 thinks that `actual` might be used uninitialised. It's not, the use is guarded by `bad_mmcr2` which is only set to true at the same point where `actual` is initialised. cycles_with_mmcr2_test.c: In function ‘cycles_with_mmcr2’: cycles_with_mmcr2_test.c:81:17: error: ‘actual’ may be

Re: [PATCH v2 02/14] powerpc: Remove direct call to personality syscall handler

2022-08-01 Thread Andrew Donnellan
On Mon, 2022-07-25 at 16:25 +1000, Rohan McLure wrote: > Syscall handlers should not be invoked internally by their symbol > names, > as these symbols defined by the architecture-defined SYSCALL_DEFINE > macro. Fortunately, in the case of ppc64_personality, its call to > sys_personality can be

Re: [RFC] Remove DECNET support from kernel

2022-08-01 Thread David Ahern
On 7/31/22 1:06 PM, Stephen Hemminger wrote: > Decnet is an obsolete network protocol that receives more attention > from kernel janitors than users. It belongs in computer protocol > history museum not in Linux kernel. > > It has been Orphaned in kernel since 2010. > And the documentation link

Re: [PATCH] powerpc/85xx: P2020: Add law_trgt_if property to PCIe DT nodes

2022-08-01 Thread Pali Rohár
On Monday 01 August 2022 13:38:32 Michael Ellerman wrote: > Rob Herring writes: > > On Fri, Jul 29, 2022 at 7:17 AM Michael Ellerman > > wrote: > >> > >> On Wed, 4 May 2022 20:08:22 +0200, Pali Rohár wrote: > >> > DT law_trgt_if property defines Local Access Window Target Interface. > >> > > >>

Re: [PATCH linux-next] macintosh:adb:recordmcount:use !E in conditional statements

2022-08-01 Thread Michael Ellerman
cgel@gmail.com writes: > From: ye xingchen > > Use !E to replace the type of x == 0. This change is just to > simplify the code, no actual functional changes. > > Reported-by: Zeal Robot > Signed-off-by: ye xingchen > --- > drivers/macintosh/adb.c | 2 +- > 1 file changed, 1 insertion(+),