Merge tag 'rust-v6.1-rc1' of https://github.com/Rust-for-Linux/linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 3 Oct 2022 23:39:37 +0000 (16:39 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 3 Oct 2022 23:39:37 +0000 (16:39 -0700)
Pull Rust introductory support from Kees Cook:
 "The tree has a recent base, but has fundamentally been in linux-next
  for a year and a half[1]. It's been updated based on feedback from the
  Kernel Maintainer's Summit, and to gain recent Reviewed-by: tags.

  Miguel is the primary maintainer, with me helping where needed/wanted.
  Our plan is for the tree to switch to the standard non-rebasing
  practice once this initial infrastructure series lands.

  The contents are the absolute minimum to get Rust code building in the
  kernel, with many more interfaces[2] (and drivers - NVMe[3], 9p[4], M1
  GPU[5]) on the way.

  The initial support of Rust-for-Linux comes in roughly 4 areas:

   - Kernel internals (kallsyms expansion for Rust symbols, %pA format)

   - Kbuild infrastructure (Rust build rules and support scripts)

   - Rust crates and bindings for initial minimum viable build

   - Rust kernel documentation and samples

  Rust support has been in linux-next for a year and a half now, and the
  short log doesn't do justice to the number of people who have
  contributed both to the Linux kernel side but also to the upstream
  Rust side to support the kernel's needs. Thanks to these 173 people,
  and many more, who have been involved in all kinds of ways:

  Miguel Ojeda, Wedson Almeida Filho, Alex Gaynor, Boqun Feng, Gary Guo,
  Björn Roy Baron, Andreas Hindborg, Adam Bratschi-Kaye, Benno Lossin,
  Maciej Falkowski, Finn Behrens, Sven Van Asbroeck, Asahi Lina, FUJITA
  Tomonori, John Baublitz, Wei Liu, Geoffrey Thomas, Philip Herron,
  Arthur Cohen, David Faust, Antoni Boucher, Philip Li, Yujie Liu,
  Jonathan Corbet, Greg Kroah-Hartman, Paul E. McKenney, Josh Triplett,
  Kent Overstreet, David Gow, Alice Ryhl, Robin Randhawa, Kees Cook,
  Nick Desaulniers, Matthew Wilcox, Linus Walleij, Joe Perches, Michael
  Ellerman, Petr Mladek, Masahiro Yamada, Arnaldo Carvalho de Melo,
  Andrii Nakryiko, Konstantin Shelekhin, Rasmus Villemoes, Konstantin
  Ryabitsev, Stephen Rothwell, Andy Shevchenko, Sergey Senozhatsky, John
  Paul Adrian Glaubitz, David Laight, Nathan Chancellor, Jonathan
  Cameron, Daniel Latypov, Shuah Khan, Brendan Higgins, Julia Lawall,
  Laurent Pinchart, Geert Uytterhoeven, Akira Yokosawa, Pavel Machek,
  David S. Miller, John Hawley, James Bottomley, Arnd Bergmann,
  Christian Brauner, Dan Robertson, Nicholas Piggin, Zhouyi Zhou, Elena
  Zannoni, Jose E. Marchesi, Leon Romanovsky, Will Deacon, Richard
  Weinberger, Randy Dunlap, Paolo Bonzini, Roland Dreier, Mark Brown,
  Sasha Levin, Ted Ts'o, Steven Rostedt, Jarkko Sakkinen, Michal
  Kubecek, Marco Elver, Al Viro, Keith Busch, Johannes Berg, Jan Kara,
  David Sterba, Connor Kuehl, Andy Lutomirski, Andrew Lunn, Alexandre
  Belloni, Peter Zijlstra, Russell King, Eric W. Biederman, Willy
  Tarreau, Christoph Hellwig, Emilio Cobos Álvarez, Christian Poveda,
  Mark Rousskov, John Ericson, TennyZhuang, Xuanwo, Daniel Paoliello,
  Manish Goregaokar, comex, Josh Stone, Stephan Sokolow, Philipp Krones,
  Guillaume Gomez, Joshua Nelson, Mats Larsen, Marc Poulhiès, Samantha
  Miller, Esteban Blanc, Martin Schmidt, Martin Rodriguez Reboredo,
  Daniel Xu, Viresh Kumar, Bartosz Golaszewski, Vegard Nossum, Milan
  Landaverde, Dariusz Sosnowski, Yuki Okushi, Matthew Bakhtiari, Wu
  XiangCheng, Tiago Lam, Boris-Chengbiao Zhou, Sumera Priyadarsini,
  Viktor Garske, Niklas Mohrin, Nándor István Krácser, Morgan Bartlett,
  Miguel Cano, Léo Lanteri Thauvin, Julian Merkle, Andreas Reindl,
  Jiapeng Chong, Fox Chen, Douglas Su, Antonio Terceiro, SeongJae Park,
  Sergio González Collado, Ngo Iok Ui (Wu Yu Wei), Joshua Abraham,
  Milan, Daniel Kolsoi, ahomescu, Manas, Luis Gerhorst, Li Hongyu,
  Philipp Gesang, Russell Currey, Jalil David Salamé Messina, Jon Olson,
  Raghvender, Angelos, Kaviraj Kanagaraj, Paul Römer, Sladyn Nunes,
  Mauro Baladés, Hsiang-Cheng Yang, Abhik Jain, Hongyu Li, Sean Nash,
  Yuheng Su, Peng Hao, Anhad Singh, Roel Kluin, Sara Saa, Geert
  Stappers, Garrett LeSage, IFo Hancroft, and Linus Torvalds"

