Commit graph

1169232 commits

Author SHA1 Message Date
Jonathan Corbet
ff61f0791c docs: move x86 documentation into Documentation/arch/
Move the x86 documentation under Documentation/arch/ as a way of cleaning
up the top-level directory and making the structure of our docs more
closely match the structure of the source directories it describes.

All in-kernel references to the old paths have been updated.

Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: linux-arch@vger.kernel.org
Cc: x86@kernel.org
Cc: Borislav Petkov <bp@alien8.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/lkml/20230315211523.108836-1-corbet@lwn.net/
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2023-03-30 12:58:51 -06:00
Bagas Sanjaya
f030c8fd64 Documentation: kernel-parameters: Remove meye entry
Commit ba47652ba6 ("media: meye: remove this deprecated driver")
removes meye driver but forgets to purge its kernel-parameters.txt
entry, hence broken reference.

Remove the entry.

Link: https://lore.kernel.org/all/202302070341.OVqstpMM-lkp@intel.com/
Fixes: ba47652ba6 ("media: meye: remove this deprecated driver")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Link: https://lore.kernel.org/r/20230315100246.62324-1-bagasdotme@gmail.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2023-03-29 11:16:39 -06:00
Federico Vaga
1d6f52a7c8 doc:it_IT: translation alignment
Italian translation updated following these changes:

commit 901578a459 ("docs: recommend using Link: whenever using Reported-by:")"
commit 775a445d9a ("coding-style: fix title of Greg K-H's talk")
commit 1d2ed9234c ("Documentation: process: Document suitability of Proton Mail for kernel development")
commit 9d0f5cd167 ("docs: promote the title of process/index.rst")
commit d4563201f3 ("Documentation: simplify and clarify DCO contribution example language")
commit e7b4311ebc ("Replace HTTP links with HTTPS ones: Documentation/process")
commit 0b02076f99 ("docs: programming-language: add Rust programming language section")
commit 38484a1d0c ("docs: programming-language: remove mention of the Intel compiler")
commit b8885e2615 ("Documentation: front page: use recommended heading adornments")

Signed-off-by: Federico Vaga <federico.vaga@vaga.pv.it>
Link: https://lore.kernel.org/r/20230326130213.28755-1-federico.vaga@vaga.pv.it
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2023-03-29 10:47:38 -06:00
Akira Yokosawa
bd2c35d024 docs/sp_SP: Remove ZERO WIDTH SPACE in memory-barriers.txt
As this file is included literally, ZERO WIDTH SPACE causes
"make pdfdocs" to emit messages which read:

  Missing character: There is no ​ (U+200B) in font DejaVu Sans Mono/OT:script=latn;language=dflt;!
  Missing character: There is no ​ (U+200B) in font DejaVu Sans Mono/OT:script=latn;language=dflt;!

U+200B (ZERO WIDTH SPADE) has no effect in literal blocks.
Remove them and get rid of those noises.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
Acked-by: Carlos Bilbao <carlos.bilbao@amd.com>
Link: https://lore.kernel.org/r/c38176c7-c30a-4c2c-3516-8d3be1c267dc@gmail.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2023-03-29 10:45:33 -06:00
Jonathan Corbet
4f1bb0386d docs: create a top-level arch/ directory
As the first step in bringing some order to our architecture-specific
documentation, create a top-level arch/ directory and move arch.rst as its
index.rst file.

There is no change in the rendered docs at this point.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2023-03-23 13:27:27 -06:00
Thorsten Leemhuis
efe920466f docs: describe how to quickly build a trimmed kernel
Add a text explaining how to quickly build a kernel, as that's something
users will often have to do when they want to report an issue or test
proposed fixes. This is a huge and frightening task for quite a few
users these days, as many rely on pre-compiled kernels and have never
built their own. They find help on quite a few websites explaining the
process in various ways, but those howtos often omit important details
or make things too hard for the 'quickly build just for testing' case
that 'localmodconfig' is really useful for. Hence give users something
at hand to guide them, as that makes it easier for them to help with
testing, debugging, and fixing the kernel.

To keep the complexity at bay, the document explicitly focuses on how to
compile the kernel on commodity distributions running on commodity
hardware. People that deal with less common distributions or hardware
will often know their way around already anyway.

The text describes a few oddities of Arch and Debian that were found by
the author and a few volunteers that tested the described procedure.
There are likely more such quirks that need to be covered as well as a
few things the author will have missed -- but one has to start
somewhere.

The document heavily uses anchors and links to them, which makes things
slightly harder to read in the source form. But the intended target
audience is way more likely to read rendered versions of this text on
pages like docs.kernel.org anyway -- and there those anchors and links
allow easy jumps to the reference section and back, which makes the
document a lot easier to work with for the intended target audience.

Aspects relevant for bisection were left out on purpose, as that is a
related, but in the end different use case. The rough plan is to have a
second document with a similar style to cover bisection. The idea is to
reuse a few bits from this document and link quite often to entries in
the reference section with the help of the anchors in this text.

