Gustavo A. R. Silva 413187f790 stddef: Remove token-pasting in TRAILING_OVERLAP()
Currently, TRAILING_OVERLAP() token-pastes the FAM parameter into the
name of internal pdding member `__offset_to_##FAM`. This forces FAM to
be a single identifier, which prevents callers from using a FAM when
it's a nested member. For instance, see the following scenario:

| struct flex {
| 	size_t count;
| 	int data[];
| };

| struct foo {
| 	int hdr_foo;
| 	struct flex f;
| };

| struct composite {
| 	struct foo hdr;
| 	int data[100];
| };

In this case, it'd be useful if TRAILING_OVERLAP() could be used in
the following way:

| struct composite {
| 	TRAILING_OVERLAP(struct foo, hdr, f.data,
| 		int data[100];
| 	);
| };

However, this is not current possible due to the token concatenation
in `__offset_to_##FAM`, which fails when FAM contains a dot.

So, remove token-pasting and use the fixed internal name
`__offset_to_FAM` and, with this, expand the capabilities of
TRAILING_OVERLAP(). :)

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/13b3e0a69aad837b4e32ca8269b9d91bf1fbe9ef.1758115257.git.gustavoars@kernel.org
Signed-off-by: Kees Cook <kees@kernel.org>
2025-09-17 09:29:43 -07:00
2022-09-28 09:02:20 +02:00
2025-02-19 14:53:27 -07:00
2025-08-17 15:22:10 -07:00
2024-03-18 03:36:32 -06:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the reStructuredText markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.
Description
No description provided
Readme 3.4 GiB
Languages
C 97%
Assembly 1%
Shell 0.6%
Rust 0.5%
Python 0.4%
Other 0.3%