Bug 240035 - freebsd32: sysv IPC broken on non-i386
Summary: freebsd32: sysv IPC broken on non-i386
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Brooks Davis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-22 13:36 UTC by Brooks Davis
Modified: 2023-12-14 20:48 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brooks Davis freebsd_committer freebsd_triage 2019-08-22 13:36:01 UTC
In the COMPAT_FREEBSD32 code the definitions of struct msqid_ds32, struct msqid_ds32_old, struct semid_ds32, struct semid_ds32_old, struct shmid_ds32, and struct shmid_ds32_old assume time_t is an int32_t when that's only true on i386.
Comment 1 commit-hook freebsd_committer freebsd_triage 2023-12-01 20:52:01 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=957f014dc076a7f74ed0c8c8699e6f39b55785e7

commit 957f014dc076a7f74ed0c8c8699e6f39b55785e7
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2023-12-01 20:48:29 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2023-12-01 20:48:49 +0000

    sysvipc: Fix 32-bit compat on !i386

    The various time fields are time_t's which are only 32-bit on i386.

    Fixing the old versions is probably of little use, but it's more correct
    and in theory there could be powerpc binaries from 6.x.

    PR:             240035
    Fixes:          fbb273bc05bef Properly support for FreeBSD 4 32bit System V shared memory.
    Reviewed by:    kib
    Differential Revision:  https://reviews.freebsd.org/D42870

 sys/compat/freebsd32/freebsd32_ipc.h | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-12-13 23:24:03 UTC
A commit in branch stable/14 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=cc77811bf02c4a32c5303fc9de1e4596bbbc94e1

commit cc77811bf02c4a32c5303fc9de1e4596bbbc94e1
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2023-12-01 20:48:29 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2023-12-13 23:10:53 +0000

    sysvipc: Fix 32-bit compat on !i386

    The various time fields are time_t's which are only 32-bit on i386.

    Fixing the old versions is probably of little use, but it's more correct
    and in theory there could be powerpc binaries from 6.x.

    PR:             240035
    Fixes:          fbb273bc05bef Properly support for FreeBSD 4 32bit System V shared memory.
    Reviewed by:    kib
    Differential Revision:  https://reviews.freebsd.org/D42870

    (cherry picked from commit 957f014dc076a7f74ed0c8c8699e6f39b55785e7)

 sys/compat/freebsd32/freebsd32_ipc.h | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)
Comment 3 commit-hook freebsd_committer freebsd_triage 2023-12-14 20:26:30 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=9ba8c825a392e141bc05efb71595f949b00a3719

commit 9ba8c825a392e141bc05efb71595f949b00a3719
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2023-12-01 20:48:29 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2023-12-14 20:25:27 +0000

    sysvipc: Fix 32-bit compat on !i386

    The various time fields are time_t's which are only 32-bit on i386.

    Fixing the old versions is probably of little use, but it's more correct
    and in theory there could be powerpc binaries from 6.x.

    PR:             240035
    Fixes:          fbb273bc05bef Properly support for FreeBSD 4 32bit System V shared memory.
    Reviewed by:    kib
    Differential Revision:  https://reviews.freebsd.org/D42870

    (cherry picked from commit 957f014dc076a7f74ed0c8c8699e6f39b55785e7)

 sys/compat/freebsd32/freebsd32_ipc.h | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)
Comment 4 Brooks Davis freebsd_committer freebsd_triage 2023-12-14 20:45:46 UTC
Merged to 13 and 14. Not going to bother with 12 at this point.