Signed-off-by: Thorsten Leemhuis <linux@leemhuis.info>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/1a788a8e7ba8a2063df08668f565efa832016032.1678021408.git.linux@leemhuis.info
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2023-03-23 12:05:44 -06:00
Jakub Wilk
775a445d9a coding-style: fix title of Greg K-H's talk
The talk title was inadvertently mangled in 8c27ceff36 ("docs: fix
locations of several documents that got moved").

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Link: https://lore.kernel.org/r/20230322215311.6579-1-jwilk@jwilk.net
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2023-03-23 12:04:08 -06:00
Tony Luck
054ed6349c Documentation/x86: Update split lock documentation
commit b041b525da ("x86/split_lock: Make life miserable for split
lockers") added a delay and serialization of split locks. Commit
727209376f ("x86/split_lock: Add sysctl to control the misery mode")
provided a sysctl to turn off the misery.

Update the split lock documentation to describe the current state of
the code.

Signed-off-by: Tony Luck <tony.luck@intel.com>
Link: https://lore.kernel.org/r/20230315225722.104607-1-tony.luck@intel.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2023-03-23 12:02:35 -06:00
Zang Leigang
1aa63d4eb8 docs/zh_CN: fix a wrong format
Add a missing markup for the code snippet at the end of lru_sort.rst

Signed-off-by: Zang Leigang <zangleigang@hisilicon.com>
Reviewed-by: Alex Shi <alexs@kernel.org>
Link: https://lore.kernel.org/r/20230316024519.27992-1-zangleigang@hisilicon.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2023-03-23 12:00:27 -06:00
Randy Dunlap
a894a8a56b Documentation: kernel-parameters: sort all "no..." parameters
Sort all of the "no..." kernel parameters into the correct order
as specified in kernel-parameters.rst: "into English Dictionary order
(defined as ignoring all punctuation and sorting digits before letters
in a case insensitive manner)".

No other changes here, just movement of lines.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Link: https://lore.kernel.org/r/20230317002635.16540-1-rdunlap@infradead.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2023-03-23 11:56:31 -06:00
Federico Vaga
c1f8e848fc doc:it_IT: translation alignment
Major update for maintainer-pgp-guide

commit e441273947 ("Documentation: raise minimum supported version of binutils to 2.25")
commit 67fe6792a7 ("Documentation: stable: Document alternative for referring upstream commit hash")
commit 8763a30bc1 ("docs: deprecated.rst: Add note about DECLARE_FLEX_ARRAY() usage
commit 2f993509a9 ("docs: process/5.Posting.rst: clarify use of Reported-by: tag")
commit a31323bef2 ("timers: Update the documentation to reflect on the new timer_shutdown() API")

Signed-off-by: Federico Vaga <federico.vaga@vaga.pv.it>
Link: https://lore.kernel.org/r/20230319134624.21327-1-federico.vaga@vaga.pv.it
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2023-03-23 11:27:00 -06:00
Bagas Sanjaya
0c4ff6f6c6 Documentation: maintainer-tip: Rectify link to "Describe your changes" section of submitting-patches.rst
The general changelog rules for the tip tree refers to "Describe your
changes" section of submitting patches guide. However, the internal link
reference targets to non-existent "submittingpatches" label, which
brings reader to the top of the linked doc.

Correct the target. No changes to submitting-patches.rst since the
required label is already there.

Fixes: 31c9d7c829 ("Documentation/process: Add tip tree handbook")
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20230320124327.174881-1-bagasdotme@gmail.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2023-03-23 11:25:30 -06:00
Mike Rapoport (IBM)
10d1813513 docs/mm: Physical Memory: add example of interleaving nodes
Add an example of memory layout with interleaving nodes where even memory
banks belong to node 0 and odd memory banks belong to node 1

Suggested-by: Michal Hocko <mhocko@kernel.org>
Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Link: https://lore.kernel.org/r/20230213154447.1631847-1-rppt@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2023-03-14 12:56:30 -06:00
Lukas Bulwahn
33fcc0e3c5 qnx4: credit contributors in CREDITS
Replace the content of the qnx4 README file with the canonical place for
such information.

Add the credits of the qnx4 contribution to CREDITS. As there is already a
QNX4 FILESYSTEM section in MAINTAINERS, it is clear who to contact and send
patches to.

Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Acked-By: Anders Larsen <al@alarsen.net>
Link: https://lore.kernel.org/r/20230220170210.15677-3-lukas.bulwahn@gmail.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2023-03-14 12:56:30 -06:00
Lukas Bulwahn
3fe899e464 qnx6: credit contributor and mark filesystem orphan
Replace the content of the qnx6 README file with the canonical places for
such information.

Add the credits of the qnx6 contribution to CREDITS, and add an section in
MAINTAINERS to mark this filesystem as Orphan, as the domain ontika.net and
email address does not resolve to an IP address anymore.

Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Link: https://lore.kernel.org/r/20230220170210.15677-2-lukas.bulwahn@gmail.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2023-03-14 12:56:30 -06:00
Carlos Bilbao
9121782e02 docs: Add relevant kernel publications to list of books
For the list of kernel published books, include publication covering kernel
debugging from August, 2022 (ISBN 978-1801075039) and one from March, 2021
on the topic of char device drivers and kernel synchronization (ISBN
978-1801079518). Also add foundational book from Robert Love (ISBN
978-1449339531) and remove extra spaces.

Co-developed-by: Kaiwan N Billimoria <kaiwan.billimoria@gmail.com>
Signed-off-by: Kaiwan N Billimoria <kaiwan.billimoria@gmail.com>
Signed-off-by: Carlos Bilbao <carlos.bilbao@amd.com>

Link: https://lore.kernel.org/r/20230222183445.3127324-1-carlos.bilbao@amd.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2023-03-14 12:56:11 -06:00
Randy Dunlap
c500488f23 Documentation: kernel-parameters: sort NFS parameters
Sort the NFS kernel command line parameters. This is done in 4 groups
so as to not have them intermingled: 'nfs' module parameters, 'nfs4'
module parameters, 'nfsd' module parameters, and nfs "global" (__setup,
no module) parameters.

There were 5 parameters which were listed with a space between the
parameter name and the following '=' sign. The space has been
removed since module parameters expect 'parameter=' with no intervening
space.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org
Cc: Trond Myklebust <trond.myklebust@hammerspace.com>
Cc: Anna Schumaker <anna@kernel.org>
Cc: Chuck Lever <chuck.lever@oracle.com>
Cc: Jeff Layton <jlayton@kernel.org>
Cc: linux-nfs@vger.kernel.org
Link: https://lore.kernel.org/r/20230227025816.1083-1-rdunlap@infradead.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2023-03-14 12:43:36 -06:00
Lukas Bulwahn
184cd8aa0c docs: admin: unicode: update information on state of lanana.org document
Replace link to a non-existing page with a note that lanana.org does not
maintain Linux Zone Unicode Assignments anymore.

Remove the reference to H. Peter Anvin and the unicode lanana.org email as
the maintainer of this file, as at this point, this is all maintained by
the general kernel community.

Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Link: https://lore.kernel.org/r/20230307144000.29539-3-lukas.bulwahn@gmail.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2023-03-14 12:27:39 -06:00
Lukas Bulwahn
b49cfd85a3 MAINTAINERS: remove historic section DEVICE NUMBER REGISTRY
As described in Documentation/admin-guide/devices.rst, the device number
registry (or linux device list) is at Documentation/admin-guide/devices.txt
and no longer maintained at lanana.org.

The devices.txt file is basically community-maintained, and there is no
other dedicated maintainer or contact for that file nowadays.

Remove the historic section DEVICE NUMBER REGISTRY in MAINTAINERS.

Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Link: https://lore.kernel.org/r/20230307144000.29539-2-lukas.bulwahn@gmail.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2023-03-14 12:27:39 -06:00
Theodore Ts'o
10a29eb658 Documentation/process: Add Linux Kernel Contribution Maturity Model
As a follow-up to a discussion at the 2021 Maintainer's Summit on the
topic of maintainer recruitment and retention, the TAB took on the
task of creating a document which to help companies and other
organizations to grow in their ability to engage with the Linux Kernel
development community, using the Maturity Model[2] framework.

The goal is to encourage, in a management-friendly way, companies to
allow their engineers to contribute with the upstream Linux Kernel
development community, so we can grow the "talent pipeline" for
contributors to become respected leaders, and eventually kernel
maintainers.

[1] https://lwn.net/Articles/870581/
[2] https://en.wikipedia.org/wiki/Maturity_model

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Co-developed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Co-developed-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Acked-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Link: https://lore.kernel.org/r/20230308190403.2157046-1-tytso@mit.edu
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2023-03-14 12:22:59 -06:00
Carlos Bilbao
456ef6b083 docs/sp_SP: Add translation of process/deprecated
Translate Documentation/process/deprecated.rst into Spanish.

Co-developed-by: Sergio Gonzalez <sergio.collado@gmail.com>
Signed-off-by: Sergio Gonzalez <sergio.collado@gmail.com>
Signed-off-by: Carlos Bilbao <carlos.bilbao@amd.com>
Link: https://lore.kernel.org/r/20230310163651.2500175-1-carlos.bilbao@amd.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2023-03-14 12:14:22 -06:00
Alexander Mikhalitsyn
592d80727f docs: filesystems: vfs: actualize struct super_operations description
Added/updated descriptions for super_operations:
- free_inode method
- evict_inode method
- freeze_super/thaw_super method
- show_{devname,path,stats} procfs-related methods
- get_dquots method

Cc: Eric Biggers <ebiggers@kernel.org>
Cc: Miklos Szeredi <mszeredi@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christian Brauner <brauner@kernel.org>
Cc: linux-fsdevel@vger.kernel.org
Cc: linux-doc@vger.kernel.org
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Reviewed-by: Christian Brauner <brauner@kernel.org>
Link: https://lore.kernel.org/r/20230313130718.253708-3-aleksandr.mikhalitsyn@canonical.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2023-03-14 12:12:12 -06:00
Alexander Mikhalitsyn
85bf9a0ee2 docs: filesystems: vfs: actualize struct file_system_type description
Added descriptions for:
- fscontext API ('init_fs_context' method, 'parameters' field)
- 'fs_supers' field

Cc: Eric Biggers <ebiggers@kernel.org>
Cc: Miklos Szeredi <mszeredi@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christian Brauner <brauner@kernel.org>
Cc: linux-fsdevel@vger.kernel.org
Cc: linux-doc@vger.kernel.org
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Reviewed-by: Christian Brauner <brauner@kernel.org>
Link: https://lore.kernel.org/r/20230313130718.253708-2-aleksandr.mikhalitsyn@canonical.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2023-03-14 12:12:11 -06:00
Randy Dunlap
d2ea66a69f Documentation: fs/proc: corrections and update
Update URL for the latest online version of this document.
Correct "files" to "fields" in a few places.
Update /proc/scsi, /proc/stat, and /proc/fs/ext4 information.
Drop /usr/src/ from the location of the kernel source tree.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org
Cc: linux-fsdevel@vger.kernel.org
Reviewed-by: Christian Brauner <brauner@kernel.org>
Link: https://lore.kernel.org/r/20230314060347.605-1-rdunlap@infradead.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2023-03-14 11:38:13 -06:00
Jiri Pirko
d7ba3657d5 docs: vfio: fix header path
The text points to a different header file, fix by changing
the path to "uapi".

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Yi Liu <yi.l.liu@intel.com>
Link: https://lore.kernel.org/r/20230310095857.985814-1-jiri@resnulli.us
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2023-03-14 11:31:57 -06:00
Xujun Leng
42da2c00b9 docs: process: typo fix
In the second paragraph of section "Respond to review comments", there is
a spelling mistake: "aganst" should be "against".

Signed-off-by: Xujun Leng <lengxujun2007@126.com>
Link: https://lore.kernel.org/r/20230312071423.3042-1-lengxujun2007@126.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2023-03-14 11:31:08 -06:00
Mike Rapoport (IBM)
87eae26099 docs/mm: hugetlbfs_reserv: fix a reference to a file that doesn't exist
kbuild reports:

>> Warning: Documentation/mm/hugetlbfs_reserv.rst references a file that doesn't exist: Documentation/mm/hugetlbpage.rst
>> Warning: Documentation/translations/zh_CN/mm/hugetlbfs_reserv.rst references a file that doesn't exist: Documentation/mm/hugetlbpage.rst

Fix the filename to be 'Documentation/admin-guide/mm/hugetlbpage.rst'.

Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/oe-kbuild-all/202302231854.sKlCmx9K-lkp@intel.com/
Fixes: ee86588960 ("docs/mm: remove useless markup")
Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
Link: https://lore.kernel.org/r/20230224100306.2287696-2-rppt@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2023-03-07 10:31:49 -07:00
Mike Rapoport (IBM)
3b80a03d45 docs/mm: Physical Memory: fix a reference to a file that doesn't exist
kbuild reports:

>> Warning: Documentation/mm/physical_memory.rst references a file that doesn't exist: Documentation/admin-guide/mm/memory_hotplug.rst

Fix the filename to be 'Documentation/admin-guide/mm/memory-hotplug.rst'.

Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/oe-kbuild-all/202302231311.567PAoS2-lkp@intel.com/
Fixes: 353c7dd636 ("docs/mm: Physical Memory: remove useless markup")
Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
Link: https://lore.kernel.org/r/20230224100306.2287696-1-rppt@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2023-03-07 10:31:49 -07:00
Uwe Kleine-König
a414684e3b docs: rebasing-and-merging: Drop wrong statement about git
The "^0" syntax is no longer needed to fast-forward to a mainline commit;
take that out and add --ff-only to force an error if fast-forward is not
possible.

Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
[jc: rewrote changelog]
Link: https://lore.kernel.org/r/20230228134657.1797871-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2023-03-07 10:26:22 -07:00
Miguel Ojeda
0b02076f99 docs: programming-language: add Rust programming language section
Following the C text in the file, add a mention about the Rust
programming language, the currently supported compiler and
the edition used (similar to the "dialect" mention for C).

Similarly, add a mention about the unstable features used (similar
to the "extensions" mentions for C).

In addition, add some links to complement the information.

Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Link: https://lore.kernel.org/r/20230306191712.230658-2-ojeda@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2023-03-07 10:24:40 -07:00
Miguel Ojeda
38484a1d0c docs: programming-language: remove mention of the Intel compiler
The Intel compiler support has been removed in commit 95207db816
("Remove Intel compiler support").

Thus remove its mention in the Documentation too.

Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Link: https://lore.kernel.org/r/20230306191712.230658-1-ojeda@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2023-03-07 10:24:40 -07:00
Glenn Washburn
7459608579 docs: Correct missing "d_" prefix for dentry_operations member d_weak_revalidate
The details for struct dentry_operations member d_weak_revalidate is
missing a "d_" prefix.

Fixes: af96c1e304 ("docs: filesystems: vfs: Convert vfs.txt to RST")
Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Link: https://lore.kernel.org/r/20230227184042.2375235-1-development@efficientek.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2023-03-07 10:21:11 -07:00
Song Shuai
5d89176af1 sched/doc: supplement CPU capacity with RISC-V
This commit 7d2078310c ("dt-bindings: arm: move cpu-capacity to a
shared loation") updates some references about capacity-dmips-mhz
property in this document.

The list of architectures using capacity-dmips-mhz omits RISC-V, so
supplements it here.

Signed-off-by: Song Shuai <suagrfillet@gmail.com>
Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com> # English
Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
Reviewed-by: Alex Shi <alexs@kernel.org>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20230227105941.2749193-1-suagrfillet@gmail.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2023-03-07 10:19:04 -07:00
Linus Torvalds
fe15c26ee2 Linux 6.3-rc1 2023-03-05 14:52:03 -08:00
Linus Torvalds
596ff4a09b cpumask: re-introduce constant-sized cpumask optimizations
Commit aa47a7c215 ("lib/cpumask: deprecate nr_cpumask_bits") resulted
in the cpumask operations potentially becoming hugely less efficient,
because suddenly the cpumask was always considered to be variable-sized.

The optimization was then later added back in a limited form by commit
6f9c07be9d ("lib/cpumask: add FORCE_NR_CPUS config option"), but that
FORCE_NR_CPUS option is not useful in a generic kernel and more of a
special case for embedded situations with fixed hardware.

Instead, just re-introduce the optimization, with some changes.

Instead of depending on CPUMASK_OFFSTACK being false, and then always
using the full constant cpumask width, this introduces three different
cpumask "sizes":

 - the exact size (nr_cpumask_bits) remains identical to nr_cpu_ids.

   This is used for situations where we should use the exact size.

 - the "small" size (small_cpumask_bits) is the NR_CPUS constant if it
   fits in a single word and the bitmap operations thus end up able
   to trigger the "small_const_nbits()" optimizations.

   This is used for the operations that have optimized single-word
   cases that get inlined, notably the bit find and scanning functions.

 - the "large" size (large_cpumask_bits) is the NR_CPUS constant if it
   is an sufficiently small constant that makes simple "copy" and
   "clear" operations more efficient.

   This is arbitrarily set at four words or less.

As a an example of this situation, without this fixed size optimization,
cpumask_clear() will generate code like

        movl    nr_cpu_ids(%rip), %edx
        addq    $63, %rdx
        shrq    $3, %rdx
        andl    $-8, %edx
        callq   memset@PLT

on x86-64, because it would calculate the "exact" number of longwords
that need to be cleared.

In contrast, with this patch, using a MAX_CPU of 64 (which is quite a
reasonable value to use), the above becomes a single

	movq $0,cpumask

instruction instead, because instead of caring to figure out exactly how
many CPU's the system has, it just knows that the cpumask will be a
single word and can just clear it all.

Note that this does end up tightening the rules a bit from the original
version in another way: operations that set bits in the cpumask are now
limited to the actual nr_cpu_ids limit, whereas we used to do the
nr_cpumask_bits thing almost everywhere in the cpumask code.

But if you just clear bits, or scan for bits, we can use the simpler
compile-time constants.

In the process, remove 'cpumask_complement()' and 'for_each_cpu_not()'
which were not useful, and which fundamentally have to be limited to
'nr_cpu_ids'.  Better remove them now than have somebody introduce use
of them later.

Of course, on x86-64 with MAXSMP there is no sane small compile-time
constant for the cpumask sizes, and we end up using the actual CPU bits,
and will generate the above kind of horrors regardless.  Please don't
use MAXSMP unless you really expect to have machines with thousands of
cores.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2023-03-05 14:30:34 -08:00
Linus Torvalds
f915322fe0 This push fixes a regression in the caam driver.
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEn51F/lCuNhUwmDeSxycdCkmxi6cFAmP9vBEACgkQxycdCkmx
 i6dZTRAAwLbPc5PDEHGU16VldY8tJnn4Zb+LTjmeWMBhqcROLhl9ofIl97g/88DH
 n3tHZ8Rxcj2+y9mSp7xu4qXZGE9ECo9ka3SWBGBRaNI05bNDWuWBXh9tBcnf9yst
 TETw9Bmv7fsKbMo6qi8ZICJobGqCd5wFGUYqYJNcET+jLY84PX2PxcyJTul7tMy6
 tzWjgiankQRGknpF3nWJ3v9kXOu+aOgU6eEJ56ty27nTgsAlD4frkTUmlx3+Dckl
 V0D6t8Ctgy4JOvqWr+2Ng2VuO2r9k0OkqXR7/jdT4pV990bmdbocKWWDEuTktjTq
 qtJOKZ2v9QyNFYX9yMGHYocP7CSG8vYyjf24y16jjUZYATWs7XVdENIldjSnr4hG
 wmIpZ3Nsc1R8usWzA+B4Puknc/GXgawryDPO+v5WBtRDWC6xBQdRo6vZqRS3FWB5
 sgWFh1lSCU9jEL3NXUK/GF8AgsUCBX+1L1JViTju760ABXq5+PvdSr9o/8DrbMUJ
 HXQo3Ia54vt2RuwkAB/lOZx2Phsg38kXS2pjoFh4l1O0qvifc+jZfvsF2gSUQpud
 +ugoSSL6U8C9uCpgColodECOiCToGjJ58i3kOFA5W2RbD5Wn7Tk/xU/n4DFFnE4L
 6AZqaxYxYkDvdhFgIASID1GRtZmedCEgaTB8/VKY6qRPJvjbd6c=
 =a8T+
 -----END PGP SIGNATURE-----

Merge tag 'v6.3-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

Pull crypto fix from Herbert Xu:
 "Fix a regression in the caam driver"

* tag 'v6.3-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: caam - Fix edesc/iv ordering mixup
2023-03-05 11:32:30 -08:00
Linus Torvalds
7f9ec7d816 A small set of updates for x86:
- Return -EIO instead of success when the certificate buffer for SEV
    guests is not large enough.
 
  - Allow STIPB to be enabled with legacy IBSR. Legacy IBRS is cleared on
    return to userspace for performance reasons, but the leaves user space
    vulnerable to cross-thread attacks which STIBP prevents. Update the
    documentation accordingly.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCgAxFiEEQp8+kY+LLUocC4bMphj1TA10mKEFAmQEVnETHHRnbHhAbGlu
 dXRyb25peC5kZQAKCRCmGPVMDXSYoegJEACbn+CQKFxB4kXJ1xBamYsqQfxY1mM1
 yFziEVH3VCXSshfvKePH7fnoAUHTzhy+SjN6c1ERvl82WVXm/BoF2B81KpN9Yd18
 R6wTpIS227Pn+Ll1yfVQJMHrb0mnSczo5vCGyOzMOxkqIbNCkHRMoeSBspfNLLGM
 3D2+IQqBaqBgNzPQ3JHrwRqQAy/3ZJT4IrHSFe0LwgYQ/EeAGydY8UN0wB1y5YN0
 SoFhPd7B7UWxUD7PrfriBc3B2HN44QkMpe/fQJ4y0GVF+1Uqp6Ti7ouCEVg60A3g
 8kiS+98FBIzHySk+xfX/vlhiQD/J2c6/+p28gw+iGf6YmUsQbeu64tV5TAUGGBN+
 kErLvJmJnC/dwWiEMXzv/e6sNKoZi0Yz/JVq6atuoT/521cjDEDapZRxBSmaW33M
 Zn6YF8FIsUTHGdt9Equ+HPjZZTyk34W8f0d0N+lws0QNWtk5d0KU5XP2PDp+Mj6O
 dGVaGv88qmMIr0o/s9CgvpefSM8L7fC0WQwRpRr905gu8k6YxuEWQofuh365ZcKT
 sEDeRqZYi+ue4+gW1GRje6M5ODftTWoLPlX2f+iZui1gwwpuczvj0sRR10kKfKRD
 qxpHcxyIzS2MW4aT1JnVgeWStt0x5wWeq1qzO1bwBJCAlS63vln/mUnBq7+uV0ca
 KiEah5vP4dcenA==
 =1RwH
 -----END PGP SIGNATURE-----

Merge tag 'x86-urgent-2023-03-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 updates from Thomas Gleixner:
 "A small set of updates for x86:

   - Return -EIO instead of success when the certificate buffer for SEV
     guests is not large enough

   - Allow STIPB to be enabled with legacy IBSR. Legacy IBRS is cleared
     on return to userspace for performance reasons, but the leaves user
     space vulnerable to cross-thread attacks which STIBP prevents.
     Update the documentation accordingly"

* tag 'x86-urgent-2023-03-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  virt/sev-guest: Return -EIO if certificate buffer is not large enough
  Documentation/hw-vuln: Document the interaction between IBRS and STIBP
  x86/speculation: Allow enabling STIBP with legacy IBRS
2023-03-05 11:27:48 -08:00
Linus Torvalds
4e9c542c7a A set of updates for the interrupt susbsystem:
- Prevent possible NULL pointer derefences in irq_data_get_affinity_mask()
     and irq_domain_create_hierarchy().
 
   - Take the per device MSI lock before invoking code which relies
     on it being hold.
 
   - Make sure that MSI descriptors are unreferenced before freeing
     them. This was overlooked when the platform MSI code was converted to
     use core infrastructure and results in a fals positive warning.
 
   - Remove dead code in the MSI subsystem.
 
   - Clarify the documentation for pci_msix_free_irq().
 
   - More kobj_type constification.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCgAxFiEEQp8+kY+LLUocC4bMphj1TA10mKEFAmQEVToTHHRnbHhAbGlu
 dXRyb25peC5kZQAKCRCmGPVMDXSYodc9EACg5HBOGsh5OV8pwnuEDqfThK/dOZ5k
 LJ8xQjGAx29JeNWu4gkkHaSDEGjZhwLiZlB6qUeH+LPQ1NgmAlLL3T2NxEOOWa6y
 z/xQv+1Ceu6XxazpCSFRWR/6w4Nyup92jhlsUIkmmsWkVvKH/pV6Uo+3ta0WagWg
 heb3vqts6J0AOJaMepF8azYGbwAPSIElNLI1UtiEuQYEKU55N8jLK20VJTL6lzJ2
 FyRg/0ghNWDAaBdnv4cZCQ/MzoG5UkoU3f2cqhdSce5mqnq2fKRfgBjzllNgaRgA
 zxOxIR88QaKTMHIr+WKD1dyWxDQlotFbBOkmVW39XAa13rn42s4GIeW88VCjJGww
 RAm52SbC48cCIyNQlh4A6Vhb4vjPx2DndWbWnnVj5fWlUevdAPRxSlm4BjfxFxe+
 LbuZCRRL1jjlC0fXmhVXTTxeE1/K7jarAZwRV7Nxhr3g0gT+Zv1jyaaW9rWuHq5U
 3pS+xBl89LA/VYp9tv6jDfJlocmRwgrFbGX4UlfikqtObdTFqcH0FtmqisE61fZS
 n0194BMWNDfPSibSpDohf/CDPoHZ6pNxeuqkVDiisUJHPpIYOt8+lH+8//DgBL7a
 oi9zS0JazPIn2VM6NB4f/WXOYmS9GZq5+loiYEWb52AYtodKUKmOoWG0SUyy6XFr
 E7yJzemsUwrJVg==
 =jWot
 -----END PGP SIGNATURE-----

Merge tag 'irq-urgent-2023-03-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull irq updates from Thomas Gleixner:
 "A set of updates for the interrupt susbsystem:

   - Prevent possible NULL pointer derefences in
     irq_data_get_affinity_mask() and irq_domain_create_hierarchy()

   - Take the per device MSI lock before invoking code which relies on
     it being hold

   - Make sure that MSI descriptors are unreferenced before freeing
     them. This was overlooked when the platform MSI code was converted
     to use core infrastructure and results in a fals positive warning

   - Remove dead code in the MSI subsystem

   - Clarify the documentation for pci_msix_free_irq()

   - More kobj_type constification"

* tag 'irq-urgent-2023-03-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  genirq/msi, platform-msi: Ensure that MSI descriptors are unreferenced
  genirq/msi: Drop dead domain name assignment
  irqdomain: Add missing NULL pointer check in irq_domain_create_hierarchy()
  genirq/irqdesc: Make kobj_type structures constant
  PCI/MSI: Clarify usage of pci_msix_free_irq()
  genirq/msi: Take the per-device MSI lock before validating the control structure
  genirq/ipi: Fix NULL pointer deref in irq_data_get_affinity_mask()
2023-03-05 11:19:16 -08:00
Linus Torvalds
1a90673e17 Adding Christian Brauner as VFS co-maintainer.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQqUNBr3gm4hGXdBJlZ7Krx/gZQ6wUCZATnmQAKCRBZ7Krx/gZQ
 64syAQC4jRyqgF8kpFv1s0j9tvArOr0hZHcFbkrVoGj20y/L7QEAo3EDAVInoDRZ
 qoEENXAt4t5cH2EBb8vjZpNAcbhZ2Q0=
 =yCsJ
 -----END PGP SIGNATURE-----

Merge tag 'pull-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull vfs update from Al Viro:
 "Adding Christian Brauner as VFS co-maintainer"

* tag 'pull-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  Adding VFS co-maintainer
2023-03-05 11:11:52 -08:00
Linus Torvalds
1a8d05a726 VM_FAULT_RETRY fixes
Some of the page fault handlers do not deal with the following case
 correctly:
 	* handle_mm_fault() has returned VM_FAULT_RETRY
 	* there is a pending fatal signal
 	* fault had happened in kernel mode
 Correct action in such case is not "return unconditionally" - fatal
 signals are handled only upon return to userland and something like
 copy_to_user() would end up retrying the faulting instruction and
 triggering the same fault again and again.
 
 What we need to do in such case is to make the caller to treat that
 as failed uaccess attempt - handle exception if there is an exception
 handler for faulting instruction or oops if there isn't one.
 
 Over the years some architectures had been fixed and now are handling
 that case properly; some still do not.  This series should fix the
 remaining ones.
 
 Status:
 	m68k, riscv, hexagon, parisc: tested/acked by maintainers.
 	alpha, sparc32, sparc64: tested locally - bug has been
 reproduced on the unpatched kernel and verified to be fixed by
 this series.
 	ia64, microblaze, nios2, openrisc: build, but otherwise
 completely untested.
 
 Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQqUNBr3gm4hGXdBJlZ7Krx/gZQ6wUCZAP54AAKCRBZ7Krx/gZQ
 6/IjAP92oS8kDuodAtT7WorV+GETWr2HFKfvDiPSmEGiSnXIigD9Hj9svXyeeAgl
 /TqGR50Yrvn3IUQ0A0bUDpBAG1qyVwY=
 =9+Bd
 -----END PGP SIGNATURE-----

Merge tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull VM_FAULT_RETRY fixes from Al Viro:
 "Some of the page fault handlers do not deal with the following case
  correctly:

   - handle_mm_fault() has returned VM_FAULT_RETRY

   - there is a pending fatal signal

   - fault had happened in kernel mode

  Correct action in such case is not "return unconditionally" - fatal
  signals are handled only upon return to userland and something like
  copy_to_user() would end up retrying the faulting instruction and
  triggering the same fault again and again.

  What we need to do in such case is to make the caller to treat that as
  failed uaccess attempt - handle exception if there is an exception
  handler for faulting instruction or oops if there isn't one.

  Over the years some architectures had been fixed and now are handling
  that case properly; some still do not. This series should fix the
  remaining ones.

  Status:

   - m68k, riscv, hexagon, parisc: tested/acked by maintainers.

   - alpha, sparc32, sparc64: tested locally - bug has been reproduced
     on the unpatched kernel and verified to be fixed by this series.

   - ia64, microblaze, nios2, openrisc: build, but otherwise completely
     untested"

* tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  openrisc: fix livelock in uaccess
  nios2: fix livelock in uaccess
  microblaze: fix livelock in uaccess
  ia64: fix livelock in uaccess
  sparc: fix livelock in uaccess
  alpha: fix livelock in uaccess
  parisc: fix livelock in uaccess
  hexagon: fix livelock in uaccess
  riscv: fix livelock in uaccess
  m68k: fix livelock in uaccess
2023-03-05 11:07:58 -08:00
Masahiro Yamada
95207db816 Remove Intel compiler support
include/linux/compiler-intel.h had no update in the past 3 years.

We often forget about the third C compiler to build the kernel.

For example, commit a0a12c3ed0 ("asm goto: eradicate CC_HAS_ASM_GOTO")
only mentioned GCC and Clang.

init/Kconfig defines CC_IS_GCC and CC_IS_CLANG but not CC_IS_ICC,
and nobody has reported any issue.

I guess the Intel Compiler support is broken, and nobody is caring
about it.

Harald Arnesen pointed out ICC (classic Intel C/C++ compiler) is
deprecated:

    $ icc -v
    icc: remark #10441: The Intel(R) C++ Compiler Classic (ICC) is
    deprecated and will be removed from product release in the second half
    of 2023. The Intel(R) oneAPI DPC++/C++ Compiler (ICX) is the recommended
    compiler moving forward. Please transition to use this compiler. Use
    '-diag-disable=10441' to disable this message.
    icc version 2021.7.0 (gcc version 12.1.0 compatibility)

Arnd Bergmann provided a link to the article, "Intel C/C++ compilers
complete adoption of LLVM".

lib/zstd/common/compiler.h and lib/zstd/compress/zstd_fast.c were kept
untouched for better sync with https://github.com/facebook/zstd

Link: https://www.intel.com/content/www/us/en/developer/articles/technical/adoption-of-llvm-complete-icx.html
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2023-03-05 10:49:37 -08:00
Al Viro
3304f18bfc Adding VFS co-maintainer
Acked-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2023-03-05 10:31:17 -05:00
Linus Torvalds
b01fe98d34 Some improvements/fixes for the newly added GXP driver and a Kconfig
dependency fix
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmQDv0UACgkQFA3kzBSg
 KbayuQ/+Mef7weYfGsC6lAMsTaSIpa9yAg4iQpF1qSNkEomDPmXGsFC8wpWSnOCD
 tihCOP7OIjzRMut3vHMa8CMSV8Vs+KfwEi1DodnEA8i7rOz35rzAoekM0kHBbGV8
 DNQj3hq3aOvZ1scrfN6uTc1FhpxO4+9hY95o+zzfbakS6jXlMC8LAnEPCJzySwtH
 65ngrEMB+X0j+2tgTPwQy9z5l0C+KC/c9MS71bNzc00KWyVHLOx4HbA23QwcVgnV
 zpxa7HrjN1EqpyPOqANmpI9uLgRN2DL52vRaos1e64NJChRyArRzGVdablry7oc1
 ygyz7rsZHSEI7uXmQ+IMNeOVPaRAw5kUXXELem8PVtUI9sInQV6JR7g4NBm+mHrb
 8VIwe1R1bJAb1vKocMkZdFsTwpbJjt30w1vARMlffZzit97/Vucbjz+3W0KR+FSl
 iVBW73D9SdJ1T4lU5gOKEOfrZhsoNv5ut39gi/DOFj4NvSmu5GbSvv1gBvwmaTxS
 8pgpvd5d0nOLkeIDi9oBDPmSvUmb357Wor8wtTmAVDBWwih8nR+BLFU8oz0lHvYn
 9UtX2yAalrcPHcA+EFZyvxzm8u7GBdTS0OcM2/FIBiQhcBLiWe7rrumk1wDo2K2k
 cPl/+gFcq5escMsxmGc/US2L4xw1oCT3P+Y38SSYig8pqDG7mdY=
 =5XFG
 -----END PGP SIGNATURE-----

Merge tag 'i2c-for-6.3-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull more i2c updates from Wolfram Sang:
 "Some improvements/fixes for the newly added GXP driver and a Kconfig
  dependency fix"

* tag 'i2c-for-6.3-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: gxp: fix an error code in probe
  i2c: gxp: return proper error on address NACK
  i2c: gxp: remove "empty" switch statement
  i2c: Disable I2C_APPLE when I2C_PASEMI is a builtin
2023-03-04 14:48:29 -08:00
Linus Torvalds
e77d587a2c mm: avoid gcc complaint about pointer casting
The migration code ends up temporarily stashing information of the wrong
type in unused fields of the newly allocated destination folio.  That
all works fine, but gcc does complain about the pointer type mis-use:

    mm/migrate.c: In function ‘__migrate_folio_extract’:
    mm/migrate.c:1050:20: note: randstruct: casting between randomized structure pointer types (ssa): ‘struct anon_vma’ and ‘struct address_space’

     1050 |         *anon_vmap = (void *)dst->mapping;
          |         ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~

and gcc is actually right to complain since it really doesn't understand
that this is a very temporary special case where this is ok.

This could be fixed in different ways by just obfuscating the assignment
sufficiently that gcc doesn't see what is going on, but the truly
"proper C" way to do this is by explicitly using a union.

Using unions for type conversions like this is normally hugely ugly and
syntactically nasty, but this really is one of the few cases where we
want to make it clear that we're not doing type conversion, we're really
re-using the value bit-for-bit just using another type.

IOW, this should not become a common pattern, but in this one case using
that odd union is probably the best way to document to the compiler what
is conceptually going on here.

[ Side note: there are valid cases where we convert pointers to other
  pointer types, notably the whole "folio vs page" situation, where the
  types actually have fundamental commonalities.

  The fact that the gcc note is limited to just randomized structures
  means that we don't see equivalent warnings for those cases, but it
  migth also mean that we miss other cases where we do play these kinds
  of dodgy games, and this kind of explicit conversion might be a good
  idea. ]

I verified that at least for an allmodconfig build on x86-64, this
generates the exact same code, apart from line numbers and assembler
comment changes.

Fixes: 64c8902ed4 ("migrate_pages: split unmap_and_move() to _unmap() and _move()")
Cc: Huang, Ying <ying.huang@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2023-03-04 14:03:27 -08:00
Linus Torvalds
20fdfd55ab 17 hotfixes. Eight are for MM and seven are for other parts of the
kernel.  Seven are cc:stable and eight address post-6.3 issues or were
 judged unsuitable for -stable backporting.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQTTMBEPP41GrTpTJgfdBJ7gKXxAjgUCZAO0bAAKCRDdBJ7gKXxA
 jo73AP0Sbgd+E0u5Hs+aACHW28FpxleVRdyexc5chXD5QsyLKgEAwjntE7jfHHYK
 GkUKsoWQJblgjm3ksRxdLbVkDSQ8sQE=
 =CQ0B
 -----END PGP SIGNATURE-----

Merge tag 'mm-hotfixes-stable-2023-03-04-13-12' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Pull misc fixes from Andrew Morton:
 "17 hotfixes.

  Eight are for MM and seven are for other parts of the kernel. Seven
  are cc:stable and eight address post-6.3 issues or were judged
  unsuitable for -stable backporting"

* tag 'mm-hotfixes-stable-2023-03-04-13-12' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
  mailmap: map Dikshita Agarwal's old address to his current one
  mailmap: map Vikash Garodia's old address to his current one
  fs/cramfs/inode.c: initialize file_ra_state
  fs: hfsplus: fix UAF issue in hfsplus_put_super
  panic: fix the panic_print NMI backtrace setting
  lib: parser: update documentation for match_NUMBER functions
  kasan, x86: don't rename memintrinsics in uninstrumented files
  kasan: test: fix test for new meminstrinsic instrumentation
  kasan: treat meminstrinsic as builtins in uninstrumented files
  kasan: emit different calls for instrumentable memintrinsics
  ocfs2: fix non-auto defrag path not working issue
  ocfs2: fix defrag path triggering jbd2 ASSERT
  mailmap: map Georgi Djakov's old Linaro address to his current one
  mm/hwpoison: convert TTU_IGNORE_HWPOISON to TTU_HWPOISON
  lib/zlib: DFLTCC deflate does not write all available bits for Z_NO_FLUSH
  mm/damon/paddr: fix missing folio_put()
  mm/mremap: fix dup_anon_vma() in vma_merge() case 4
2023-03-04 13:32:50 -08:00
Linus Torvalds
c29214bc89 powerpc fixes for 6.3 #2
- Drop orphaned VAS MAINTAINERS entry.
 
  - Fix build errors with clang and KCSAN.
 
  - Avoid build errors seen with LD_DEAD_CODE_DATA_ELIMINATION & recordmcount.
 
 Thanks to: Nathan Chancellor
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEJFGtCPCthwEv2Y/bUevqPMjhpYAFAmQDMKkTHG1wZUBlbGxl
 cm1hbi5pZC5hdQAKCRBR6+o8yOGlgLfAD/4uzHcBQUzhSIUeQfKcONRynNTAi5Wn
 EwAvfEfp0amFUnakKpY+HXcL8Rt2KHzdD83O25lGaqu3MZpaVJZITrwPo/k4ufhy
 8i/YTlHJjYD0GG/HC7q507n6zVXwNCGe/TT8O2Y7zpxp1hrLEAF/eRtYuF6/YTtC
 h/7zLYdZ7D7KRW3+TfVjQ0wRP4CDw519nyQhnCb6R0BWJGOlpBdoKvbTqbeOzRgf
 IjhaYKLBAg1ep69zhBki32e5g8MGRqJGMBsHOBoBMA3/KfPBXhgYSMdl4lf9JO48
 hIVPK8vgS/Tid9u652oXwRF3t7IddTqlUMiXKZzBEIOLiDhu58oDahZ07nurAMfg
 ipnb2lRqES5OrHLhFe8s7zbn4C/spCVZ/AnkW8lDQNrVcHpMUct/0FPc3K7pN7j/
 cQK15Bztwguez8vWaSlNZ/1FPfVGQRHpJOvMFyUg7oiSvJNMivZFReaOKyHR3e1A
 VXJ0HAAOWA2dAY0u6puD7+GsC/WW7QPOdWAfvce+9CXdjZfoGjQvoRDjc/SWnIJz
 +USjEV/AxnAM+tUW7l3LjsC58wGlwMy6vP5HxinLZRpNY2NZAtxTaapzVBlQIpsP
 qK1uN1likSLkxnFsyaj1ecEP8eVOWYnfr97l+QEaJF+RyUvx1xRMPLALOL+M0030
 kkDPCU7MjTxSOg==
 =G47E
 -----END PGP SIGNATURE-----

Merge tag 'powerpc-6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc fixes from Michael Ellerman:

 - Drop orphaned VAS MAINTAINERS entry

 - Fix build errors with clang and KCSAN

 - Avoid build errors seen with LD_DEAD_CODE_DATA_ELIMINATION together
   with recordmcount

Thanks to Nathan Chancellor.

* tag 'powerpc-6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc: Avoid dead code/data elimination when using recordmcount
  powerpc/vmlinux.lds: Add .text.asan/tsan sections
  powerpc: Drop orphaned VAS MAINTAINERS entry
2023-03-04 11:20:42 -08:00
Linus Torvalds
d172859ebf sound fixes for 6.3-rc1
A collection of various small fixes that have been gathered since
 the last PR.  The majority of changes are for ASoC, and there is
 a small change in ASoC PCM core, but the rest are all for driver-
 specific fixes / quirks / updates.
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAmQCxUwOHHRpd2FpQHN1
 c2UuZGUACgkQLtJE4w1nLE+ILQ/+JvzrQO16D2VzGogiVH0uZAtcmjRSB732yDvY
 TlYoT65bQAWKn5rGltMc6hfLNGHIrqG+0S/p0Wgwk9pJBL42BLDfWlLkDIQJvnil
 xx1f1ktLJ+NfQ/76FoJg4EpD2x3baiTB2JwhVAsnYAkSI2EyW6iVWfkWTFl1EErU
 baw2JKVzae6bFKwATms4QhkWK6u3boYd1HViuB58xE0qhBDvZjjnAr8uRmsljub4
 43lKSkXbP9sLpyqWi6LApo4tqTV0DqEliSqG5rygLc1sbgqKhAFKgmB5Za5OqByn
 U2yhOqbKZACWO8QRqx286jfw/+YxY5wW2mECSkF301vLK8VPTRRLxbv7tDjRtfFm
 j3sCGMt3idvJaaTIZcLkuBJJyhLV8MUqSr86JosYVK5Pem9R4991f/++xvi8qLYz
 ypAitcyTD2wmDtX7fFKS3MMCfQAc7L3iiLIKfO4bmQtnKQa3J2+jluC8fYLq5Jiw
 Jh7lxpq/sorXXGXSph9SMy41Z0iBedlBABeTY0F5XeS4vkhrqRtX1XQYHdpQaAGx
 /7pd8sE1fTfsWbLotFi7gpyyEJ3WM9uz7QDrwa6KrxQYlbHhQhQ/Y0bV3O0SK+FA
 fs4QbQOWy/q1qs0vsyNCLyA8C34lNqallvzoSYEdK/qLcS/km56P8MJE1vd9BqNB
 lhzZjvo=
 =88Cc
 -----END PGP SIGNATURE-----

Merge tag 'sound-fix-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "A collection of various small fixes that have been gathered since the
  last PR.

  The majority of changes are for ASoC, and there is a small change in
  ASoC PCM core, but the rest are all for driver- specific fixes /
  quirks / updates"

* tag 'sound-fix-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (32 commits)
  ALSA: ice1712: Delete unreachable code in aureon_add_controls()
  ALSA: ice1712: Do not left ice->gpio_mutex locked in aureon_add_controls()
  ALSA: hda/realtek: Add quirk for HP EliteDesk 800 G6 Tower PC
  ALSA: hda/realtek: Improve support for Dell Precision 3260
  ASoC: mediatek: mt8195: add missing initialization
  ASoC: mediatek: mt8188: add missing initialization
  ASoC: amd: yc: Add DMI entries to support HP OMEN 16-n0xxx (8A43)
  ASoC: zl38060 add gpiolib dependency
  ASoC: sam9g20ek: Disable capture unless building with microphone input
  ASoC: mt8192: Fix range for sidetone positive gain
  ASoC: mt8192: Report an error if when an invalid sidetone gain is written
  ASoC: mt8192: Fix event generation for controls
  ASoC: mt8192: Remove spammy log messages
  ASoC: mchp-pdmc: fix poc noise at capture startup
  ASoC: dt-bindings: sama7g5-pdmc: add microchip,startup-delay-us binding
  ASoC: soc-pcm: add option to start DMA after DAI
  ASoC: mt8183: Fix event generation for I2S DAI operations
  ASoC: mt8183: Remove spammy logging from I2S DAI driver
  ASoC: mt6358: Remove undefined HPx Mux enumeration values
  ASoC: mt6358: Validate Wake on Voice 2 writes
  ...
2023-03-04 10:53:59 -08:00
Linus Torvalds
0988a0ea79 power supply changes for the v6.3 series (part 2)
- Fix DT binding for Richtek RT9467
 - Fix a NULL pointer check in the power-supply core
 - Document meaning of absent "present" property
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAmQCjCEACgkQ2O7X88g7
 +pq+WA/+MQe1ft5IUsQEtgnvf3SGiNZa3NMeSiD07wLWAilVKzD4nvNJB824Q85u
 f/2J35ri93Sb1NxApHspCKXGHwaDJ6LMrxBuBkyHPT5PFv8wwAXZzXAJpSw5phKm
 zbto72CLvG4CyFMtkV1OR10p/OtldQsy6RC6HF1tuecD44VCgU9KO00wlw5ckSzH
 8GRKVFr6f12ehS9CYvM5HBZJ75M32L2FfJZ+cj4RjOYe/RFI7QNz46Q9HxXm2YMW
 p5R4NoyO31I1d0uSII7GtzhRvrb2Ryct7YmgeCwURMEhZZLqFU/P93+E/FD1rNmd
 CNJjoB2iYTBTAHTeLzy1QcCHn5JNuk2YIfCrSHVvbeYbuEkRVKBwMKzl6248fkRW
 B393r1n52V9eDGh9ZNawcx6CRbGEQNgAg9mg7W8MAl9qtlm3cgeRZm4NL6MMMMdB
 /PRokeYeW1tutdN0CSv/vNS0UC0fS7QYZNP3rLsmh14VrmkJSc5RN1m3Ryq2A+Vd
 VU7KZEp/48R4fqpAs/MfQdn6Hr+ovZNav+Ud8mM5VcAycpVUrCkiZ3w7g/8E4kVt
 OoCEO0u5kpqxSCtxKlvXrvQeQgmdakJWTyvWDQP8g6ajtH4QQVZ4vGFguMW744lR
 3CZO5OuNM2XPjw0tM/bs4NlfEoZHMkVlCprW+fGtU4pL9vy4EeA=
 =2K3C
 -----END PGP SIGNATURE-----

Merge tag 'for-v6.3-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply

Pull more power supply updates from Sebastian Reichel:

 - Fix DT binding for Richtek RT9467

 - Fix a NULL pointer check in the power-supply core

 - Document meaning of absent "present" property

* tag 'for-v6.3-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply:
  dt-bindings: power: supply: Revise Richtek RT9467 compatible name
  ABI: testing: sysfs-class-power: Document absence of "present" property
  power: supply: fix null pointer check order in __power_supply_register
2023-03-03 16:33:28 -08:00
Linus Torvalds
3162745aad 9 cifs/smb3 client fixes
-----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCgAdFiEE6fsu8pdIjtWE/DpLiiy9cAdyT1EFAmQCU+4ACgkQiiy9cAdy
 T1HuQAwArSaTpdZfgnd08HKz783fpGtDxicv47mqyQHOEzpReu7ZsVY7ybJgaIZy
 lR96qzTcZWsHi9WF69uF9hShDz4z4G15UfJXoa1AzoQUR9Kb6jsInEXodOeZQZBU
 57sioJqr7CU66i4yIWb30900iC7cPmmJ4YdOUiSIbeb7edW5IHQ59IyxuYRkJP3W
 EIWrKQ5wJQS49YiaM0C3LSpLgIRLhFU3Fkar66wHY8SwDHJunR0BzuiJn5EVgcVY
 Vf4R4K1F8s2H2svg9fwbqZhihUjrr0Je3T/1zrDg1xUom0uWYqA42iSIBhocSuRz
 J3ipIwpQwSiud4dvegq3QHbK61jgDsNa2VQu5+njGp6wX5pYefwbN50aTZ72xg6z
 j0tnpwPtw0ZW0TO57Q5wdwbQ+yjC4GEJwLcD9WPtUKDsGakVY7fnMdwfE2SAe+xg
 u5StlRUegYybMH1wCd3yHuAR17JisE0JyWlP9QyLCwL1Xa5ii1cB+YqHH/DTOp/l
 YDD69Hzi
 =wYW2
 -----END PGP SIGNATURE-----

Merge tag '6.3-rc-smb3-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6

Pull more cifs updates from Steve French:

 - xfstest generic/208 fix (memory leak)

 - minor netfs fix (to address smatch warning)

 - a DFS fix for stable

 - a reconnect race fix

 - two multichannel fixes

 - RDMA (smbdirect) fix

 - two additional writeback fixes from David

* tag '6.3-rc-smb3-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6:
  cifs: Fix memory leak in direct I/O
  cifs: prevent data race in cifs_reconnect_tcon()
  cifs: improve checking of DFS links over STATUS_OBJECT_NAME_INVALID
  iov: Fix netfs_extract_user_to_sg()
  cifs: Fix cifs_write_back_from_locked_folio()
  cifs: reuse cifs_match_ipaddr for comparison of dstaddr too
  cifs: match even the scope id for ipv6 addresses
  cifs: Fix an uninitialised variable
  cifs: Add some missing xas_retry() calls
2023-03-03 16:26:43 -08:00
Linus Torvalds
e778361555 umh: simplify the capability pointer logic
The usermodehelper code uses two fake pointers for the two capability
cases: CAP_BSET for reading and writing 'usermodehelper_bset', and
CAP_PI to read and write 'usermodehelper_inheritable'.

This seems to be a completely unnecessary indirection, since we could
instead just use the pointers themselves, and never have to do any "if
this then that" kind of logic.

So just get rid of the fake pointer values, and use the real pointer
values instead.

Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Kees Cook <keescook@chromium.org>
Cc: Iurii Zaikin <yzaikin@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2023-03-03 16:18:19 -08:00