Details
- Reviewers
markj - Commits
- rG8299f9a5c167: compat32: add size CTASSERTs for non-amd64 cases
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
This review prompted by looking at stat32 on arm64 and f90cd1ae30b5f49e9f6ea58a0628ce1c8d8822bc.
I believe[1] that we can avoid translating to stat32 on arm64 (and other LE non-x86 architectures); stat and stat32 have the same layout except that in kernel we write an int64_t to the timespecs tv_nsec which userland interprets as an int32_t followed by 4 bytes of padding.
I think we could then revert f90cd1ae30b5f49e9f6ea58a0628ce1c8d8822bc and have arm64 just do
int freebsd32_fstatat(struct thread *td, struct freebsd32_fstatat_args *uap) { return (sys_fstatat(td, uap)); }
(It would be convenient if we could tell config to avoid emitting a compat ABI sysent for specific architectures, but we don't have this capability today.)
[1] We'd need to validate this carefully and confirm I haven't missed anything if we're going to go ahead.
This built on arm64 in Cirrus-CI, although it seems the smoke test doesn't boot at present.
Log at https://api.cirrus-ci.com/v1/task/6107605943713792/logs/test.log
virtio_pci0: <VirtIO PCI (legacy) Block adapter> mem 0x10000000-0x10000fff,0x8000000000-0x8000003fff at device 1.0 on pci0 pcib0: Failed to translate resource 0-ffffffffffffffff type 4 for virtio_pci0 virtio_pci0: 0x80 bytes of rid 0x10 res 4 failed (0, 0xffffffffffffffff). pci0: child virtio_pci0 requested type 3 for rid 0x10, but the BAR says it is an ioport pci0: child virtio_pci0 requested type 3 for rid 0x10, but the BAR says it is an ioport pcib0: Failed to translate resource 0-ffffffffffffffff type 4 for virtio_pci0 virtio_pci0: 0x80 bytes of rid 0x10 res 4 failed (0, 0xffffffffffffffff). pcib0: Failed to translate resource 0-ffffffffffffffff type 4 for virtio_pci0 virtio_pci0: 0x80 bytes of rid 0x10 res 4 failed (0, 0xffffffffffffffff). pcib0: Failed to translate resource 0-ffffffffffffffff type 4 for virtio_pci0 virtio_pci0: 0x80 bytes of rid 0x10 res 4 failed (0, 0xffffffffffffffff). pcib0: Failed to translate resource 0-ffffffffffffffff type 4 for virtio_pci0 virtio_pci0: 0x80 bytes of rid 0x10 res 4 failed (0, 0xffffffffffffffff). pci0: child virtio_pci0 requested type 3 for rid 0x10, but the BAR says it is an ioport pci0: child virtio_pci0 requested type 3 for rid 0x10, but the BAR says it is an ioport pci0: child virtio_pci0 requested type 3 for rid 0x10, but the BAR says it is an ioport ... pci0: child virtio_pci0 requested type 3 for rid 0x10, but the BAR says it is an ioport pcib0: Failed to translate resource 0-ffffffffffffffff type 4 for virtio_pci0 virtio_pci0: 0x80 bytes of rid 0x10 res 4 failed (0, 0xffffffffffffffff). pci0: child virtio_pci0 requested type 3 for rid 0x10, but the BAR says it is an ioport pcib0: Failed to translate resource 0-ffffffffffffffff type 4 for virtio_pci0 virtio_pci0: 0x80 bytes of rid 0x10 res 4 failed (0, 0xffffffffffffffff). pcib0: Failed to translate resource 0-ffffffffffffffff type 4 for virtio_pci0 virtio_pci0: 0x80 bytes of rid 0x10 res 4 failed (0, 0xffffffffffffffff). pcib0: Failed to translate resource 0-ffffffffffffffff type 4 for virtio_pci0 virtio_pci0: 0x80 bytes of rid 0x10 res 4 failed (0, 0xffffffffffffffff). ...