linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] PS3 patches
@ 2023-01-03 17:51 Geoff Levand
  2023-01-03 17:51 ` [PATCH v2 1/2] powerpc/ps3: Change updateboltedpp panic to info Geoff Levand
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Geoff Levand @ 2023-01-03 17:51 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev

Hi Michael,

This v2 series is just the two PS3 specific patches of the v1 series.

-Geoff

The following changes since commit 88603b6dc419445847923fcb7fe5080067a30f98:

  Linux 6.2-rc2 (2023-01-01 13:53:16 -0800)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/geoff/ps3-linux.git for-merge-powerpc-2

for you to fetch changes up to 99e87549b17feca3494e9df6f4def04a9ec7c042:

  powerpc/ps3: Refresh ps3_defconfig (2023-01-03 09:42:16 -0800)

----------------------------------------------------------------
Geoff Levand (2):
      powerpc/ps3: Change updateboltedpp panic to info
      powerpc/ps3: Refresh ps3_defconfig

 arch/powerpc/configs/ps3_defconfig | 39 +++++++++++++++++---------------------
 arch/powerpc/platforms/ps3/htab.c  |  2 +-
 2 files changed, 18 insertions(+), 23 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH v2 2/2] powerpc/ps3: Refresh ps3_defconfig
  2023-01-03 17:51 [PATCH v2 0/2] PS3 patches Geoff Levand
  2023-01-03 17:51 ` [PATCH v2 1/2] powerpc/ps3: Change updateboltedpp panic to info Geoff Levand
@ 2023-01-03 17:51 ` Geoff Levand
  2023-02-15 12:41 ` [PATCH v2 0/2] PS3 patches Michael Ellerman
  2 siblings, 0 replies; 11+ messages in thread
From: Geoff Levand @ 2023-01-03 17:51 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev

Refresh ps3_defconfig for v6.2.

Signed-off-by: Geoff Levand <geoff@infradead.org>
---
 arch/powerpc/configs/ps3_defconfig | 39 +++++++++++++-----------------
 1 file changed, 17 insertions(+), 22 deletions(-)

diff --git a/arch/powerpc/configs/ps3_defconfig b/arch/powerpc/configs/ps3_defconfig
index 0a1b42c4f26a..52a8c5450ecb 100644
--- a/arch/powerpc/configs/ps3_defconfig
+++ b/arch/powerpc/configs/ps3_defconfig
@@ -1,8 +1,3 @@
-CONFIG_PPC64=y
-CONFIG_CELL_CPU=y
-CONFIG_ALTIVEC=y
-CONFIG_SMP=y
-CONFIG_NR_CPUS=2
 CONFIG_SYSVIPC=y
 CONFIG_POSIX_MQUEUE=y
 CONFIG_HIGH_RES_TIMERS=y
@@ -10,11 +5,12 @@ CONFIG_BLK_DEV_INITRD=y
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_EMBEDDED=y
 # CONFIG_PERF_EVENTS is not set
-# CONFIG_COMPAT_BRK is not set
-CONFIG_SLAB=y
 CONFIG_PROFILING=y
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
+CONFIG_PPC64=y
+CONFIG_CELL_CPU=y
+CONFIG_ALTIVEC=y
+CONFIG_SMP=y
+CONFIG_NR_CPUS=2
 # CONFIG_PPC_POWERNV is not set
 # CONFIG_PPC_PSERIES is not set
 # CONFIG_PPC_PMAC is not set
@@ -27,17 +23,20 @@ CONFIG_PS3_FLASH=y
 CONFIG_PS3_VRAM=m
 CONFIG_PS3_LPM=m
 # CONFIG_PPC_OF_BOOT_TRAMPOLINE is not set
-# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
-CONFIG_BINFMT_MISC=y
 CONFIG_KEXEC=y
 CONFIG_PPC_4K_PAGES=y
-# CONFIG_SPARSEMEM_VMEMMAP is not set
-# CONFIG_COMPACTION is not set
 CONFIG_SCHED_SMT=y
 CONFIG_PM=y
 CONFIG_PM_DEBUG=y
 # CONFIG_SECCOMP is not set
-# CONFIG_PCI is not set
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_BINFMT_MISC=y
+CONFIG_SLAB=y
+# CONFIG_COMPAT_BRK is not set
+# CONFIG_SPARSEMEM_VMEMMAP is not set
+# CONFIG_COMPACTION is not set
 CONFIG_NET=y
 CONFIG_PACKET=y
 CONFIG_UNIX=y
@@ -87,7 +86,6 @@ CONFIG_USB_USBNET=m
 # CONFIG_USB_NET_NET1080 is not set
 # CONFIG_USB_NET_CDC_SUBSET is not set
 # CONFIG_USB_NET_ZAURUS is not set
-CONFIG_INPUT_FF_MEMLESS=m
 CONFIG_INPUT_JOYDEV=m
 CONFIG_INPUT_EVDEV=m
 # CONFIG_INPUT_KEYBOARD is not set
@@ -110,13 +108,10 @@ CONFIG_SND=m
 # CONFIG_SND_DRIVERS is not set
 CONFIG_SND_USB_AUDIO=m
 CONFIG_HIDRAW=y
-CONFIG_HID_APPLE=m
 CONFIG_HID_BELKIN=m
 CONFIG_HID_CHERRY=m
 CONFIG_HID_EZKEY=m
 CONFIG_HID_TWINHAN=m
-CONFIG_HID_LOGITECH=m
-CONFIG_HID_LOGITECH_DJ=m
 CONFIG_HID_MICROSOFT=m
 CONFIG_HID_SUNPLUS=m
 CONFIG_HID_SMARTJOYPLUS=m
@@ -151,8 +146,12 @@ CONFIG_CIFS=m
 CONFIG_NLS=y
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ISO8859_1=y
+CONFIG_CRYPTO_PCBC=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_LZO=m
 CONFIG_CRC_CCITT=m
 CONFIG_CRC_T10DIF=y
+CONFIG_PRINTK_TIME=y
 CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
 CONFIG_MAGIC_SYSRQ=y
 CONFIG_DEBUG_MEMORY_INIT=y
@@ -163,7 +162,3 @@ CONFIG_DEBUG_LOCKDEP=y
 CONFIG_DEBUG_LIST=y
 CONFIG_RCU_CPU_STALL_TIMEOUT=60
 # CONFIG_FTRACE is not set
-CONFIG_CRYPTO_PCBC=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_LZO=m
-CONFIG_PRINTK_TIME=y
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v2 1/2] powerpc/ps3: Change updateboltedpp panic to info
  2023-01-03 17:51 [PATCH v2 0/2] PS3 patches Geoff Levand
@ 2023-01-03 17:51 ` Geoff Levand
  2023-01-09 17:41   ` Christophe Leroy
  2023-01-03 17:51 ` [PATCH v2 2/2] powerpc/ps3: Refresh ps3_defconfig Geoff Levand
  2023-02-15 12:41 ` [PATCH v2 0/2] PS3 patches Michael Ellerman
  2 siblings, 1 reply; 11+ messages in thread
From: Geoff Levand @ 2023-01-03 17:51 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev

Commit fdacae8a84024474afff234bdd1dbe19ad597a10 (powerpc: Activate
CONFIG_STRICT_KERNEL_RWX by default) causes ps3_hpte_updateboltedpp()
to be called.  Change the panic statment in ps3_hpte_updateboltedpp()
to a pr_info statement so that bootup can continue.

Signed-off-by: Geoff Levand <geoff@infradead.org>
---
 arch/powerpc/platforms/ps3/htab.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/ps3/htab.c b/arch/powerpc/platforms/ps3/htab.c
index c27e6cf85272..9de62bd52650 100644
--- a/arch/powerpc/platforms/ps3/htab.c
+++ b/arch/powerpc/platforms/ps3/htab.c
@@ -146,7 +146,7 @@ static long ps3_hpte_updatepp(unsigned long slot, unsigned long newpp,
 static void ps3_hpte_updateboltedpp(unsigned long newpp, unsigned long ea,
 	int psize, int ssize)
 {
-	panic("ps3_hpte_updateboltedpp() not implemented");
+	pr_info("ps3_hpte_updateboltedpp() not implemented");
 }
 
 static void ps3_hpte_invalidate(unsigned long slot, unsigned long vpn,
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 1/2] powerpc/ps3: Change updateboltedpp panic to info
  2023-01-03 17:51 ` [PATCH v2 1/2] powerpc/ps3: Change updateboltedpp panic to info Geoff Levand
@ 2023-01-09 17:41   ` Christophe Leroy
  2023-01-14 21:22     ` Geoff Levand
  0 siblings, 1 reply; 11+ messages in thread
From: Christophe Leroy @ 2023-01-09 17:41 UTC (permalink / raw)
  To: Geoff Levand, Michael Ellerman; +Cc: linuxppc-dev



Le 03/01/2023 à 18:51, Geoff Levand a écrit :
> Commit fdacae8a84024474afff234bdd1dbe19ad597a10 (powerpc: Activate
> CONFIG_STRICT_KERNEL_RWX by default) causes ps3_hpte_updateboltedpp()
> to be called.  Change the panic statment in ps3_hpte_updateboltedpp()
> to a pr_info statement so that bootup can continue.

But if I understand correctly, it means that CONFIG_STRICT_KERNEL_RWX 
won't work then.

So, shouldn't we keep the panic and forbid CONFIG_STRICT_KERNEL_RWX on PS3 ?


> 
> Signed-off-by: Geoff Levand <geoff@infradead.org>
> ---
>   arch/powerpc/platforms/ps3/htab.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/platforms/ps3/htab.c b/arch/powerpc/platforms/ps3/htab.c
> index c27e6cf85272..9de62bd52650 100644
> --- a/arch/powerpc/platforms/ps3/htab.c
> +++ b/arch/powerpc/platforms/ps3/htab.c
> @@ -146,7 +146,7 @@ static long ps3_hpte_updatepp(unsigned long slot, unsigned long newpp,
>   static void ps3_hpte_updateboltedpp(unsigned long newpp, unsigned long ea,
>   	int psize, int ssize)
>   {
> -	panic("ps3_hpte_updateboltedpp() not implemented");
> +	pr_info("ps3_hpte_updateboltedpp() not implemented");
>   }
>   
>   static void ps3_hpte_invalidate(unsigned long slot, unsigned long vpn,

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 1/2] powerpc/ps3: Change updateboltedpp panic to info
  2023-01-09 17:41   ` Christophe Leroy
@ 2023-01-14 21:22     ` Geoff Levand
  2023-01-16  0:06       ` Michael Ellerman
  0 siblings, 1 reply; 11+ messages in thread
From: Geoff Levand @ 2023-01-14 21:22 UTC (permalink / raw)
  To: Christophe Leroy, Michael Ellerman; +Cc: linuxppc-dev

Hi Christophe,

On 1/9/23 09:41, Christophe Leroy wrote:
> 
> 
> Le 03/01/2023 à 18:51, Geoff Levand a écrit :
>> Commit fdacae8a84024474afff234bdd1dbe19ad597a10 (powerpc: Activate
>> CONFIG_STRICT_KERNEL_RWX by default) causes ps3_hpte_updateboltedpp()
>> to be called.  Change the panic statment in ps3_hpte_updateboltedpp()
>> to a pr_info statement so that bootup can continue.
> 
> But if I understand correctly, it means that CONFIG_STRICT_KERNEL_RWX 
> won't work then.
> 
> So, shouldn't we keep the panic and forbid CONFIG_STRICT_KERNEL_RWX on PS3 ?

mmu_hash_ops.updateboltedpp returns void, so I can't return an error code to
indicate the feature is not supported.

I could do something like this in arch/powerpc/Kconfig:

-       select ARCH_HAS_STRICT_KERNEL_RWX       if (PPC_BOOK3S || PPC_8xx || 40x) && !HIBERNATION
+       select ARCH_HAS_STRICT_KERNEL_RWX       if (PPC_BOOK3S || PPC_8xx || 40x) && !PPC_PS3 && !HIBERNATION

But then the ppc64_defconfig would be built without STRICT_KERNEL_RWX.

I could do this in ps3_defconfig:

+# CONFIG_STRICT_KERNEL_RWX is not set
+# CONFIG_STRICT_MODULE_RWX is not set

But I don't like that way because it seems too easy for users to not add those
into a custom kernel config, and then they need to figure out what to do after
their kernel panics on startup.

What other 'clean' way is there?

-Geoff



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 1/2] powerpc/ps3: Change updateboltedpp panic to info
  2023-01-14 21:22     ` Geoff Levand
@ 2023-01-16  0:06       ` Michael Ellerman
  2023-01-16 20:08         ` Geoff Levand
  0 siblings, 1 reply; 11+ messages in thread
From: Michael Ellerman @ 2023-01-16  0:06 UTC (permalink / raw)
  To: Geoff Levand, Christophe Leroy; +Cc: linuxppc-dev

Geoff Levand <geoff@infradead.org> writes:
> On 1/9/23 09:41, Christophe Leroy wrote:
>> 
>> 
>> Le 03/01/2023 à 18:51, Geoff Levand a écrit :
>>> Commit fdacae8a84024474afff234bdd1dbe19ad597a10 (powerpc: Activate
>>> CONFIG_STRICT_KERNEL_RWX by default) causes ps3_hpte_updateboltedpp()
>>> to be called.  Change the panic statment in ps3_hpte_updateboltedpp()
>>> to a pr_info statement so that bootup can continue.
>> 
>> But if I understand correctly, it means that CONFIG_STRICT_KERNEL_RWX 
>> won't work then.
>> 
>> So, shouldn't we keep the panic and forbid CONFIG_STRICT_KERNEL_RWX on PS3 ?
>
> mmu_hash_ops.updateboltedpp returns void, so I can't return an error code to
> indicate the feature is not supported.

We could change that in the medium term.

> I could do something like this in arch/powerpc/Kconfig:
>
> -       select ARCH_HAS_STRICT_KERNEL_RWX       if (PPC_BOOK3S || PPC_8xx || 40x) && !HIBERNATION
> +       select ARCH_HAS_STRICT_KERNEL_RWX       if (PPC_BOOK3S || PPC_8xx || 40x) && !PPC_PS3 && !HIBERNATION
>
> But then the ppc64_defconfig would be built without STRICT_KERNEL_RWX.

Yeah that would be a pity.

We could do the above and disable PS3 in ppc64_defconfig, allowing
ppc64_defconfig to still have STRICT_KERNEL_RWX.

I assume actual PS3 users would use a ps3_defconfig anyway right?

Relatedly are there any actual PS3 users left? ;)

> I could do this in ps3_defconfig:
>
> +# CONFIG_STRICT_KERNEL_RWX is not set
> +# CONFIG_STRICT_MODULE_RWX is not set
>
> But I don't like that way because it seems too easy for users to not add those
> into a custom kernel config, and then they need to figure out what to do after
> their kernel panics on startup.

Yep agreed.

> What other 'clean' way is there?

If we want to have a multi-platform kernel image that can boot on PS3
and other platforms, and have strict kernel RWX, then we need some
runtime logic to deal with that.

I'd rather not do that though, because it adds complexity to deal with a
pretty obscure corner case, and I suspect no one really boots a
ppc64_defconfig on actual PS3 hardware these days.

So my preference is we disable PS3 in ppc64_defconfig, and make PS3
incompatible with STRICT_KERNEL_RWX.

cheers

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 1/2] powerpc/ps3: Change updateboltedpp panic to info
  2023-01-16  0:06       ` Michael Ellerman
