Re: [PATCH net-next] ibmveth: fix kobj_to_dev.cocci warnings

2021-05-18 Thread Lijun Pan
> On May 18, 2021, at 9:28 PM, YueHaibing wrote: > > Use kobj_to_dev() instead of container_of() > > Generated by: scripts/coccinelle/api/kobj_to_dev.cocci > > Signed-off-by: YueHaibing > --- Acked-by: Lijun Pan > drivers/net/ethernet/ibm/ibmveth.c | 3 +-- > 1 file changed, 1 insertion(

Re: Linux powerpc new system call instruction and ABI

2021-05-18 Thread Nicholas Piggin
Excerpts from Nicholas Piggin's message of May 19, 2021 12:50 pm: > Excerpts from Dmitry V. Levin's message of May 19, 2021 9:13 am: >> Hi, >> >> On Thu, Jun 11, 2020 at 06:12:01PM +1000, Nicholas Piggin wrote: >> [...] >>> - Error handling: The consensus among kernel, glibc, and musl is to move t

Re: [PATCH v5 3/9] mm/mremap: Use pmd/pud_poplulate to update page table entries

2021-05-18 Thread Aneesh Kumar K.V
Nathan Chancellor writes: > Hi Aneesh, > > On Thu, Apr 22, 2021 at 11:13:17AM +0530, Aneesh Kumar K.V wrote: >> pmd/pud_populate is the right interface to be used to set the respective >> page table entries. Some architectures like ppc64 do assume that >> set_pmd/pud_at >> can only be used to se

Re: [PATCH v2 0/2] mm: unify the allocation of pglist_data instances

2021-05-18 Thread Miles Chen
On Wed, 2021-05-19 at 06:48 +0300, Mike Rapoport wrote: > On Wed, May 19, 2021 at 08:12:06AM +0800, Miles Chen wrote: > > On Tue, 2021-05-18 at 19:09 +0300, Mike Rapoport wrote: > > > Hello Miles, > > > > > > On Tue, May 18, 2021 at 05:24:44PM +0800, Miles Chen wrote: > > > > This patches is creat

Re: [PATCH v2 0/2] mm: unify the allocation of pglist_data instances

2021-05-18 Thread Mike Rapoport
On Wed, May 19, 2021 at 08:12:06AM +0800, Miles Chen wrote: > On Tue, 2021-05-18 at 19:09 +0300, Mike Rapoport wrote: > > Hello Miles, > > > > On Tue, May 18, 2021 at 05:24:44PM +0800, Miles Chen wrote: > > > This patches is created to fix the __pa() warning messages when > > > CONFIG_DEBUG_VIRTUA

Re: Linux powerpc new system call instruction and ABI

2021-05-18 Thread Nicholas Piggin
Excerpts from Dmitry V. Levin's message of May 19, 2021 9:13 am: > Hi, > > On Thu, Jun 11, 2020 at 06:12:01PM +1000, Nicholas Piggin wrote: > [...] >> - Error handling: The consensus among kernel, glibc, and musl is to move to >> using negative return values in r3 rather than CR0[SO]=1 to indica

[PATCH net-next] ibmveth: fix kobj_to_dev.cocci warnings

2021-05-18 Thread YueHaibing
Use kobj_to_dev() instead of container_of() Generated by: scripts/coccinelle/api/kobj_to_dev.cocci Signed-off-by: YueHaibing --- drivers/net/ethernet/ibm/ibmveth.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmveth.c b/drivers/net/ethernet/ib

[Bug 213069] kernel BUG at arch/powerpc/include/asm/book3s/64/hash-4k.h:147! Oops: Exception in kernel mode, sig: 5 [#1]

2021-05-18 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=213069 Michael Ellerman (mich...@ellerman.id.au) changed: What|Removed |Added Status|ASSIGNED|RESOLVED

Re: [PATCH v6 2/3] powerpc: Move script to check relocations at compile time in scripts/

2021-05-18 Thread Michael Ellerman
Alexandre Ghiti writes: > Relocating kernel at runtime is done very early in the boot process, so > it is not convenient to check for relocations there and react in case a > relocation was not expected. > > Powerpc architecture has a script that allows to check at compile time > for such unexpecte

Re: [PATCH v5 5/9] powerpc/mm/book3s64: Update tlb flush routines to take a page walk cache flush argument

2021-05-18 Thread Guenter Roeck
On 5/18/21 5:26 PM, Michael Ellerman wrote: [ ... ] That was the generic header change in the patch. I was commenting about the ppc64 specific change causing build failures. Ah, sorry. I wasn't aware that the following is valid C code void f1() { return f2(); ^^ } as long as f

[PATCH] powerpc: Kconfig: disable CONFIG_COMPAT for clang < 12

2021-05-18 Thread Nick Desaulniers
Until clang-12, clang would attempt to assemble 32b powerpc assembler in 64b emulation mode when using a 64b target triple with -m32, leading to errors during the build of the compat VDSO. Simply disable all of CONFIG_COMPAT; users should upgrade to the latest release of clang for proper support.

Re: [PATCH v5 5/9] powerpc/mm/book3s64: Update tlb flush routines to take a page walk cache flush argument

2021-05-18 Thread Segher Boessenkool
On Wed, May 19, 2021 at 10:26:22AM +1000, Michael Ellerman wrote: > Guenter Roeck writes: > > Ah, sorry. I wasn't aware that the following is valid C code > > > > void f1() > > { > > return f2(); > > ^^ > > } > > > > as long as f2() is void as well. Confusing, but we live and learn.

[PATCH v2] powerpc/powernv/pci: fix header guard

2021-05-18 Thread Nick Desaulniers
While looking at -Wundef warnings, the #if CONFIG_EEH stood out as a possible candidate to convert to #ifdef CONFIG_EEH. It seems that based on Kconfig dependencies it's not possible to build this file without CONFIG_EEH enabled, but based on upstream discussion, it's not clear yet that CONFIG_EEH

Re: [PATCH v5 5/9] powerpc/mm/book3s64: Update tlb flush routines to take a page walk cache flush argument

2021-05-18 Thread Michael Ellerman
Guenter Roeck writes: > On 5/17/21 6:55 AM, Aneesh Kumar K.V wrote: >> Guenter Roeck writes: >> >>> On 5/17/21 1:40 AM, Aneesh Kumar K.V wrote: On 5/15/21 10:05 PM, Guenter Roeck wrote: > On Thu, Apr 22, 2021 at 11:13:19AM +0530, Aneesh Kumar K.V wrote: >> >> ... >> >   extern vo

Re: [PATCH v2 0/2] mm: unify the allocation of pglist_data instances

2021-05-18 Thread Miles Chen
On Tue, 2021-05-18 at 19:09 +0300, Mike Rapoport wrote: > Hello Miles, > > On Tue, May 18, 2021 at 05:24:44PM +0800, Miles Chen wrote: > > This patches is created to fix the __pa() warning messages when > > CONFIG_DEBUG_VIRTUAL=y by unifying the allocation of pglist_data > > instances. > > > > In

Re: Linux powerpc new system call instruction and ABI

2021-05-18 Thread Dmitry V. Levin
Hi, On Thu, Jun 11, 2020 at 06:12:01PM +1000, Nicholas Piggin wrote: [...] > - Error handling: The consensus among kernel, glibc, and musl is to move to > using negative return values in r3 rather than CR0[SO]=1 to indicate error, > which matches most other architectures, and is closer to a fu

Re: [PATCH] powerpc: Kconfig: disable CONFIG_COMPAT for clang < 12

2021-05-18 Thread Nathan Chancellor
On 5/18/2021 1:58 PM, Nick Desaulniers wrote: Until clang-12, clang would attempt to assemble 32b powerpc assembler in 64b emulation mode when using a 64b target triple with -m32, leading to errors during the build of the compat VDSO. Simply disable all of CONFIG_COMPAT; users should upgrade to t

Re: [PATCH v2] powerpc/powernv/pci: fix header guard

2021-05-18 Thread Nathan Chancellor
On 5/18/2021 1:40 PM, Nick Desaulniers wrote: While looking at -Wundef warnings, the #if CONFIG_EEH stood out as a possible candidate to convert to #ifdef CONFIG_EEH. It seems that based on Kconfig dependencies it's not possible to build this file without CONFIG_EEH enabled, but based on upstrea

Re: [PATCH v5 3/9] mm/mremap: Use pmd/pud_poplulate to update page table entries

2021-05-18 Thread Nathan Chancellor
Hi Aneesh, On Thu, Apr 22, 2021 at 11:13:17AM +0530, Aneesh Kumar K.V wrote: > pmd/pud_populate is the right interface to be used to set the respective > page table entries. Some architectures like ppc64 do assume that > set_pmd/pud_at > can only be used to set a hugepage PTE. Since we are not se

Re: [PATCH v8 27/30] powerpc/kprobes: Don't allow breakpoints on suffixes

2021-05-18 Thread Gabriel Paubert
On Tue, May 18, 2021 at 08:43:39PM +0200, Christophe Leroy wrote: > > > Le 06/05/2020 à 05:40, Jordan Niethe a écrit : > > Do not allow inserting breakpoints on the suffix of a prefix instruction > > in kprobes. > > > > Signed-off-by: Jordan Niethe > > --- > > v8: Add this back from v3 > > ---

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

2021-05-18 Thread Ricardo Neri
On Fri, May 14, 2021 at 07:14:15PM -0700, Ricardo Neri wrote: > On Fri, May 14, 2021 at 11:47:45AM +0200, Peter Zijlstra wrote: > > On Thu, May 13, 2021 at 08:49:08AM -0700, Ricardo Neri wrote: > > > include/linux/sched/topology.h | 1 + > > > kernel/sched/fair.c| 101 +++

Re: [PATCH v8 27/30] powerpc/kprobes: Don't allow breakpoints on suffixes

2021-05-18 Thread Christophe Leroy
Le 06/05/2020 à 05:40, Jordan Niethe a écrit : Do not allow inserting breakpoints on the suffix of a prefix instruction in kprobes. Signed-off-by: Jordan Niethe --- v8: Add this back from v3 --- arch/powerpc/kernel/kprobes.c | 13 + 1 file changed, 13 insertions(+) diff --git

Re: [PATCH v2 0/2] mm: unify the allocation of pglist_data instances

2021-05-18 Thread Mike Rapoport
Hello Miles, On Tue, May 18, 2021 at 05:24:44PM +0800, Miles Chen wrote: > This patches is created to fix the __pa() warning messages when > CONFIG_DEBUG_VIRTUAL=y by unifying the allocation of pglist_data > instances. > > In current implementation of node_data, if CONFIG_NEED_MULTIPLE_NODES=y, >

[PATCH v2 1/2] mm: introduce prepare_node_data

2021-05-18 Thread Miles Chen
When CONFIG_NEED_MULTIPLE_NODES=y (CONFIG_NUMA=y), the pglist_data is allocated by a memblock API and stored in an array named node_data[]. When CONFIG_NEED_MULTIPLE_NODES=n (CONFIG_NUMA=n), the pglist_data is defined as global variable contig_page_data. The difference causes problems when we enabl

[PATCH v2 0/2] mm: unify the allocation of pglist_data instances

2021-05-18 Thread Miles Chen
This patches is created to fix the __pa() warning messages when CONFIG_DEBUG_VIRTUAL=y by unifying the allocation of pglist_data instances. In current implementation of node_data, if CONFIG_NEED_MULTIPLE_NODES=y, pglist_data is allocated by a memblock API. If CONFIG_NEED_MULTIPLE_NODES=n, we use a

[PATCH v2 2/2] mm: replace contig_page_data with node_data

2021-05-18 Thread Miles Chen
Replace contig_page_data with node_data. Change the definition of NODE_DATA(nid) from (&contig_page_data) to (node_data[0]). Remove contig_page_data from the tree. Cc: Mike Rapoport Cc: Baoquan He Cc: Kazu Signed-off-by: Miles Chen --- Documentation/admin-guide/kdump/vmcoreinfo.rst | 13

[PATCH v6 2/3] powerpc: Move script to check relocations at compile time in scripts/

2021-05-18 Thread Alexandre Ghiti
Relocating kernel at runtime is done very early in the boot process, so it is not convenient to check for relocations there and react in case a relocation was not expected. Powerpc architecture has a script that allows to check at compile time for such unexpected relocations: extract the common lo

[PATCH v6 0/3] Introduce 64b relocatable kernel

2021-05-18 Thread Alexandre Ghiti
After multiple attempts, this patchset is now based on the fact that the 64b kernel mapping was moved outside the linear mapping. The first patch allows to build relocatable kernels but is not selected by default. That patch should ease KASLR implementation a lot.

[PATCH v6 3/3] riscv: Check relocations at compile time

2021-05-18 Thread Alexandre Ghiti
Relocating kernel at runtime is done very early in the boot process, so it is not convenient to check for relocations there and react in case a relocation was not expected. There exists a script in scripts/ that extracts the relocations from vmlinux that is then used at postlink to check the reloc

[PATCH v6 1/3] riscv: Introduce CONFIG_RELOCATABLE

2021-05-18 Thread Alexandre Ghiti
This config allows to compile 64b kernel as PIE and to relocate it at any virtual address at runtime: this paves the way to KASLR. Runtime relocation is possible since relocation metadata are embedded into the kernel. Note that relocating at runtime introduces an overhead even if the kernel is loa

Re: [PATCH v6 00/15] Restricted DMA

2021-05-18 Thread Claire Chang
v7: https://lore.kernel.org/patchwork/cover/1431031/ On Mon, May 10, 2021 at 5:50 PM Claire Chang wrote: > > From: Claire Chang > > This series implements mitigations for lack of DMA access control on > systems without an IOMMU, which could result in the DMA accessing the > system memory at unex