Bug 2276084 - kernel headers using unuglified names of GNU attributes
Summary: kernel headers using unuglified names of GNU attributes
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel-headers
Version: 40
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Justin M. Forbes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-04-19 16:50 UTC by Jakub Jelinek
Modified: 2025-05-16 08:06 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-05-16 08:06:44 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jakub Jelinek 2024-04-19 16:50:36 UTC
Some libstdc++-v3 tests in gcc fail because kernel-headers on s390x has in /usr/include/asm/types.h
} __attribute__((packed, aligned(4))) __vector128;
see
https://kojipkgs.fedoraproject.org/packages/gcc/14.0.1/0.15.fc40/data/logs/s390x/build.log
FAIL: 17_intro/headers/c++1998/all_attributes.cc   (test for excess errors)
FAIL: 17_intro/headers/c++2011/all_attributes.cc   (test for excess errors)
FAIL: 17_intro/headers/c++2014/all_attributes.cc   (test for excess errors)
FAIL: 17_intro/headers/c++2017/all_attributes.cc   (test for excess errors)
FAIL: 17_intro/headers/c++2020/all_attributes.cc   (test for excess errors)
These tests attempt to verify that libstdc++ headers themselves never use __attribute__((packed)) etc., but __attribute__((__packed__)) etc., because the former are in the implementation namespace.
grep __attribute__ `rpm -ql kernel-headers` 2>/dev/null | grep -v '((__'
shows hundreds of hits (of course, in some headers it is far more important than in others, the more important ones are those typically included by glibc or libstdc++ headers directly or indirectly).
I think kernel folks don't really want to switch to using those __ prefixed and suffixed versions, could this be done by some sed/awk/python script done when preparing the headers for shipping as user asm/ and linux/ headers?

grep __attribute__ `rpm -ql kernel-headers` 2>/dev/null | grep -v '((__' | sed 's/^.*ttribute__[[:blank:]]*((//;s/))\([^)]*\|$\)//' | sort -u
aligned(256);
aligned(4);
aligned(4) packed_ulong;
aligned(4 * sizeof(__u64));
aligned(8)
aligned(8);
aligned(8) *config;
aligned(8) timestamp_ns;
aligned (__alignof__(struct ebt_replace));
aligned(sizeof(__u64));
aligned(VRING_AVAIL_ALIGN_SIZE)
aligned(VRING_DESC_ALIGN_SIZE)
aligned(VRING_USED_ALIGN_SIZE)
bitwise
packed
packed, aligned(4);
packed,aligned(4)
packed, deprecated

shows that it is really just a couple of attributes and uglifying their names shouldn't be that hard inside of __attribute__(( ... )) arguments.

Reproducible: Always

Comment 1 Justin M. Forbes 2024-04-26 15:25:13 UTC
This sounds like something that should really be changed upstream.  If they are not willing, it would be worth having a discussion with at least RHEL, to make sure we have a single solution that works with everything.

Comment 2 Jakub Jelinek 2024-04-29 07:33:28 UTC
Sure, feel free to forward it there.  I wasn't where kernel-headers bugreporting goes to, if it acts as a separate project or is handled together with the kernel.
Because I doubt kernel itself wants to uglify all their attribute names.

Comment 3 Justin M. Forbes 2024-04-29 16:35:31 UTC
It is not a separate project, and comes directly from the kernel. The only reason that fedora builds it as a separate package is to get around the chicken/egg problem when things like perf define something new in headers, and then need to use that build. RHEL builds kernel-headers as a subpackage of kernel.  So if kernel is not interested, this needs to at least be a discussion with RHEL so make sure that both Fedora and RHEL are on the same page about it.

Comment 4 Aoife Moloney 2025-04-25 10:27:56 UTC
This message is a reminder that Fedora Linux 40 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 40 on 2025-05-13.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '40'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 40 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 5 Aoife Moloney 2025-05-16 08:06:44 UTC
Fedora Linux 40 entered end-of-life (EOL) status on 2025-05-13.

Fedora Linux 40 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.