@ 2023-01-16 20:08         ` Geoff Levand
  2023-01-17  7:26           ` Christophe Leroy
  0 siblings, 1 reply; 11+ messages in thread
From: Geoff Levand @ 2023-01-16 20:08 UTC (permalink / raw)
  To: Michael Ellerman, Christophe Leroy; +Cc: linuxppc-dev

Hi,

On 1/15/23 16:06, Michael Ellerman wrote:
> Geoff Levand <geoff@infradead.org> writes:
>> On 1/9/23 09:41, Christophe Leroy wrote:
>>>
>>>
>>> Le 03/01/2023 à 18:51, Geoff Levand a écrit :
>>>> Commit fdacae8a84024474afff234bdd1dbe19ad597a10 (powerpc: Activate
>>>> CONFIG_STRICT_KERNEL_RWX by default) causes ps3_hpte_updateboltedpp()
>>>> to be called.  Change the panic statment in ps3_hpte_updateboltedpp()
>>>> to a pr_info statement so that bootup can continue.
>>>
>>> But if I understand correctly, it means that CONFIG_STRICT_KERNEL_RWX 
>>> won't work then.
>>>
>>> So, shouldn't we keep the panic and forbid CONFIG_STRICT_KERNEL_RWX on PS3 ?
>>
>> mmu_hash_ops.updateboltedpp returns void, so I can't return an error code to
>> indicate the feature is not supported.
> 
> We could change that in the medium term.
> 
>> I could do something like this in arch/powerpc/Kconfig:
>>
>> -       select ARCH_HAS_STRICT_KERNEL_RWX       if (PPC_BOOK3S || PPC_8xx || 40x) && !HIBERNATION
>> +       select ARCH_HAS_STRICT_KERNEL_RWX       if (PPC_BOOK3S || PPC_8xx || 40x) && !PPC_PS3 && !HIBERNATION
>>
>> But then the ppc64_defconfig would be built without STRICT_KERNEL_RWX.
> 
> Yeah that would be a pity.
> 
> We could do the above and disable PS3 in ppc64_defconfig, allowing
> ppc64_defconfig to still have STRICT_KERNEL_RWX.

