linux-next: manual merge of the powerpc tree with the mm-stable tree

Stephen Rothwell posted 1 patch 1 year, 9 months ago
linux-next: manual merge of the powerpc tree with the mm-stable tree
Posted by Stephen Rothwell 1 year, 9 months ago
Hi all,

Today's linux-next merge of the powerpc tree got a conflict in:

  arch/powerpc/mm/pgtable_32.c

between commit:

  a5e8131a0329 ("arm64, powerpc, riscv, s390, x86: ptdump: refactor CONFIG_DEBUG_WX")

from the mm-stable tree and commit:

  8f17bd2f4196 ("powerpc: Handle error in mark_rodata_ro() and mark_initmem_nx()")

from the powerpc tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc arch/powerpc/mm/pgtable_32.c
index 12498017da8e,4be97b4a44f9..000000000000
--- a/arch/powerpc/mm/pgtable_32.c
+++ b/arch/powerpc/mm/pgtable_32.c
@@@ -164,21 -174,17 +174,14 @@@ static int __mark_rodata_ro(void
  	numpages = PFN_UP((unsigned long)__end_rodata) -
  		   PFN_DOWN((unsigned long)_stext);
  
- 	set_memory_ro((unsigned long)_stext, numpages);
+ 	return set_memory_ro((unsigned long)_stext, numpages);
+ }
+ 
+ void mark_rodata_ro(void)
+ {
+ 	int err = __mark_rodata_ro();
+ 
+ 	if (err)
+ 		panic("%s() failed, err = %d\n", __func__, err);
 -
 -	// mark_initmem_nx() should have already run by now
 -	ptdump_check_wx();
  }
  #endif
- 
- #if defined(CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC) && defined(CONFIG_DEBUG_PAGEALLOC)
- void __kernel_map_pages(struct page *page, int numpages, int enable)
- {
- 	unsigned long addr = (unsigned long)page_address(page);
- 
- 	if (PageHighMem(page))
- 		return;
- 
- 	if (enable)
- 		set_memory_p(addr, numpages);
- 	else
- 		set_memory_np(addr, numpages);
- }
- #endif /* CONFIG_DEBUG_PAGEALLOC */
Re: linux-next: manual merge of the powerpc tree with the mm-stable tree
Posted by Michael Ellerman 1 year, 9 months ago
Stephen Rothwell <sfr@canb.auug.org.au> writes:
> Hi all,
>
> Today's linux-next merge of the powerpc tree got a conflict in:
>
>   arch/powerpc/mm/pgtable_32.c
>
> between commit:
>
>   a5e8131a0329 ("arm64, powerpc, riscv, s390, x86: ptdump: refactor CONFIG_DEBUG_WX")
>
> from the mm-stable tree and commit:
>
>   8f17bd2f4196 ("powerpc: Handle error in mark_rodata_ro() and mark_initmem_nx()")
>
> from the powerpc tree.

Thanks. That's a fairly ugly conflict.

Maybe I'll drop that patch until the generic change has gone in.

cheers
Re: linux-next: manual merge of the powerpc tree with the mm-stable tree
Posted by Christophe Leroy 1 year, 9 months ago

Le 29/02/2024 à 07:37, Michael Ellerman a écrit :
> Stephen Rothwell <sfr@canb.auug.org.au> writes:
>> Hi all,
>>
>> Today's linux-next merge of the powerpc tree got a conflict in:
>>
>>    arch/powerpc/mm/pgtable_32.c
>>
>> between commit:
>>
>>    a5e8131a0329 ("arm64, powerpc, riscv, s390, x86: ptdump: refactor CONFIG_DEBUG_WX")
>>
>> from the mm-stable tree and commit:
>>
>>    8f17bd2f4196 ("powerpc: Handle error in mark_rodata_ro() and mark_initmem_nx()")
>>
>> from the powerpc tree.
> 
> Thanks. That's a fairly ugly conflict.
> 
> Maybe I'll drop that patch until the generic change has gone in.
> 

The change is now in linus tree.

Christophe
Re: linux-next: manual merge of the powerpc tree with the mm-stable tree
Posted by Michael Ellerman 1 year, 9 months ago
Christophe Leroy <christophe.leroy@csgroup.eu> writes:
> Le 29/02/2024 à 07:37, Michael Ellerman a écrit :
>> Stephen Rothwell <sfr@canb.auug.org.au> writes:
>>> Hi all,
>>>
>>> Today's linux-next merge of the powerpc tree got a conflict in:
>>>
>>>    arch/powerpc/mm/pgtable_32.c
>>>
>>> between commit:
>>>
>>>    a5e8131a0329 ("arm64, powerpc, riscv, s390, x86: ptdump: refactor CONFIG_DEBUG_WX")
>>>
>>> from the mm-stable tree and commit:
>>>
>>>    8f17bd2f4196 ("powerpc: Handle error in mark_rodata_ro() and mark_initmem_nx()")
>>>
>>> from the powerpc tree.
>> 
>> Thanks. That's a fairly ugly conflict.
>> 
>> Maybe I'll drop that patch until the generic change has gone in.
>> 
>
> The change is now in linus tree.

Thanks. I have moved my next up and applied your v2 on top of the
upstream changes.

cheers