Link: https://lwn.net/Articles/849849/
Link: https://github.com/Rust-for-Linux/linux/commits/rust
Link: https://github.com/metaspace/rust-linux/commit/d88c3744d6cbdf11767e08bad56cbfb67c4c96d0
Link: https://github.com/wedsonaf/linux/commit/9367032607f7670de0ba1537cf09ab0f4365a338
Link: https://github.com/AsahiLinux/linux/commits/gpu/rust-wip
* tag 'rust-v6.1-rc1' of https://github.com/Rust-for-Linux/linux: (27 commits)
  MAINTAINERS: Rust
  samples: add first Rust examples
  x86: enable initial Rust support
  docs: add Rust documentation
  Kbuild: add Rust support
  rust: add `.rustfmt.toml`
  scripts: add `is_rust_module.sh`
  scripts: add `rust_is_available.sh`
  scripts: add `generate_rust_target.rs`
  scripts: add `generate_rust_analyzer.py`
  scripts: decode_stacktrace: demangle Rust symbols
  scripts: checkpatch: enable language-independent checks for Rust
  scripts: checkpatch: diagnose uses of `%pA` in the C side as errors
  vsprintf: add new `%pA` format specifier
  rust: export generated symbols
  rust: add `kernel` crate
  rust: add `bindings` crate
  rust: add `macros` crate
  rust: add `compiler_builtins` crate
  rust: adapt `alloc` crate to the kernel
  ...

1  2 
Documentation/index.rst
MAINTAINERS
Makefile
scripts/checkpatch.pl