I really want to keep PS3 included in ppc64_defconfig.  Not that I expect
anyone to boot a ppc64_defconfig kernel on PS3, but that is one of the
'standard' configs that is built by some automated builders, and generally by
anyone doing changes to the powerpc arch, and I want to keep getting those
build tests for PS3.

> I assume actual PS3 users would use a ps3_defconfig anyway right?

Yeah, a derivative of it.  They are most likely are using 'Jailbreak' firmware
that allows them to run Linux in the gameos partition.

> Relatedly are there any actual PS3 users left? ;)

It seems there are more users now than a few years ago.  I think they buy PS5s
to play the latest games, and use their old console to mess around with Linux.
I generally get a private inquiry every 3 or 4 weeks.  Usually asking how to
update their kernel, or how to install a modern distro.

>> What other 'clean' way is there?
> 
> If we want to have a multi-platform kernel image that can boot on PS3
> and other platforms, and have strict kernel RWX, then we need some
> runtime logic to deal with that.
> 
> I'd rather not do that though, because it adds complexity to deal with a
> pretty obscure corner case, and I suspect no one really boots a
> ppc64_defconfig on actual PS3 hardware these days.
> 
> So my preference is we disable PS3 in ppc64_defconfig, and make PS3
> incompatible with STRICT_KERNEL_RWX.

As mentioned, I'd really like to keep PS3 included in ppc64_defconfig.  My
original patch that basically just ignores the call to
mmu_hash_ops.updateboltedpp allows that, and I haven't experienced any problems
with it yet.

My preference would be to keep PS3 in ppc64_defconfig, and either apply my
original patch, or I keep that patch in my ps3-linux repo on kernel.org. Then,
if we end up adding runtime support for RWX I then fixup PS3 to use that.

-Geoff



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 1/2] powerpc/ps3: Change updateboltedpp panic to info
  2023-01-16 20:08         ` Geoff Levand
@ 2023-01-17  7:26           ` Christophe Leroy
  2023-01-28 22:45             ` Geoff Levand
  0 siblings, 1 reply; 11+ messages in thread
From: Christophe Leroy @ 2023-01-17  7:26 UTC (permalink / raw)
  To: Geoff Levand, Michael Ellerman; +Cc: linuxppc-dev



Le 16/01/2023 à 21:08, Geoff Levand a écrit :
> Hi,
> 
> On 1/15/23 16:06, Michael Ellerman wrote:
>> Geoff Levand <geoff@infradead.org> writes:
>>> On 1/9/23 09:41, Christophe Leroy wrote:
>>>>
>>>>
>>>> Le 03/01/2023 à 18:51, Geoff Levand a écrit :
>>>>> Commit fdacae8a84024474afff234bdd1dbe19ad597a10 (powerpc: Activate
>>>>> CONFIG_STRICT_KERNEL_RWX by default) causes ps3_hpte_updateboltedpp()
>>>>> to be called.  Change the panic statment in ps3_hpte_updateboltedpp()
>>>>> to a pr_info statement so that bootup can continue.
>>>>
>>>> But if I understand correctly, it means that CONFIG_STRICT_KERNEL_RWX
>>>> won't work then.
>>>>
>>>> So, shouldn't we keep the panic and forbid CONFIG_STRICT_KERNEL_RWX on PS3 ?
>>>
>>> mmu_hash_ops.updateboltedpp returns void, so I can't return an error code to
>>> indicate the feature is not supported.
>>
>> We could change that in the medium term.
>>
>>> I could do something like this in arch/powerpc/Kconfig:
>>>
>>> -       select ARCH_HAS_STRICT_KERNEL_RWX       if (PPC_BOOK3S || PPC_8xx || 40x) && !HIBERNATION
>>> +       select ARCH_HAS_STRICT_KERNEL_RWX       if (PPC_BOOK3S || PPC_8xx || 40x) && !PPC_PS3 && !HIBERNATION
>>>
>>> But then the ppc64_defconfig would be built without STRICT_KERNEL_RWX.
>>
>> Yeah that would be a pity.
>>
>> We could do the above and disable PS3 in ppc64_defconfig, allowing
>> ppc64_defconfig to still have STRICT_KERNEL_RWX.
> 
> I really want to keep PS3 included in ppc64_defconfig.  Not that I expect
> anyone to boot a ppc64_defconfig kernel on PS3, but that is one of the
> 'standard' configs that is built by some automated builders, and generally by
> anyone doing changes to the powerpc arch, and I want to keep getting those
> build tests for PS3.
> 
>> I assume actual PS3 users would use a ps3_defconfig anyway right?
> 
> Yeah, a derivative of it.  They are most likely are using 'Jailbreak' firmware
> that allows them to run Linux in the gameos partition.
> 
>> Relatedly are there any actual PS3 users left? ;)
> 
> It seems there are more users now than a few years ago.  I think they buy PS5s
> to play the latest games, and use their old console to mess around with Linux.
> I generally get a private inquiry every 3 or 4 weeks.  Usually asking how to
> update their kernel, or how to install a modern distro.
> 
>>> What other 'clean' way is there?
>>
>> If we want to have a multi-platform kernel image that can boot on PS3
>> and other platforms, and have strict kernel RWX, then we need some
>> runtime logic to deal with that.
>>
>> I'd rather not do that though, because it adds complexity to deal with a
>> pretty obscure corner case, and I suspect no one really boots a
>> ppc64_defconfig on actual PS3 hardware these days.
>>
>> So my preference is we disable PS3 in ppc64_defconfig, and make PS3
>> incompatible with STRICT_KERNEL_RWX.
> 
> As mentioned, I'd really like to keep PS3 included in ppc64_defconfig.  My
> original patch that basically just ignores the call to
> mmu_hash_ops.updateboltedpp allows that, and I haven't experienced any problems
> with it yet.

When you say you have not experienced any problems with it, do you mean 
that STRICT_RWX works for you ? When you select CONFIG_DEBUG_RODATA_TEST 
it tells you that it works ? Otherwise it looks incorrect to enable 
something that doesn't work.

> 
> My preference would be to keep PS3 in ppc64_defconfig, and either apply my
> original patch, or I keep that patch in my ps3-linux repo on kernel.org. Then,
> if we end up adding runtime support for RWX I then fixup PS3 to use that.
> 

In that case I see two solutions:
1/ Implement updateboltedpp for PS3.
2/ Implement arch_parse_debug_rodata() to always set rodata_enabled = 
false on PS3, and update free_initmem() to only call mark_initmem_nx() 
when strict_kernel_rwx_enabled() returns true.

Christophe

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 1/2] powerpc/ps3: Change updateboltedpp panic to info
  2023-01-17  7:26           ` Christophe Leroy
