Re: Re: Kernel 6.9 fails to boot with "can't boot dump kernel from OF"

2024-08-16 Thread Dave Vasilevsky
> Could you verify that this change actually fixes the problem? This would
save me some work.

Verified with PPC qemu. I fail to boot with "You can’t boot a kdump kernel
from OF" with CONFIG_CRASH_DUMP on, and I boot fine with it disabled.

Details:
* Tested against the Debian 6.10.4-1 kernel as unpacked with `dget
https://deb.debian.org/debian/pool/main/l/linux/linux_6.10.4-1.dsc`
* Built with the GCC 14.2.0 powerpc toolchain from kernel.org
* Using the exact kernel config from a stock sid powerpc system:
https://gist.github.com/vasi/be13936e9de9b5a6db8a71897c731aef. Tested
building both without any change, and with the change to CONFIG_CRASH_DUMP.
* Built with `PATH=... ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- make
bindeb-pkg`
* Tested with a Debian sid powerpc VM in qemu 6.2.

Do you need me to try this kernel against real hardware? I can dig an old
iBook out of the closet to see if it works.

In terms of where this is coming from, I did some investigation:
* The value of CONFIG_CRASH_DUMP does change from n to y between 6.1 and
6.10. So it is indeed a problem with the config, not the kernel crashing
under the same config as before.
* The value of CONFIG_PROC_VMCORE also changes between 6.1 and 6.10, and it
depends on CRASH_DUMP. But PROC_VMCORE seems to be enabled in Debian for
years, so it's not immediately obvious why it's not in my config:
https://salsa.debian.org/kernel-team/linux/-/commit/432666d44950ff603d69537f5ea7c5843fac04d8
* Looking at upstream, CRASH_DUMP changed to `default y` in 6.9! There's
our problem:
https://github.com/torvalds/linux/commit/75bc255a7444801d64c7a7bd09e3f452f86b3585

* Easiest would be to simply change this downstream in Debian, since Open
Firmware is by far the most common way of starting Debian powerpc. I don't
know whether upstream should change or not--is there any real constituency
that runs PPC Linux without OF, and is also interested in crash dumps?
Maybe some embedded folks? Up to you whether you'd like us to try to change
this upstream as well, I'm happy to chip in if so.

Hope this helps,
Dave


Re: [PATCH linux-next v3 05/14] crash: clean up kdump related config items

2024-08-22 Thread Dave Vasilevsky
On 2024-08-22 20:04, Baoquan He wrote:
> If so, below patch possiblly can fix it. Can you help check if it's OK?

That removes the possibility of enabling CRASH_DUMP on PPC_BOOK3S_32, even when 
booting via other mechanisms. Maybe it would be best to just make it 
not-default? Please take a look at this patch:


>From d6e5fe3a45f46f1aa01914648c443291d956de9e Mon Sep 17 00:00:00 2001
From: Dave Vasilevsky 
Date: Thu, 22 Aug 2024 20:13:46 -0400
Subject: [PATCH] powerpc: Default to CRASH_DUMP=n when Open Firmware boot is
 likely
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Open Firmware is unable to boot a kernel where PHYSICAL_START is
non-zero, which occurs when CRASH_DUMP is on.

On PPC_BOOK3S_32, the most common way of booting is Open Firmware, so
most users probably don't want CRASH_DUMP. Users booting via some
other mechanism can turn it on explicitly.

Signed-off-by: Dave Vasilevsky 
Reported-by: Reimar Döffinger 
Fixes: 75bc255a7444
---
 arch/arm/Kconfig   | 3 +++
 arch/arm64/Kconfig | 3 +++
 arch/loongarch/Kconfig | 3 +++
 arch/mips/Kconfig  | 3 +++
 arch/powerpc/Kconfig   | 4 
 arch/riscv/Kconfig | 3 +++
 arch/s390/Kconfig  | 3 +++
 arch/sh/Kconfig| 3 +++
 arch/x86/Kconfig   | 3 +++
 kernel/Kconfig.kexec   | 2 +-
 10 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 54b2bb817a7f..200995052690 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1597,6 +1597,9 @@ config ATAGS_PROC
 config ARCH_SUPPORTS_CRASH_DUMP
def_bool y
 
+config ARCH_DEFAULT_CRASH_DUMP
+   def_bool y
+
 config AUTO_ZRELADDR
bool "Auto calculation of the decompressed kernel image address" if 
!ARCH_MULTIPLATFORM
default !(ARCH_FOOTBRIDGE || ARCH_RPC || ARCH_SA1100)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index a2f8ff354ca6..43e08cc8204f 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -1558,6 +1558,9 @@ config ARCH_DEFAULT_KEXEC_IMAGE_VERIFY_SIG
 config ARCH_SUPPORTS_CRASH_DUMP
def_bool y
 
+config ARCH_DEFAULT_CRASH_DUMP
+   def_bool y
+
 config ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION
def_bool CRASH_RESERVE
 
diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig
index 70f169210b52..ce232ddcd27d 100644
--- a/arch/loongarch/Kconfig
+++ b/arch/loongarch/Kconfig
@@ -599,6 +599,9 @@ config ARCH_SUPPORTS_KEXEC
 config ARCH_SUPPORTS_CRASH_DUMP
def_bool y
 
+config ARCH_DEFAULT_CRASH_DUMP
+   def_bool y
+
 config ARCH_SELECTS_CRASH_DUMP
def_bool y
depends on CRASH_DUMP
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 60077e576935..b547f4304d0c 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -2881,6 +2881,9 @@ config ARCH_SUPPORTS_KEXEC
 config ARCH_SUPPORTS_CRASH_DUMP
def_bool y
 
+config ARCH_DEFAULT_CRASH_DUMP
+   def_bool y
+
 config PHYSICAL_START
hex "Physical address where the kernel is loaded"
default "0x8400"
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index d7b09b064a8a..0f3c1f958eac 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -682,6 +682,10 @@ config RELOCATABLE_TEST
 config ARCH_SUPPORTS_CRASH_DUMP
def_bool PPC64 || PPC_BOOK3S_32 || PPC_85xx || (44x && !SMP)
 
+config ARCH_DEFAULT_CRASH_DUMP
+   bool
+   default y if !PPC_BOOK3S_32
+
 config ARCH_SELECTS_CRASH_DUMP
def_bool y
depends on CRASH_DUMP
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 0f3cd7c3a436..eb247b5ee569 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -880,6 +880,9 @@ config ARCH_SUPPORTS_KEXEC_PURGATORY
 config ARCH_SUPPORTS_CRASH_DUMP
def_bool y
 
+config ARCH_DEFAULT_CRASH_DUMP
+   def_bool y
+
 config ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION
def_bool CRASH_RESERVE
 
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index a822f952f64a..05a1fb408471 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -275,6 +275,9 @@ config ARCH_SUPPORTS_CRASH_DUMP
  This option also enables s390 zfcpdump.
  See also 
 
+config ARCH_DEFAULT_CRASH_DUMP
+   def_bool y
+
 menu "Processor type and features"
 
 config HAVE_MARCH_Z10_FEATURES
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 1aa3c4a0c5b2..3a6338962636 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -549,6 +549,9 @@ config ARCH_SUPPORTS_KEXEC
 config ARCH_SUPPORTS_CRASH_DUMP
def_bool BROKEN_ON_SMP
 
+config ARCH_DEFAULT_CRASH_DUMP
+   def_bool y
+
 config ARCH_SUPPORTS_KEXEC_JUMP
def_bool y
 
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 007bab9f2a0e..aa4666bb9e9c 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2087,6 +2087,9 @@ config ARCH_SUPPORTS_KEXEC_JUMP
 config ARCH_SUPPORTS_CRASH_DUMP
def_bool X86_64 || (X86_32 && HIGHMEM)
 
+config ARCH_DEF

Re: [PATCH linux-next v3 05/14] crash: clean up kdump related config items

2024-08-23 Thread Dave Vasilevsky
On 2024-08-23 03:16, John Paul Adrian Glaubitz wrote:
> It should be disabled on m68k and sh by default as well.

Sure, I can change that. What's the reasoning, so I can explain in my commit 
message?

-Dave



Re: [PATCH linux-next v3 05/14] crash: clean up kdump related config items

2024-08-23 Thread Dave Vasilevsky
On 2024-08-23 07:58, Dave Vasilevsky wrote:
> On 2024-08-23 03:16, John Paul Adrian Glaubitz wrote:
>> It should be disabled on m68k and sh by default as well.
> 
> Sure, I can change that. What's the reasoning, so I can explain in my commit 
> message?

Oh I don't think m68k even has ARCH_SUPPORTS_CRASH_DUMP, so it will always be 
off. My question still stands for sh though.

-Dave 



Bug#1105139: libjemalloc2: Don't assume altivec on powerpc

2025-05-11 Thread Dave Vasilevsky
Package: libjemalloc2
Version: 5.3.0-3
Severity: important
X-Debbugs-Cc: debian-powerpc@lists.debian.org, d...@vasilevsky.ca
User: debian-powerpc@lists.debian.org
Usertags: powerpc

This package's rules file explicitly enables Altivec on powerpc, but
many powerpc machines use G3 or earlier processors that don't support Altivec.

This results in a SIGILL when packages linking against jemalloc are run on those
machines. Eg: on an iBook G3 running tmux, I get a SIGILL on a 'vxor' 
instruction.

Debian policy has traditionally been to support baseline CPUs when it's at all
possible, so this package should disable Altivec on 32-bit powerpc.


-- System Information:
Debian Release: trixie/sid
  APT prefers unreleased
  APT policy: (500, 'unreleased'), (500, 'unstable')
Architecture: powerpc (ppc)

Kernel: Linux 6.12.27-powerpc (UP)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_CA:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libjemalloc2 depends on:
ii  libc6   2.41-7
ii  libgcc-s1   14.2.0-19
ii  libstdc++6  14.2.0-19

libjemalloc2 recommends no packages.

libjemalloc2 suggests no packages.

-- no debconf information