@@@ -12,84 -18,134 +12,85 @@@ documents into a coherent whole.  Pleas
  documentation are welcome; join the linux-doc list at vger.kernel.org if
  you want to help out.
  
 -Licensing documentation
 ------------------------
 +Working with the development community
 +--------------------------------------
  
 -The following describes the license of the Linux kernel source code
 -(GPLv2), how to properly mark the license of individual files in the source
 -tree, as well as links to the full license text.
 -
 -* :ref:`kernel_licensing`
 -
 -User-oriented documentation
 ----------------------------
 -
 -The following manuals are written for *users* of the kernel — those who are
 -trying to get it to work optimally on a given system.
 +The essential guides for interacting with the kernel's development
 +community and getting your work upstream.
  
  .. toctree::
 -   :maxdepth: 2
 -
 -   admin-guide/index
 -   kbuild/index
 -
 -Firmware-related documentation
 -------------------------------
 -The following holds information on the kernel's expectations regarding the
 -platform firmwares.
 +   :maxdepth: 1
  
 -.. toctree::
 -   :maxdepth: 2
 +   process/development-process
 +   process/submitting-patches
 +   Code of conduct <process/code-of-conduct>
 +   maintainer/index
 +   All development-process docs <process/index>
  
 -   firmware-guide/index
 -   devicetree/index
  
 -Application-developer documentation
 ------------------------------------
 +Internal API manuals
 +--------------------
  
 -The user-space API manual gathers together documents describing aspects of
 -the kernel interface as seen by application developers.
 +Manuals for use by developers working to interface with the rest of the
 +kernel.
  
  .. toctree::
 -   :maxdepth: 2
 -
 -   userspace-api/index
 +   :maxdepth: 1
  
 +   core-api/index
 +   driver-api/index
 +   subsystem-apis
 +   Locking in the kernel <locking/index>
  
 -Introduction to kernel development
 -----------------------------------
 +Development tools and processes
 +-------------------------------
  
 -These manuals contain overall information about how to develop the kernel.
 -The kernel community is quite large, with thousands of developers
 -contributing over the course of a year.  As with any large community,
 -knowing how things are done will make the process of getting your changes
 -merged much easier.
 +Various other manuals with useful information for all kernel developers.
  
  .. toctree::
 -   :maxdepth: 2
 +   :maxdepth: 1
  
 -   process/index
 -   dev-tools/index
 +   process/license-rules
     doc-guide/index
 +   dev-tools/index
 +   dev-tools/testing-overview
     kernel-hacking/index
     trace/index
 -   maintainer/index
     fault-injection/index
     livepatch/index
+    rust/index
  
  
 -Kernel API documentation
 -------------------------
 +User-oriented documentation
 +---------------------------
  
 -These books get into the details of how specific kernel subsystems work
 -from the point of view of a kernel developer.  Much of the information here
 -is taken directly from the kernel source, with supplemental material added
 -as needed (or at least as we managed to add it — probably *not* all that is
 -needed).
 +The following manuals are written for *users* of the kernel — those who are
 +trying to get it to work optimally on a given system and application
 +developers seeking information on the kernel's user-space APIs.
  
  .. toctree::
 -   :maxdepth: 2
 +   :maxdepth: 1
  
 -   driver-api/index
 -   core-api/index
 -   locking/index
 -   accounting/index
 -   block/index
 -   cdrom/index
 -   cpu-freq/index
 -   fb/index
 -   fpga/index
 -   hid/index
 -   i2c/index
 -   iio/index
 -   isdn/index
 -   infiniband/index
 -   leds/index
 -   netlabel/index
 -   networking/index
 -   pcmcia/index
 -   power/index
 -   target/index
 -   timers/index
 -   spi/index
 -   w1/index
 -   watchdog/index
 -   virt/index
 -   input/index
 -   hwmon/index
 -   gpu/index
 -   security/index
 -   sound/index
 -   crypto/index
 -   filesystems/index
 -   mm/index
 -   bpf/index
 -   usb/index
 -   PCI/index
 -   scsi/index
 -   misc-devices/index
 -   scheduler/index
 -   mhi/index
 -   peci/index
 -
 -Architecture-agnostic documentation
 ------------------------------------
 +   admin-guide/index
 +   The kernel build system <kbuild/index>
 +   admin-guide/reporting-issues.rst
 +   User-space tools <tools/index>
 +   userspace-api/index
 +
 +See also: the `Linux man pages <https://www.kernel.org/doc/man-pages/>`_,
 +which are kept separately from the kernel's own documentation.
 +
 +Firmware-related documentation
 +------------------------------
 +The following holds information on the kernel's expectations regarding the
 +platform firmwares.
  
  .. toctree::
 -   :maxdepth: 2
 +   :maxdepth: 1
 +
 +   firmware-guide/index
 +   devicetree/index
  
 -   asm-annotations
  
  Architecture-specific documentation
  -----------------------------------
diff --cc MAINTAINERS
Simple merge
diff --cc Makefile
Simple merge
Simple merge