@ 2023-01-28 22:45             ` Geoff Levand
  2023-02-10  0:51               ` Michael Ellerman
  0 siblings, 1 reply; 11+ messages in thread
From: Geoff Levand @ 2023-01-28 22:45 UTC (permalink / raw)
  To: Christophe Leroy, Michael Ellerman; +Cc: linuxppc-dev

On 1/16/23 23:26, Christophe Leroy wrote:
> Le 16/01/2023 à 21:08, Geoff Levand a écrit :
>>
>> As mentioned, I'd really like to keep PS3 included in ppc64_defconfig.  My
>> original patch that basically just ignores the call to
>> mmu_hash_ops.updateboltedpp allows that, and I haven't experienced any problems
>> with it yet.
> 
> When you say you have not experienced any problems with it, do you mean 
> that STRICT_RWX works for you ? When you select CONFIG_DEBUG_RODATA_TEST 
> it tells you that it works ? Otherwise it looks incorrect to enable 
> something that doesn't work.

What I mean is that the system boots up, and works as expected.
I have not tried with CONFIG_DEBUG_RODATA_TEST set.

>> My preference would be to keep PS3 in ppc64_defconfig, and either apply my
>> original patch, or I keep that patch in my ps3-linux repo on kernel.org. Then,
>> if we end up adding runtime support for RWX I then fixup PS3 to use that.
>>
> 
> In that case I see two solutions:
> 1/ Implement updateboltedpp for PS3.

I'm now looking into if this is possible.

> 2/ Implement arch_parse_debug_rodata() to always set rodata_enabled = 
> false on PS3, and update free_initmem() to only call mark_initmem_nx() 
> when strict_kernel_rwx_enabled() returns true.

OK, I'll consider this if I cannot get updateboltedp working.

-Geoff


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 1/2] powerpc/ps3: Change updateboltedpp panic to info
  2023-01-28 22:45             ` Geoff Levand
@ 2023-02-10  0:51               ` Michael Ellerman
  0 siblings, 0 replies; 11+ messages in thread
From: Michael Ellerman @ 2023-02-10  0:51 UTC (permalink / raw)
  To: Geoff Levand, Christophe Leroy; +Cc: linuxppc-dev

