Skip to content

Commit d58db3f

Browse files
committed
Merge tag 'docs-6.12' of git://git.lwn.net/linux
Pull documentation update from Jonathan Corbet: "Another relatively mundane cycle for docs: - The beginning of an EEVDF scheduler document - More Chinese translations - A rethrashing of our bisection documentation ...plus the usual array of smaller fixes, and more than the usual number of typo fixes" * tag 'docs-6.12' of git://git.lwn.net/linux: (48 commits) Remove duplicate "and" in 'Linux NVMe docs. docs:filesystems: fix spelling and grammar mistakes docs:filesystem: fix mispelled words on autofs page docs:mm: fixed spelling and grammar mistakes on vmalloc kernel stack page Documentation: PCI: fix typo in pci.rst docs/zh_CN: add the translation of kbuild/gcc-plugins.rst docs/process: fix typos docs:mm: fix spelling mistakes in heterogeneous memory management page accel/qaic: Fix a typo docs/zh_CN: update the translation of security-bugs docs: block: Fix grammar and spelling mistakes in bfq-iosched.rst Documentation: Fix spelling mistakes Documentation/gpu: Fix typo in Documentation/gpu/komeda-kms.rst scripts: sphinx-pre-install: remove unnecessary double check for $cur_version Loongarch: KVM: Add KVM hypercalls documentation for LoongArch Documentation: Document the kernel flag bdev_allow_write_mounted docs: scheduler: completion: Update member of struct completion docs: kerneldoc-preamble.sty: Suppress extra spaces in CJK literal blocks docs: submitting-patches: Advertise b4 docs: update dev-tools/kcsan.rst url about KTSAN ...
2 parents 8202cc8 + 4f77c34 commit d58db3f

File tree

71 files changed

+1329
-271
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+1329
-271
lines changed

Documentation/PCI/pci.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ driver generally needs to perform the following initialization:
5252
- Enable DMA/processing engines
5353

5454
When done using the device, and perhaps the module needs to be unloaded,
55-
the driver needs to take the follow steps:
55+
the driver needs to take the following steps:
5656

5757
- Disable the device from generating IRQs
5858
- Release the IRQ (free_irq())

Documentation/accel/qaic/qaic.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ commands (does not impact QAIC).
9393
uAPI
9494
====
9595

96-
QAIC creates an accel device per phsyical PCIe device. This accel device exists
96+
QAIC creates an accel device per physical PCIe device. This accel device exists
9797
for as long as the PCIe device is known to Linux.
9898

9999
The PCIe device may not be in the state to accept requests from userspace at
Lines changed: 138 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,144 @@
1-
Bisecting a bug
2-
+++++++++++++++
1+
.. SPDX-License-Identifier: (GPL-2.0+ OR CC-BY-4.0)
2+
.. [see the bottom of this file for redistribution information]
33
4-
Last updated: 28 October 2016
4+
======================
5+
Bisecting a regression
6+
======================
57

6-
Introduction
7-
============
8+
This document describes how to use a ``git bisect`` to find the source code
9+
change that broke something -- for example when some functionality stopped
10+
working after upgrading from Linux 6.0 to 6.1.
811

9-
Always try the latest kernel from kernel.org and build from source. If you are
10-
not confident in doing that please report the bug to your distribution vendor
11-
instead of to a kernel developer.
12+
The text focuses on the gist of the process. If you are new to bisecting the
13+
kernel, better follow Documentation/admin-guide/verify-bugs-and-bisect-regressions.rst
14+
instead: it depicts everything from start to finish while covering multiple
15+
aspects even kernel developers occasionally forget. This includes detecting
16+
situations early where a bisection would be a waste of time, as nobody would
17+
care about the result -- for example, because the problem happens after the
18+
kernel marked itself as 'tainted', occurs in an abandoned version, was already
19+
fixed, or is caused by a .config change you or your Linux distributor performed.
1220

13-
Finding bugs is not always easy. Have a go though. If you can't find it don't
14-
give up. Report as much as you have found to the relevant maintainer. See
15-
MAINTAINERS for who that is for the subsystem you have worked on.
21+
Finding the change causing a kernel issue using a bisection
22+
===========================================================
1623

17-
Before you submit a bug report read
18-
'Documentation/admin-guide/reporting-issues.rst'.
24+
*Note: the following process assumes you prepared everything for a bisection.
25+
This includes having a Git clone with the appropriate sources, installing the
26+
software required to build and install kernels, as well as a .config file stored
27+
in a safe place (the following example assumes '~/prepared_kernel_.config') to
28+
use as pristine base at each bisection step; ideally, you have also worked out
29+
a fully reliable and straight-forward way to reproduce the regression, too.*
1930

