lxc / lxcfs

FUSE filesystem for LXC
https://linuxcontainers.org/lxcfs
Other
1.02k stars 246 forks source link

proc: Fix /proc/cpuinfo not respecting personality #609

Closed gibmat closed 9 months ago

gibmat commented 10 months ago

It was found that the personality within the container was not being properly respected, which for large numbers of CPUs would break reporting of /proc/cpuinfo in arm32 containers running on an arm64 host.

Tested on an arm64 QEMU VM; with this fix the 32bit container now properly reports /proc/cpuinfo. Shamelessly copied most of the code from the existing proc_read_with_personality().

Fixes: #608.

stgraber commented 10 months ago

@mihalicyn can you take a look?

mihalicyn commented 10 months ago

@mihalicyn can you take a look?

sure! My bad that I've skipped that one.

mihalicyn commented 9 months ago

LGTM!

Big thanks for noticing, debugging and fixing, Mathias!

I'll do some refactoring in the following PR.

gibmat commented 9 months ago

Would it be possible to merge this in the next few days? I'd like to have the fix included in the Debian 12.2 point release (scheduled for Oct 7). Working back from that date, I need to have the updated package basically ready by the 23rd so there's plenty of time for the update to be approved and included by the release team.