Geoff Levand <geoff@infradead.org> writes:
> On 1/16/23 23:26, Christophe Leroy wrote:
>> Le 16/01/2023 à 21:08, Geoff Levand a écrit :
>>>
>>> As mentioned, I'd really like to keep PS3 included in ppc64_defconfig.  My
>>> original patch that basically just ignores the call to
>>> mmu_hash_ops.updateboltedpp allows that, and I haven't experienced any problems
>>> with it yet.
>> 
>> When you say you have not experienced any problems with it, do you mean 
>> that STRICT_RWX works for you ? When you select CONFIG_DEBUG_RODATA_TEST 
>> it tells you that it works ? Otherwise it looks incorrect to enable 
>> something that doesn't work.
>
> What I mean is that the system boots up, and works as expected.
> I have not tried with CONFIG_DEBUG_RODATA_TEST set.
>
>>> My preference would be to keep PS3 in ppc64_defconfig, and either apply my
>>> original patch, or I keep that patch in my ps3-linux repo on kernel.org. Then,
>>> if we end up adding runtime support for RWX I then fixup PS3 to use that.
>>>
>> 
>> In that case I see two solutions:
>> 1/ Implement updateboltedpp for PS3.
>
> I'm now looking into if this is possible.
>
>> 2/ Implement arch_parse_debug_rodata() to always set rodata_enabled = 
>> false on PS3, and update free_initmem() to only call mark_initmem_nx() 
>> when strict_kernel_rwx_enabled() returns true.
>
> OK, I'll consider this if I cannot get updateboltedp working.

I'll take this series as-is for 6.3, there's no point panicking.

Hopefully one of the above options can be implemented in future.

cheers

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 0/2] PS3 patches
  2023-01-03 17:51 [PATCH v2 0/2] PS3 patches Geoff Levand
  2023-01-03 17:51 ` [PATCH v2 1/2] powerpc/ps3: Change updateboltedpp panic to info Geoff Levand
  2023-01-03 17:51 ` [PATCH v2 2/2] powerpc/ps3: Refresh ps3_defconfig Geoff Levand
@ 2023-02-15 12:41 ` Michael Ellerman
  2 siblings, 0 replies; 11+ messages in thread
From: Michael Ellerman @ 2023-02-15 12:41 UTC (permalink / raw)
  To: Geoff Levand, Michael Ellerman; +Cc: linuxppc-dev

On Tue, 03 Jan 2023 17:51:03 +0000, Geoff Levand wrote:
> This v2 series is just the two PS3 specific patches of the v1 series.
> 
> -Geoff
> 
> The following changes since commit 88603b6dc419445847923fcb7fe5080067a30f98:
> 
>   Linux 6.2-rc2 (2023-01-01 13:53:16 -0800)
> 
> [...]

Applied to powerpc/next.

[1/2] powerpc/ps3: Change updateboltedpp panic to info
      https://git.kernel.org/powerpc/c/5705c6d97efc4aa9478fe2887fd911f60ddf17e5
[2/2] powerpc/ps3: Refresh ps3_defconfig
      https://git.kernel.org/powerpc/c/544f823ec7a34332550f22735959d3e1ffcf4684

cheers

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-02-15 12:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-03 17:51 [PATCH v2 0/2] PS3 patches Geoff Levand
2023-01-03 17:51 ` [PATCH v2 1/2] powerpc/ps3: Change updateboltedpp panic to info Geoff Levand
2023-01-09 17:41   ` Christophe Leroy
2023-01-14 21:22     ` Geoff Levand
2023-01-16  0:06       ` Michael Ellerman
2023-01-16 20:08         ` Geoff Levand
2023-01-17  7:26           ` Christophe Leroy
2023-01-28 22:45             ` Geoff Levand
2023-02-10  0:51               ` Michael Ellerman
2023-01-03 17:51 ` [PATCH v2 2/2] powerpc/ps3: Refresh ps3_defconfig Geoff Levand
2023-02-15 12:41 ` [PATCH v2 0/2] PS3 patches Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).