Skip to content

arm64: /proc/cpuinfo updates for compat tasks

Catalin Marinas linux-arm-kernel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2arm64: Provide "model name" in /proc/cpuinfo for PER_LINUX32 tasksarch/arm64/include/asm/elf.h arch/arm64/kernel/cpuinfo.c+9 -31 reply
1/2arm64: Provide "model name" in /proc/cpuinfo for PER_LINUX32 tasks+0 -00 replies
2/2arm64: Always provide compat /proc/cpuinfo for 32-bit tasksarch/arm64/kernel/cpuinfo.c+2 -12 replies

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchWill Deacon
1/2A-b
1/2A-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] arm64: /proc/cpuinfo updates for compat tasks

The first patch is relatively simple, adding the "model name" line which is present in the arm32 /proc/cpuinfo.

The second patch is up for discussion. When arm64 support was merged, we concluded that "uname -m" should report "aarch64" even for compat tasks. The only way to change the output to "armv8l" was to set the PER_LINUX32 personality (and I think this is in line with x86).

We followed a similar personality approach for /proc/cpuinfo where the compat one is only exposed if the task sets/inherits PER_LINUX32. The downside is that apparently some 32-bit applications started making use of the 64-bit /proc/cpuinfo format. To prevent further spread, I'm proposing the second patch in this series to force compat /proc/cpuinfo for 32-bit tasks. This is a departure from the "uname -m" behaviour but maybe they don't need to be coupled anyway.

Thoughts?

Catalin Marinas (2):
arm64: Provide "model name" in /proc/cpuinfo for PER_LINUX32 tasks
arm64: Always provide compat /proc/cpuinfo for 32-bit tasks

 arch/arm64/include/asm/elf.h | 4 ++--
 arch/arm64/kernel/cpuinfo.c  | 9 ++++++++-
 2 files changed, 10 insertions(+), 3 deletions(-)