[Bug 278949] sysv IPC sysctl's behave differently for 32-bit on 64bits hosts

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 13 May 2024 10:41:03 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278949

            Bug ID: 278949
           Summary: sysv IPC sysctl's behave differently for 32-bit on
                    64bits hosts
           Product: Base System
           Version: 15.0-CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: rbranco@suse.com

To reproduce:

I created only one object of each type with the ipcmk command shipped by
util-linux like this:
$ ipcmk -M 1k -S 1 -Q

Then ran ipcs in Ubuntu Jammy 64-bits & 32-bits created with `debootstrap
[--arch i386] /compat/ubuntu[32]`

$ sudo chroot /compat/ubuntu ipcs -a

------ Message Queues --------
key        msqid      owner      perms      used-bytes   messages    
0x0fb549ed 65536      1000       644        0            0           

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status      
0x25caab18 65536      1000       644        4096       0                       

------ Semaphore Arrays --------
key        semid      owner      perms      nsems     
0xbf526696 65536      1000       644        1         

$ sudo chroot /compat/ubuntu32 ipcs -a

------ Message Queues --------
key        msqid      owner      perms      used-bytes   messages    
0xdeadc0de 2147483647 3735929054 336        16045693110842147038
16045693110842147038
0xdeadc0de 2147483647 3735929054 336        16045693110842147038
16045693110842147038
0xdeadc0de 2147483647 3735929054 336        16045693110842147038
16045693110842147038
0xdeadc0de 2147483647 3735929054 336        16045693110842147038
16045693110842147038
0xdeadc0de 2147483647 3735929054 336        16045693110842147038
16045693110842147038
0xdeadc0de 2147483647 3735929054 336        16045693110842147038
16045693110842147038
0xdeadc0de 2147483647 3735929054 336        16045693110842147038
16045693110842147038
0xdeadc0de 2147483647 3735929054 336        16045693110842147038
16045693110842147038
0xdeadc0de 2147483647 3735929054 336        16045693110842147038
16045693110842147038
0xdeadc0de 2147483647 3735929054 336        16045693110842147038
16045693110842147038
0xdeadc0de 2147483647 3735929054 336        16045693110842147038
16045693110842147038
0xdeadc0de 2147483647 3735929054 336        16045693110842147038
16045693110842147038
0xdeadc0de 2147483647 3735929054 336        16045693110842147038
16045693110842147038
0xdeadc0de 2147483647 3735929054 336        16045693110842147038
16045693110842147038
0xdeadc0de 2147483647 3735929054 336        16045693110842147038
16045693110842147038
0xdeadc0de 2147483647 3735929054 336        16045693110842147038
16045693110842147038

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status      
0x00001000 65536      1000       644        71807      1715595399              

------ Semaphore Arrays --------
key        semid      owner      perms      nsems     
0x00000000 65536      1000       644        0

-- 
You are receiving this mail because:
You are the assignee for the bug.