20-
Devices not appearing
21-
=====================
22-
23-
Often this is caused by udev/systemd. Check that first before blaming it
24-
on the kernel.
25-
26-
Finding patch that caused a bug
27-
===============================
28-
29-
Using the provided tools with ``git`` makes finding bugs easy provided the bug
30-
is reproducible.
31-
32-
Steps to do it:
33-
34-
- build the Kernel from its git source
35-
- start bisect with [#f1]_::
36-
37-
$ git bisect start
38-
39-
- mark the broken changeset with::
40-
41-
$ git bisect bad [commit]
42-
43-
- mark a changeset where the code is known to work with::
44-
45-
$ git bisect good [commit]
46-
47-
- rebuild the Kernel and test
48-
- interact with git bisect by using either::
49-
50-
$ git bisect good
51-
52-
or::
53-
54-
$ git bisect bad
55-
56-
depending if the bug happened on the changeset you're testing
57-
- After some interactions, git bisect will give you the changeset that
58-
likely caused the bug.
59-
60-
- For example, if you know that the current version is bad, and version
61-
4.8 is good, you could do::
62-
63-
$ git bisect start
64-
$ git bisect bad # Current version is bad
65-
$ git bisect good v4.8
66-
67-
68-
.. [#f1] You can, optionally, provide both good and bad arguments at git
69-
start with ``git bisect start [BAD] [GOOD]``
70-
71-
For further references, please read:
72-
73-
- The man page for ``git-bisect``
74-
- `Fighting regressions with git bisect <https://www.kernel.org/pub/software/scm/git/docs/git-bisect-lk2009.html>`_
75-
- `Fully automated bisecting with "git bisect run" <https://lwn.net/Articles/317154>`_
76-
- `Using Git bisect to figure out when brokenness was introduced <http://webchick.net/node/99>`_
31+
* Preparation: start the bisection and tell Git about the points in the history
32+
you consider to be working and broken, which Git calls 'good' and 'bad'::
33+
34+
git bisect start
35+
git bisect good v6.0
36+
git bisect bad v6.1
37+
38+
Instead of Git tags like 'v6.0' and 'v6.1' you can specify commit-ids, too.
39+
40+
1. Copy your prepared .config into the build directory and adjust it to the
41+
needs of the codebase Git checked out for testing::
42+
43+
cp ~/prepared_kernel_.config .config
44+
make olddefconfig
45+
46+
2. Now build, install, and boot a kernel. This might fail for unrelated reasons,
47+
for example, when a compile error happens at the current stage of the
48+
bisection a later change resolves. In such cases run ``git bisect skip`` and
49+
go back to step 1.
50+
51+
3. Check if the functionality that regressed works in the kernel you just built.
52+
53+
If it works, execute::
54+
55+
git bisect good
56+
57+
If it is broken, run::
58+
59+
git bisect bad
60+
61+
Note, getting this wrong just once will send the rest of the bisection
62+
totally off course. To prevent having to start anew later you thus want to
63+
ensure what you tell Git is correct; it is thus often wise to spend a few
64+
minutes more on testing in case your reproducer is unreliable.
65+
66+
After issuing one of these two commands, Git will usually check out another
67+
bisection point and print something like 'Bisecting: 675 revisions left to
68+
test after this (roughly 10 steps)'. In that case go back to step 1.
69+
70+
If Git instead prints something like 'cafecaca0c0dacafecaca0c0dacafecaca0c0da
71+
is the first bad commit', then you have finished the bisection. In that case
72+
move to the next point below. Note, right after displaying that line Git will
73+
show some details about the culprit including its patch description; this can
74+
easily fill your terminal, so you might need to scroll up to see the message
75+
mentioning the culprit's commit-id.
76+
77+
In case you missed Git's output, you can always run ``git bisect log`` to
78+
print the status: it will show how many steps remain or mention the result of
79+
the bisection.
80+
81+
* Recommended complementary task: put the bisection log and the current .config
82+
file aside for the bug report; furthermore tell Git to reset the sources to
83+
the state before the bisection::
84+
85+
git bisect log > ~/bisection-log
86+
cp .config ~/bisection-config-culprit
87+
git bisect reset
88+
89+
* Recommended optional task: try reverting the culprit on top of the latest
90+
codebase and check if that fixes your bug; if that is the case, it validates
91+
the bisection and enables developers to resolve the regression through a
92+
revert.
93+
94+
To try this, update your clone and check out latest mainline. Then tell Git
95+
to revert the change by specifying its commit-id::
96+
97+
git revert --no-edit cafec0cacaca0
98+
99+
Git might reject this, for example when the bisection landed on a merge
100+
commit. In that case, abandon the attempt. Do the same, if Git fails to revert
101+
the culprit on its own because later changes depend on it -- at least unless
102+
you bisected a stable or longterm kernel series, in which case you want to
103+
check out its latest codebase and try a revert there.
104+
105+
If a revert succeeds, build and test another kernel to check if reverting
106+
resolved your regression.
107+
108+
With that the process is complete. Now report the regression as described by
109+
Documentation/admin-guide/reporting-issues.rst.
110+
111+
112+
Additional reading material
113+
---------------------------
114+
115+
* The `man page for 'git bisect' <https://git-scm.com/docs/git-bisect>`_ and
116+
`fighting regressions with 'git bisect' <https://git-scm.com/docs/git-bisect-lk2009.html>`_
117+
in the Git documentation.
118+
* `Working with git bisect <https://nathanchance.dev/posts/working-with-git-bisect/>`_
119+
from kernel developer Nathan Chancellor.
120+
* `Using Git bisect to figure out when brokenness was introduced <http://webchick.net/node/99>`_.
121+
* `Fully automated bisecting with 'git bisect run' <https://lwn.net/Articles/317154>`_.
122+
123+
..
124+
end-of-content
125+
..
126+
This document is maintained by Thorsten Leemhuis <[email protected]>. If
127+
you spot a typo or small mistake, feel free to let him know directly and
128+
he'll fix it. You are free to do the same in a mostly informal way if you
129+
want to contribute changes to the text -- but for copyright reasons please CC
130+
[email protected] and 'sign-off' your contribution as
131+
Documentation/process/submitting-patches.rst explains in the section 'Sign
132+
your work - the Developer's Certificate of Origin'.
133+
..
134+
This text is available under GPL-2.0+ or CC-BY-4.0, as stated at the top
135+
of the file. If you want to distribute this text under CC-BY-4.0 only,
136+
please use 'The Linux kernel development community' for author attribution
137+
and link this as source:
138+
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/Documentation/admin-guide/bug-bisect.rst
139+
140+
..
141+
Note: Only the content of this RST file as found in the Linux kernel sources
142+
is available under CC-BY-4.0, as versions of this text that were processed
143+
(for example by the kernel's build system) might contain content taken from
144+
files which use a more restrictive license.

Documentation/admin-guide/bug-hunting.rst

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -244,14 +244,14 @@ Reporting the bug
244244
Once you find where the bug happened, by inspecting its location,
245245
you could either try to fix it yourself or report it upstream.
246246

247-
In order to report it upstream, you should identify the mailing list
248-
used for the development of the affected code. This can be done by using
249-
the ``get_maintainer.pl`` script.
247+
In order to report it upstream, you should identify the bug tracker, if any, or
248+
mailing list used for the development of the affected code. This can be done by
249+
using the ``get_maintainer.pl`` script.
250250

251251
For example, if you find a bug at the gspca's sonixj.c file, you can get
252252
its maintainers with::
253253

254-
$ ./scripts/get_maintainer.pl -f drivers/media/usb/gspca/sonixj.c
254+
$ ./scripts/get_maintainer.pl --bug -f drivers/media/usb/gspca/sonixj.c
255255
Hans Verkuil <[email protected]> (odd fixer:GSPCA USB WEBCAM DRIVER,commit_signer:1/1=100%)
256256
Mauro Carvalho Chehab <[email protected]> (maintainer:MEDIA INPUT INFRASTRUCTURE (V4L/DVB),commit_signer:1/1=100%)
257257
Tejun Heo <[email protected]> (commit_signer:1/1=100%)
@@ -267,11 +267,12 @@ Please notice that it will point to:
267267
- The driver maintainer (Hans Verkuil);
268268
- The subsystem maintainer (Mauro Carvalho Chehab);
269269
- The driver and/or subsystem mailing list ([email protected]);
270-
- the Linux Kernel mailing list ([email protected]).
270+
- The Linux Kernel mailing list ([email protected]);
271+
- The bug reporting URIs for the driver/subsystem (none in the above example).
271272

272-
Usually, the fastest way to have your bug fixed is to report it to mailing
273-
list used for the development of the code (linux-media ML) copying the
274-
driver maintainer (Hans).
273+
If the listing contains bug reporting URIs at the end, please prefer them over
274+
email. Otherwise, please report bugs to the mailing list used for the
275+
development of the code (linux-media ML) copying the driver maintainer (Hans).
275276

276277
If you are totally stumped as to whom to send the report, and
277278
``get_maintainer.pl`` didn't provide you anything useful, send it to

Documentation/admin-guide/device-mapper/dm-crypt.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,18 @@ iv_large_sectors
162162

163163

164164
Module parameters::
165-
166165
max_read_size
166+
Maximum size of read requests. When a request larger than this size
167+
is received, dm-crypt will split the request. The splitting improves
168+
concurrency (the split requests could be encrypted in parallel by multiple
169+
cores), but it also causes overhead. The user should tune this parameters to
170+
fit the actual workload.
171+
167172
max_write_size
168-
Maximum size of read or write requests. When a request larger than this size
173+
Maximum size of write requests. When a request larger than this size
169174
is received, dm-crypt will split the request. The splitting improves
170175
concurrency (the split requests could be encrypted in parallel by multiple
171-
cores), but it also causes overhead. The user should tune these parameters to
176+
cores), but it also causes overhead. The user should tune this parameters to
172177
fit the actual workload.
173178

174179

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,18 @@
517517
Format: <io>,<irq>,<mode>
518518
See header of drivers/net/hamradio/baycom_ser_hdx.c.
519519

520+
bdev_allow_write_mounted=
521+
Format: <bool>
522+
Control the ability to open a mounted block device
523+
for writing, i.e., allow / disallow writes that bypass
524+
the FS. This was implemented as a means to prevent
525+
fuzzers from crashing the kernel by overwriting the
526+
metadata underneath a mounted FS without its awareness.
527+
This also prevents destructive formatting of mounted
528+
filesystems by naive storage tooling that don't use
529+
O_EXCL. Default is Y and can be changed through the
530+
Kconfig option CONFIG_BLK_DEV_WRITE_MOUNTED.
531+
520532
bert_disable [ACPI]
521533
Disable BERT OS support on buggy BIOSes.
522534

Documentation/admin-guide/tainted-kernels.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,3 +182,5 @@ More detailed explanation for tainting
182182
produce extremely unusual kernel structure layouts (even performance
183183
pathological ones), which is important to know when debugging. Set at
184184
build time.
185+
186+
18) ``N`` if an in-kernel test, such as a KUnit test, has been run.

Documentation/arch/arm/stm32/stm32-dma-mdma-chaining.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ Driver updates for STM32 DMA-MDMA chaining support in foo driver
359359
descriptor you want a callback to be called at the end of the transfer
360360
(dmaengine_prep_slave_sg()) or the period (dmaengine_prep_dma_cyclic()).
361361
Depending on the direction, set the callback on the descriptor that finishes
362-
the overal transfer:
362+
the overall transfer:
363363

364364
* DMA_DEV_TO_MEM: set the callback on the "MDMA" descriptor
365365
* DMA_MEM_TO_DEV: set the callback on the "DMA" descriptor
@@ -371,7 +371,7 @@ Driver updates for STM32 DMA-MDMA chaining support in foo driver
371371
As STM32 MDMA channel transfer is triggered by STM32 DMA, you must issue
372372
STM32 MDMA channel before STM32 DMA channel.
373373

374-
If any, your callback will be called to warn you about the end of the overal
374+
If any, your callback will be called to warn you about the end of the overall
375375
transfer or the period completion.
376376

377377
Don't forget to terminate both channels. STM32 DMA channel is configured in

Documentation/arch/arm64/cpu-hotplug.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ There are no systems that support the physical addition (or removal) of CPUs
2626
while the system is running, and ACPI is not able to sufficiently describe
2727
them.
2828

29-
e.g. New CPUs come with new caches, but the platform's cache toplogy is
29+
e.g. New CPUs come with new caches, but the platform's cache topology is
3030
described in a static table, the PPTT. How caches are shared between CPUs is
3131
not discoverable, and must be described by firmware.
3232

Documentation/arch/powerpc/ultravisor.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ Hardware
134134

135135
* PTCR and partition table entries (partition table is in secure
136136
memory). An attempt to write to PTCR will cause a Hypervisor
137-
Emulation Assitance interrupt.
137+
Emulation Assistance interrupt.
138138

139139
* LDBAR (LD Base Address Register) and IMC (In-Memory Collection)
140140
non-architected registers. An attempt to write to them will cause a

0 commit comments

Comments
 (0)