Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
* 64-bit kernels and 32-bit user-space
@ 2023-05-02 12:55 Arend van Spriel
  2023-05-03 11:43 ` Arend van Spriel
  0 siblings, 1 reply; 2+ messages in thread
From: Arend van Spriel @ 2023-05-02 12:55 UTC (permalink / raw)
  To: kexec


[-- Attachment #1.1: Type: text/plain, Size: 425 bytes --]

I am trying to get a kernel crashdump on an embedded router, but it has 
32-bit user-space while the kernel is 64-bit. I tried something simple 
and got following:

# kexec -S
Unsupported machine type: aarch64

Looking in the build directory I only see arch/arm/ folder, but no 
arch/arm64. Is this due to 32-bit user-space? Has someone tried kexec in 
such an environment? Any pointers would be appreciated.

Regards,
Arend

[-- Attachment #1.2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4219 bytes --]

[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

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

* Re: 64-bit kernels and 32-bit user-space
  2023-05-02 12:55 64-bit kernels and 32-bit user-space Arend van Spriel
@ 2023-05-03 11:43 ` Arend van Spriel
  0 siblings, 0 replies; 2+ messages in thread
From: Arend van Spriel @ 2023-05-03 11:43 UTC (permalink / raw)
  To: kexec; +Cc: Eric Biederman


[-- Attachment #1.1: Type: text/plain, Size: 1335 bytes --]

On 5/2/2023 2:55 PM, Arend van Spriel wrote:
> I am trying to get a kernel crashdump on an embedded router, but it has 
> 32-bit user-space while the kernel is 64-bit. I tried something simple 
> and got following:
> 
> # kexec -S
> Unsupported machine type: aarch64

Clone the git repo and looked into the kexec message shown above, which 
is found in the function physical_arch(). It basically does a 'uname -m' 
and does a lookup in arches array. The problem is that on my platform it 
tries to lookup aarch64, which is not found.

Regarding the lookup I see:

	for (i = 0; arches[i].machine; ++i) {
		if (strcmp(utsname.machine, arches[i].machine) == 0)
			return arches[i].arch;
		if ((strcmp(arches[i].machine, "arm") == 0) &&
		    (strncmp(utsname.machine, arches[i].machine,
		     strlen(arches[i].machine)) == 0))
			return arches[i].arch;
	}

So the second if-statement means any utsname matching arm.* regexp, eg. 
arm64, will return arches[0].arch from arch/arm/kexec-arm.c, ie. 
KEXEC_ARCH_ARM, right? So can I conclude that 32-bit kexec can load and 
execute a 64-bit kernel?

Regards,
Arend

> Looking in the build directory I only see arch/arm/ folder, but no 
> arch/arm64. Is this due to 32-bit user-space? Has someone tried kexec in 
> such an environment? Any pointers would be appreciated.
> 
> Regards,
> Arend

[-- Attachment #1.2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4219 bytes --]

[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

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

end of thread, other threads:[~2023-05-03 17:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-02 12:55 64-bit kernels and 32-bit user-space Arend van Spriel
2023-05-03 11:43 ` Arend van Spriel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox