[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#954294: libseccomp-dev: API break: SCMP_SYS() is unsigned long (was Re: Bug#954294: systemd: FTBFS on x32 due to format string errors, need explicit casts)



Am 07.04.20 um 14:26 schrieb Thorsten Glaser:
> retitle 954294 linux: __X32_SYSCALL_BIT being defined as UL constant breaks userspace
> reassign 954294
> found 954294 5.5.13-2
> thanks
> 
> Dixi quod…
> 
>>> -#define SCMP_SYS(x)           (__SNR_##x)
>>> +#define SCMP_SYS(x)           ((int)__SNR_##x)
>>
>> Ouch, this hasn’t worked:
>>
>> ../src/shared/seccomp-util.c: In function ‘seccomp_restrict_sxid’:                                               
>> ../src/shared/seccomp-util.c:1977:5: error: missing binary operator before token "("                             
>>  1977 | #if SCMP_SYS(open) > 0                                                                                   
>>       |     ^~~~~~~~                                                                                             
> 
> Turns out that __X32_SYSCALL_BIT is OR’d into the __NR_* things
> and defined, by default, as unsigned long constant.
> 
> /usr/include/x86_64-linux-gnux32/asm/unistd.h:#define __X32_SYSCALL_BIT 0x40000000UL
> 
> I’ve uploaded a workaround (attached); reassigning.

Is this workaround permanent or will systemd FTBFS again in the future?

If seccomp support on x32 is causing so much trouble, we can just as
well disable it in systemd for the time being by dropping libseccomp-dev
from Build-Depends.
Let me know what you prefer.

Michael

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: