readdir misbehaves when running 32-bit user space on a 64-bit-kernel - kernel/userspace interface mismatch in getdents64

  • Open
  • quality assurance status badge
Details
3 participants
  • Brett Gilio
  • Danny Milosavljevic
  • Ludovic Courtès
Owner
unassigned
Submitted by
Brett Gilio
Severity
critical
Merged with

Debbugs page

Brett Gilio wrote 5 years ago
Issue with Qemu Binfmt and CMake not detecting compiler.
(address . bug-guix@gnu.org)
87y2nej7jk.fsf@gnu.org
Hey all,

Opening a bug report as per a request following this issue identified

To recap, when running

Toggle snippet (3 lines)
./pre-inst-env guix build --system=armhf-linux swi-prolog

the configure phase is failing to identify the C/CXX compiler
toolchains to compile a test CMake file. There is a variety of
CMakeError.log and other object outputs that populate the build
directory when ran with --keep-failed.

This seems to be reported before, but subsequently patched at
https://issues.guix.gnu.org/38454#3.This only occurs when using the
Qemu method of compiling on a foreign architecture, and is not present
when natively compiling on true hardware.

Thanks,
Brett Gilio
Brett Gilio wrote 5 years ago
A possible solution
(address . 42448@debbugs.gnu.org)
87v9ihkcuw.fsf@gnu.org
As Marius Bakke pointed out on IRC, this issue is related to a change in
CMake where after 3.15 they removed the explicit `#define
_FILE_OFFSET_BITS 64`. The solution solution to this is to add

Toggle snippet (4 lines)
CFLAGS="-D_FILE_OFFSET_BITS=64"
CXXFLAGS="-D_FILE_OFFSET_BITS=64"

to CMakes compilation procedure. This is a core-updates change. I will
leave this issue open for now in case this needs more
investigation. Since I am just coming off of a haitus I think there are
changes to the core-updates and staging procedures so I dont think I am
comfortable making this change myself.

Brett Gilio
Ludovic Courtès wrote 4 years ago
control message for bug #43513
(address . control@debbugs.gnu.org)
87eemq2n7g.fsf@gnu.org
merge 43513 42448
quit
Ludovic Courtès wrote 4 years ago
(address . control@debbugs.gnu.org)
87v9g217uk.fsf@gnu.org
retitle 43513 'getdents' misbehaves when emulating 32-bit code on a 64-bit-kernel host
quit
Ludovic Courtès wrote 4 years ago
(address . control@debbugs.gnu.org)
87tuvm17uf.fsf@gnu.org
severity 43513 important
quit
Danny Milosavljevic wrote 4 years ago
(no subject)
(address . control@debbugs.gnu.org)
20200929163351.5f4aaaef@scratchpost.org
retitle 43513 Kernel/userspace interface mismatch between 32 bit user space and 64 bit kernel - readdir
severity 43513 critical
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl9zRc8ACgkQ5xo1VCww
uqXoQwf9E71eEjVgRLRop9FEB21gtLzhbqDSDq3llhh1BTPgOezXvD4F0YcdxTCe
ToecJ5KazcNeNa1TPTOMLGQpXiygARS6ChkHKdDBNwS9X0K6tLw1ISqdAauZywor
nQcwlHPXB728388oYdueR3HMhqyOiEOaDeG4dBBQsvG90zbW2CtqeI4IV4BKzW0d
m2MLF6D8cc686en5VQQJ9k/M5p5tIOF32zsiXJA87r26eUuJgJ35gNM6dDrtfpeQ
1w2Iq2fAkPJlC8EcsxeD6/wkLb/l9Yq8GjnZUoH/VS6qcHBtsFzjDH0OoqDHY81K
6PJSsoP1Chrods0rPMfkeBAIqom+Nw==
=0ldn
-----END PGP SIGNATURE-----


Danny Milosavljevic wrote 4 years ago
(address . control@debbugs.gnu.org)
20200929163651.7919a847@scratchpost.org
retitle 43513 readdir misbehaves when running 32-bit user space on a 64-bit-kernel - kernel/userspace interface mismatch in getdents
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl9zRoMACgkQ5xo1VCww
uqVIngf/V/5uxj7DVEyvzqDiikzSoMTebV2zJF8h7PlFsGG7qPrd9tXodGJ5sMek
oFVK5vZr5zcmOjrJ14ofj8jJrqzDwUzUVTwecacrGhJElhm7DAbZ9P6zaK2v9IQk
RfR9A6snXsfkeoXtXwfFJOvTIi1jYJdw6UaXfdFRLPQfeMriworyLTFisNKlHa7i
BdjdHLO2Yarozn0k0pYwKmGp/x08sUIeybJA2LcDXnKePftSjl8iKIiciswdecsF
BM13psk+0UXmdspTNRBRLPacv4Bqcr+QZcXmVlmA9FvxsDlX+inF6zZa1zCO4d7G
LGmMovzAKDllnIFUe7T5OnW/MQaD0w==
=NHr1
-----END PGP SIGNATURE-----


Danny Milosavljevic wrote 4 years ago
Re:
(address . control@debbugs.gnu.org)
20200929163953.184425f1@scratchpost.org
retitle 43513 readdir misbehaves when running 32-bit user space on a 64-bit-kernel - kernel/userspace interface mismatch in getdents64
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl9zRzkACgkQ5xo1VCww
uqU5Zwf9Hhmuk712W2fHePU8CZxCbn6DbMvVRstCiCwY9D3c8ZhFZUlG8SgY4ana
XpppykP6ORCteMqFQwGIN1e3PS2jet6J954t7MqmrrSYWjFkObdr2L/PNd6iH/8w
NJtbgfA8oM56yYiguqh5CWD5XcG9AcYFunKPIqUnWTtl5i6+kUGK9coUAln1H1ny
9753eRTHXNQcobZWTsXHzPmm8Q0YYXEzeTkTy/3oFoMp3zdWnvV7Q22WugYwAqgE
nlgTJdxheIYPz1z9wBE9ZnAvvCGYWu3eJ+hvn/UAluXKt1jC6MSy1htaCgoqG5zL
WVj46zPEluPcDDg9EqNRLGwW+rTixw==
=JleQ
-----END PGP SIGNATURE-----


?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 42448@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 42448
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help