On Tue, Jan 14, 2020 at 10:59 AM Dmitry V. Levin <notifications@github.com><br>
wrote:<br>
<br>
> On Tue, Jan 14, 2020 at 01:27:09AM -0800, arndb wrote:<br>
> > Can you be more specific about what the problem is with the uapi<br>
> headers? I looked at them again now but fail to see what's wrong with them.<br>
><br>
> x32: I cannot reproduce it any longer where I used to, maybe something has<br>
> been fixed in uapi for x32.<br>
><br>
<br>
Ok, this is know to have been broken in uapi headers between v4.3 and v4.17.<br>
<br>
See commits f4b4aae18288 ("x86/headers/uapi: Fix __BITS_PER_LONG value<br>
for x32 builds") and 1a512c0882bd ("x86/ipc: Fix x32 version of shmid64_ds<br>
and<br>
msqid64_ds").<br>
<br>
<br>
> sparc:<br>
> according to struct compat_ipc64_perm defined in<br>
> arch/sparc/include/asm/compat.h,<br>
> the type of uid is __compat_uid32_t aka u32,<br>
> but, according to struct ipc64_perm defined in<br>
> arch/sparc/include/uapi/asm/ipcbuf.h,<br>
> the type of uid is __kernel_uid_t which is defined to unsigned short on<br>
> sparc.<br>
><br>
> I suppose the regression was introduced by commit<br>
> 83c86984bff2d793c91eb710af7857828b9ddb49 aka v2.6.29-rc1~501^2~6<br>
><br>
> If my guess is correct, then the only working form of IPC_STAT on sparc32<br>
> since that commit is sparc64 in compat mode.<br>
<br>
<br>
Ok, so this would be a bug with what sysvipc on sparc32 does in the kernel,<br>
rather than a bug of the uapi headers not describing what it does, correct?<br>
<br>
Adding the SPARC list and maintainer to Cc. Yes, I read it the same way.<br>
In particular, Sam back then wrote<br>
<br>
commit 83c86984bff2d793c91eb710af7857828b9ddb49<br>
Author: Sam Ravnborg <sam@ravnborg.org><br>
Date: Sun Jan 4 15:44:22 2009 -0800<br>
<br>
sparc: unify ipcbuf.h<br>
<br>
The ony difference is the size of the mode.<br>
sparc has extra padding to compensate for this.<br>
<br>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org><br>
Signed-off-by: David S. Miller <davem@davemloft.net><br>
<br>
However, aside from mode, the other fields that were changed are<br>
'uid', 'gid', 'cuid' and 'cgid'. It's been 11 years since that ABI change,<br>
so I wonder if anyone has started relying on the changed behavior<br>
in the meantime, or sparc32 users just don't use sysvipc.<br>
<br>
I checked glibc and uclibc-ng, and both use the pre-2009 version<br>
of the ABI. I also checked the leon-linux patches from<br>
https://www.gaisler.com/anonftp/linux/linux-2.6/kernel/ to see<br>
if they had already come across this, but there is no fix either.<br>
<br>
Arnd<br>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/strace/strace/issues/116?email_source=notifications&email_token=AAFX7DGU73XNAZ5CQXLTB53Q5WKY3A5CNFSM4J63O5QKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEI4FTMA#issuecomment-574118320">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAFX7DCAX2PORGHEKFOO3ELQ5WKY3ANCNFSM4J63O5QA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAFX7DBUT4ZMQ3ORSC322R3Q5WKY3A5CNFSM4J63O5QKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEI4FTMA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/strace/strace/issues/116?email_source=notifications\u0026email_token=AAFX7DGU73XNAZ5CQXLTB53Q5WKY3A5CNFSM4J63O5QKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEI4FTMA#issuecomment-574118320",
"url": "https://github.com/strace/strace/issues/116?email_source=notifications\u0026email_token=AAFX7DGU73XNAZ5CQXLTB53Q5WKY3A5CNFSM4J63O5QKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEI4FTMA#issuecomment-574118320",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>