linux-stable/Documentation
Aakash Sen Sharma 08ab786556 rust: bindgen: upgrade to 0.65.1
In LLVM 16, anonymous items may return names like `(unnamed union at ..)`
rather than empty names [1], which breaks Rust-enabled builds because
bindgen assumed an empty name instead of detecting them via
`clang_Cursor_isAnonymous` [2]:

    $ make rustdoc LLVM=1 CLIPPY=1 -j$(nproc)
      RUSTC L rust/core.o
      BINDGEN rust/bindings/bindings_generated.rs
      BINDGEN rust/bindings/bindings_helpers_generated.rs
      BINDGEN rust/uapi/uapi_generated.rs
    thread 'main' panicked at '"ftrace_branch_data_union_(anonymous_at__/_/include/linux/compiler_types_h_146_2)" is not a valid Ident', .../proc-macro2-1.0.24/src/fallback.rs:693:9
    ...
    thread 'main' panicked at '"ftrace_branch_data_union_(anonymous_at__/_/include/linux/compiler_types_h_146_2)" is not a valid Ident', .../proc-macro2-1.0.24/src/fallback.rs:693:9
    ...

This was fixed in bindgen 0.62.0. Therefore, upgrade bindgen to
a more recent version, 0.65.1, to support LLVM 16.

Since bindgen 0.58.0 changed the `--{white,black}list-*` flags to
`--{allow,block}list-*` [3], update them on our side too.

In addition, bindgen 0.61.0 moved its CLI utility into a binary crate
called `bindgen-cli` [4]. Thus update the installation command in the
Quick Start guide.

Moreover, bindgen 0.61.0 changed the default functionality to bind
`size_t` to `usize` [5] and added the `--no-size_t-is-usize` flag
to not bind `size_t` as `usize`. Then bindgen 0.65.0 removed
the `--size_t-is-usize` flag [6]. Thus stop passing the flag to bindgen.

Finally, bindgen 0.61.0 added support for the `noreturn` attribute (in
its different forms) [7]. Thus remove the infinite loop in our Rust
panic handler after calling `BUG()`, since bindgen now correctly
generates a `BUG()` binding that returns `!` instead of `()`.

Link: 19e984ef8f [1]
Link: https://github.com/rust-lang/rust-bindgen/pull/2319 [2]
Link: https://github.com/rust-lang/rust-bindgen/pull/1990 [3]
Link: https://github.com/rust-lang/rust-bindgen/pull/2284 [4]
Link: cc78b6fdb6 [5]
Link: https://github.com/rust-lang/rust-bindgen/pull/2408 [6]
Link: https://github.com/rust-lang/rust-bindgen/issues/2094 [7]
Signed-off-by: Aakash Sen Sharma <aakashsensharma@gmail.com>
Closes: https://github.com/Rust-for-Linux/linux/issues/1013
Tested-by: Ariel Miculas <amiculas@cisco.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Link: https://lore.kernel.org/r/20230612194311.24826-1-aakashsensharma@gmail.com
[ Reworded commit message. Mentioned the `bindgen-cli` binary crate
  change, linked to it and updated the Quick Start guide. Re-added a
  deleted "as" word in a code comment and reflowed comment to respect
  the maximum length. ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2023-08-15 00:37:22 +02:00
..
ABI cxl fixes for v6.5-rc5 2023-08-03 15:41:48 -07:00
PCI Merge branch 'pci/controller/endpoint' 2023-06-26 13:00:00 -05:00
RCU
accel
accounting
admin-guide RISC-V Fixes for 6.5-rc5 2023-08-04 16:04:37 -07:00
arch - Work around an erratum on GIC700, where a race between a CPU 2023-07-30 10:59:19 -07:00
block
bpf sock: Remove ->sendpage*() in favour of sendmsg(MSG_SPLICE_PAGES) 2023-06-24 15:50:13 -07:00
cdrom
core-api workqueue: Changes for v6.5 2023-06-27 16:32:52 -07:00
cpu-freq
crypto
dev-tools - Yosry Ahmed brought back some cgroup v1 stats in OOM logs. 2023-06-28 10:28:11 -07:00
devicetree Including fixes from bpf and wireless. 2023-08-03 14:00:02 -07:00
doc-guide
driver-api Fixes for pci_clean_master, error handling in driver inits, and various 2023-07-09 09:35:51 -07:00
fault-injection
fb
features LoongArch: Add jump-label implementation 2023-06-29 20:58:44 +08:00
filesystems vfs: get rid of old '->iterate' directory operation 2023-08-06 15:08:35 +02:00
firmware-guide
firmware_class
fpga
gpu Merge tag 'amd-drm-next-6.5-2023-06-09' of https://gitlab.freedesktop.org/agd5f/linux into drm-next 2023-06-15 14:11:22 +10:00
hid
hwmon hwmon: (oxp-sensors) Add support for AOKZOE A1 PRO 2023-06-24 20:17:18 -07:00
i2c
iio
images
infiniband
input
isdn
kbuild kernel-doc: don't let V=1 change outcome 2023-06-10 16:39:02 +09:00
kernel-hacking
leds - New Drivers 2023-07-03 11:26:05 -07:00
litmus-tests
livepatch
locking
loongarch
maintainer Documentation: update git configuration for Link: tag 2023-06-21 09:15:15 -06:00
mhi
mips
misc-devices Documentation: Add TI TPS6594 PFSM 2023-06-15 13:41:53 +02:00
mm - Yosry Ahmed brought back some cgroup v1 stats in OOM logs. 2023-06-28 10:28:11 -07:00
netlabel
netlink netlink: specs: add display hints to ovs_flow 2023-06-24 15:45:49 -07:00
networking docs: net: clarify the NAPI rules around XDP Tx 2023-07-21 18:51:37 -07:00
nvdimm
nvme
pcmcia
peci
power
powerpc Documentation: Document PowerPC kernel DEXCR interface 2023-06-19 17:36:27 +10:00
process rust: bindgen: upgrade to 0.65.1 2023-08-15 00:37:22 +02:00
riscv Documentation: RISC-V: hwprobe: Fix a formatting error 2023-07-11 10:43:51 -07:00
rust rust: bindgen: upgrade to 0.65.1 2023-08-15 00:37:22 +02:00
s390
scheduler sched/deadline: Update GRUB description in the documentation 2023-06-16 22:08:12 +02:00
scsi
security
sound ALSA: compress: allow setting codec params after next track 2023-06-21 07:28:31 +02:00
sphinx
sphinx-static
spi
staging
target scsi: target: docs: Remove tcm_mod_builder.py 2023-06-28 22:01:32 -04:00
timers
tools Documentation: Add tools/rtla timerlat -u option documentation 2023-06-13 16:43:37 -04:00
trace Char/Misc and other driver subsystem updates for 6.5-rc1 2023-07-03 12:46:47 -07:00
translations A half-dozen late arriving docs patches. They are mostly fixes, but we 2023-07-06 22:15:38 -07:00
usb
userspace-api media updates for v6.5-rc1 2023-07-05 10:42:32 -07:00
virt A half-dozen late arriving docs patches. They are mostly fixes, but we 2023-07-06 22:15:38 -07:00
w1
watchdog
wmi platform/x86: dell-ddv: Fix mangled list in documentation 2023-07-11 12:15:30 +02:00
.gitignore
Changes
CodingStyle
Kconfig
Makefile
SubmittingPatches
atomic_bitops.txt
atomic_t.txt
conf.py
docutils.conf
dontdiff
index.rst
memory-barriers.txt
subsystem-apis.rst platform-drivers-x86 for v6.5-1 2023-06-30 14:50:00 -07:00