Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'docs-5.11' of git://git.lwn.net/linux

Pull documentation updates from Jonathan Corbet:
"A much quieter cycle for documentation (happily), with, one hopes, the
bulk of the churn behind us. Significant stuff in this pull includes:

- A set of new Chinese translations

- Italian translation updates

- A mechanism from Mauro to automatically format
Documentation/features for the built docs

- Automatic cross references without explicit :ref: markup

- A new reset-controller document

- An extensive new document on reporting problems from Thorsten

That last patch also adds the CC-BY-4.0 license to LICENSES/dual;
there was some discussion on this, but we seem to have consensus and
an ack from Greg for that addition"

* tag 'docs-5.11' of git://git.lwn.net/linux: (50 commits)
docs: fix broken cross reference in translations/zh_CN
docs: Note that sphinx 1.7 will be required soon
docs: update requirements to install six module
docs: reporting-issues: move 'outdated, need help' note to proper place
docs: Update documentation to reflect what TAINT_CPU_OUT_OF_SPEC means
docs: add a reset controller chapter to the driver API docs
docs: make reporting-bugs.rst obsolete
docs: Add a new text describing how to report bugs
LICENSES: Add the CC-BY-4.0 license
Documentation: fix multiple typos found in the admin-guide subdirectory
Documentation: fix typos found in admin-guide subdirectory
kernel-doc: Fix example in Nested structs/unions
docs: clean up sysctl/kernel: titles, version
docs: trace: fix event state structure name
docs: nios2: add missing ReST file
scripts: get_feat.pl: reduce table width for all features output
scripts: get_feat.pl: change the group by order
scripts: get_feat.pl: make complete table more coincise
scripts: kernel-doc: fix parsing function-like typedefs
Documentation: fix typos found in process, dev-tools, and doc-guide subdirectories
...

+4225 -441
+1 -1
Documentation/ABI/testing/configfs-usb-gadget-ecm
··· 7 7 ifname 8 8 - network device interface name associated with 9 9 this function instance 10 - qmult 10 + qmult 11 11 - queue length multiplier for high and 12 12 super speed 13 13 host_addr
+20
Documentation/ABI/testing/procfs-attr-current
··· 1 + What: /proc/*/attr/current 2 + Contact: linux-security-module@vger.kernel.org, 3 + selinux@vger.kernel.org, 4 + apparmor@lists.ubuntu.com 5 + Description: The current security information used by a Linux 6 + security module (LSM) that is active on the system. 7 + The details of permissions required to read from 8 + this interface and hence obtain the security state 9 + of the task identified is LSM dependent. 10 + A process cannot write to this interface unless it 11 + refers to itself. 12 + The other details of permissions required to write to 13 + this interface and hence change the security state of 14 + the task identified are LSM dependent. 15 + The format of the data used by this interface is LSM 16 + dependent. 17 + SELinux, Smack and AppArmor provide this interface. 18 + Users: SELinux user-space 19 + Smack user-space 20 + AppArmor user-space
+20
Documentation/ABI/testing/procfs-attr-exec
··· 1 + What: /proc/*/attr/exec 2 + Contact: linux-security-module@vger.kernel.org, 3 + selinux@vger.kernel.org, 4 + apparmor@lists.ubuntu.com 5 + Description: The security information to be used on the process 6 + by a Linux security module (LSM) active on the system 7 + after a subsequent exec() call. 8 + The details of permissions required to read from 9 + this interface and hence obtain the security state 10 + of the task identified is LSM dependent. 11 + A process cannot write to this interface unless it 12 + refers to itself. 13 + The other details of permissions required to write to 14 + this interface and hence change the security state of 15 + the task identified are LSM dependent. 16 + The format of the data used by this interface is LSM 17 + dependent. 18 + SELinux and AppArmor provide this interface. 19 + Users: SELinux user-space 20 + AppArmor user-space
+19
Documentation/ABI/testing/procfs-attr-prev
··· 1 + What: /proc/*/attr/prev 2 + Contact: linux-security-module@vger.kernel.org, 3 + selinux@vger.kernel.org, 4 + apparmor@lists.ubuntu.com 5 + Description: The security information used on the process by 6 + a Linux security module (LSM) active on the system 7 + prior to the most recent exec() call. 8 + The details of permissions required to read from 9 + this interface is LSM dependent. 10 + A process cannot write to this interface unless it 11 + refers to itself. 12 + The other details of permissions required to write to 13 + this interface are LSM dependent. 14 + The format of the data used by this interface is LSM 15 + dependent. 16 + SELinux and AppArmor provide this interface. 17 + Users: SELinux user-space 18 + AppArmor user-space 19 +
+1 -1
Documentation/ABI/testing/sysfs-devices-memory
··· 19 19 identify removable sections of the memory before attempting 20 20 potentially expensive hot-remove memory operation 21 21 Users: hotplug memory remove tools 22 - http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils 22 + http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils 23 23 24 24 What: /sys/devices/system/memory/memoryX/phys_device 25 25 Date: September 2008
+1 -1
Documentation/ABI/testing/sysfs-fs-ext4
··· 33 33 Date: March 2008 34 34 Contact: "Theodore Ts'o" <tytso@mit.edu> 35 35 Description: 36 - Tuning parameter which controls the minimum size for 36 + Tuning parameter which controls the minimum size for 37 37 requests (as a power of 2) where the buddy cache is 38 38 used 39 39
+1 -1
Documentation/ABI/testing/sysfs-module
··· 25 25 However there are cases, when 80% max isochronous bandwidth is 26 26 too limiting. For example two video streams could require 110 27 27 microseconds of isochronous bandwidth per microframe to work 28 - together. 28 + together. 29 29 30 30 Through this setting it is possible to raise the limit so that 31 31 the host controller would allow allocating more than 100
+1 -1
Documentation/ABI/testing/sysfs-platform-renesas_usb3
··· 12 12 - "peripheral" - switching mode from host to peripheral. 13 13 14 14 Read the file, then it shows the following strings: 15 - 15 + 16 16 - "host" - The mode is host now. 17 17 - "peripheral" - The mode is peripheral now.
+2 -2
Documentation/admin-guide/README.rst
··· 398 398 399 399 If you for some reason cannot do the above (you have a pre-compiled 400 400 kernel image or similar), telling me as much about your setup as 401 - possible will help. Please read the :ref:`admin-guide/reporting-bugs.rst <reportingbugs>` 402 - document for details. 401 + possible will help. Please read 402 + 'Documentation/admin-guide/reporting-issues.rst' for details. 403 403 404 404 - Alternatively, you can use gdb on a running kernel. (read-only; i.e. you 405 405 cannot change values or set break points.) To do this, first compile the
+2 -2
Documentation/admin-guide/acpi/cppc_sysfs.rst
··· 8 8 ==== 9 9 10 10 CPPC defined in the ACPI spec describes a mechanism for the OS to manage the 11 - performance of a logical processor on a contigious and abstract performance 11 + performance of a logical processor on a contiguous and abstract performance 12 12 scale. CPPC exposes a set of registers to describe abstract performance scale, 13 13 to request performance levels and to measure per-cpu delivered performance. 14 14 ··· 45 45 * lowest_freq : CPU frequency corresponding to lowest_perf (in MHz). 46 46 * nominal_freq : CPU frequency corresponding to nominal_perf (in MHz). 47 47 The above frequencies should only be used to report processor performance in 48 - freqency instead of abstract scale. These values should not be used for any 48 + frequency instead of abstract scale. These values should not be used for any 49 49 functional decisions. 50 50 51 51 * feedback_ctrs : Includes both Reference and delivered performance counter.
+1 -1
Documentation/admin-guide/binderfs.rst
··· 70 70 Binderfs binder devices can be deleted via `unlink() <unlink_>`_. This means 71 71 that the `rm() <rm_>`_ tool can be used to delete them. Note that the 72 72 ``binder-control`` device cannot be deleted since this would make the binderfs 73 - instance unuseable. The ``binder-control`` device will be deleted when the 73 + instance unusable. The ``binder-control`` device will be deleted when the 74 74 binderfs instance is unmounted and all references to it have been dropped.
+1 -1
Documentation/admin-guide/blockdev/paride.rst
··· 220 220 Finally, you can load high-level drivers for each kind of device that 221 221 you have connected. By default, each driver will autoprobe for a single 222 222 device, but you can support up to four similar devices by giving their 223 - individual co-ordinates when you load the driver. 223 + individual coordinates when you load the driver. 224 224 225 225 For example, if you had two no-name CD-ROM drives both using the 226 226 KingByte KBIC-951A adapter, one on port 0x378 and the other on 0x3bc
+1 -1
Documentation/admin-guide/blockdev/zram.rst
··· 360 360 /sys/block/zram0/writeback_limit. 361 361 $ echo 1 > /sys/block/zram0/writeback_limit_enable 362 362 363 - If admins want to allow further write again once the bugdet is exhausted, 363 + If admins want to allow further write again once the budget is exhausted, 364 364 he could do it like below:: 365 365 366 366 $ echo $((400<<MB_SHIFT>>4K_SHIFT)) > \
+1 -1
Documentation/admin-guide/bug-bisect.rst
··· 15 15 MAINTAINERS for who that is for the subsystem you have worked on. 16 16 17 17 Before you submit a bug report read 18 - :ref:`Documentation/admin-guide/reporting-bugs.rst <reportingbugs>`. 18 + 'Documentation/admin-guide/reporting-issues.rst'. 19 19 20 20 Devices not appearing 21 21 =====================
+1 -1
Documentation/admin-guide/bug-hunting.rst
··· 263 263 264 264 - The last developers that touched the source code (if this is done inside 265 265 a git tree). On the above example, Tejun and Bhaktipriya (in this 266 - specific case, none really envolved on the development of this file); 266 + specific case, none really involved on the development of this file); 267 267 - The driver maintainer (Hans Verkuil); 268 268 - The subsystem maintainer (Mauro Carvalho Chehab); 269 269 - The driver and/or subsystem mailing list (linux-media@vger.kernel.org);
+1 -1
Documentation/admin-guide/cifs/introduction.rst
··· 9 9 PC operating systems. New and improved versions of CIFS are now 10 10 called SMB2 and SMB3. Use of SMB3 (and later, including SMB3.1.1) 11 11 is strongly preferred over using older dialects like CIFS due to 12 - security reaasons. All modern dialects, including the most recent, 12 + security reasons. All modern dialects, including the most recent, 13 13 SMB3.1.1 are supported by the CIFS VFS module. The SMB3 protocol 14 14 is implemented and supported by all major file servers 15 15 such as all modern versions of Windows (including Windows 2016
+3 -3
Documentation/admin-guide/cifs/usage.rst
··· 115 115 Allowing User Unmounts 116 116 ====================== 117 117 118 - To permit users to ummount directories that they have user mounted (see above), 118 + To permit users to unmount directories that they have user mounted (see above), 119 119 the utility umount.cifs may be used. It may be invoked directly, or if 120 120 umount.cifs is placed in /sbin, umount can invoke the cifs umount helper 121 121 (at least for most versions of the umount utility) for umount of cifs ··· 197 197 not be traversed by the Samba server). This is opaque to the Linux client 198 198 application using the cifs vfs. Absolute symlinks will work to Samba 3.0.5 or 199 199 later, but only for remote clients using the CIFS Unix extensions, and will 200 - be invisbile to Windows clients and typically will not affect local 200 + be invisible to Windows clients and typically will not affect local 201 201 applications running on the same server as Samba. 202 202 203 203 Use instructions ··· 267 267 configured for Unix Extensions (and the client has not disabled 268 268 /proc/fs/cifs/LinuxExtensionsEnabled). In addition the mount option 269 269 ``mapposix`` can be used on CIFS (vers=1.0) to force the mapping of 270 - illegal Windows/NTFS/SMB characters to a remap range (this mount parm 270 + illegal Windows/NTFS/SMB characters to a remap range (this mount parameter 271 271 is the default for SMB3). This remap (``mapposix``) range is also 272 272 compatible with Mac (and "Services for Mac" on some older Windows). 273 273
+2 -2
Documentation/admin-guide/device-mapper/dm-crypt.rst
··· 46 46 capi:authenc(hmac(sha256),xts(aes))-random 47 47 capi:rfc7539(chacha20,poly1305)-random 48 48 49 - The /proc/crypto contains a list of curently loaded crypto modes. 49 + The /proc/crypto contains a list of currently loaded crypto modes. 50 50 51 51 <key> 52 52 Key used for encryption. It is encoded either as a hexadecimal number ··· 92 92 93 93 <#opt_params> 94 94 Number of optional parameters. If there are no optional parameters, 95 - the optional paramaters section can be skipped or #opt_params can be zero. 95 + the optional parameters section can be skipped or #opt_params can be zero. 96 96 Otherwise #opt_params is the number of following arguments. 97 97 98 98 Example of optional parameters section:
+2 -2
Documentation/admin-guide/device-mapper/dm-integrity.rst
··· 117 117 118 118 commit_time:number 119 119 Commit time in milliseconds. When this time passes, the journal is 120 - written. The journal is also written immediatelly if the FLUSH 120 + written. The journal is also written immediately if the FLUSH 121 121 request is received. 122 122 123 123 internal_hash:algorithm(:key) (the key is optional) ··· 147 147 "salsa20" or "ctr(aes)"). 148 148 149 149 The journal contains history of last writes to the block device, 150 - an attacker reading the journal could see the last sector nubmers 150 + an attacker reading the journal could see the last sector numbers 151 151 that were written. From the sector numbers, the attacker can infer 152 152 the size of files that were written. To protect against this 153 153 situation, you can encrypt the journal.
+1 -1
Documentation/admin-guide/device-mapper/dm-raid.rst
··· 418 418 specific devices are requested via rebuild. Fix RAID leg 419 419 rebuild errors. 420 420 1.15.0 Fix size extensions not being synchronized in case of new MD bitmap 421 - pages allocated; also fix those not occuring after previous reductions 421 + pages allocated; also fix those not occurring after previous reductions 422 422 1.15.1 Fix argument count and arguments for rebuild/write_mostly/journal_(dev|mode) 423 423 on the status line.
+3 -3
Documentation/admin-guide/device-mapper/dm-zoned.rst
··· 24 24 and memory usage as well as storage capacity loss). For a 10TB 25 25 host-managed disk with 256 MB zones, dm-zoned memory usage per disk 26 26 instance is at most 4.5 MB and as little as 5 zones will be used 27 - internally for storing metadata and performaing reclaim operations. 27 + internally for storing metadata and performing reclaim operations. 28 28 29 29 dm-zoned target devices are formatted and checked using the dmzadm 30 30 utility available at: ··· 102 102 accessed blocks are invalid, the read buffer is zeroed and the read 103 103 operation terminated. 104 104 105 - After some time, the limited number of convnetional zones available may 105 + After some time, the limited number of conventional zones available may 106 106 be exhausted (all used to map chunks or buffer sequential zones) and 107 107 unaligned writes to unbuffered chunks become impossible. To avoid this 108 108 situation, a reclaim process regularly scans used conventional zones and ··· 158 158 dmzadm --format /dev/sdxx /dev/sdyy 159 159 160 160 161 - Fomatted device(s) can be started with the dmzadm utility, too.: 161 + Formatted device(s) can be started with the dmzadm utility, too.: 162 162 163 163 Ex:: 164 164
+1 -1
Documentation/admin-guide/device-mapper/verity.rst
··· 69 69 70 70 <#opt_params> 71 71 Number of optional parameters. If there are no optional parameters, 72 - the optional paramaters section can be skipped or #opt_params can be zero. 72 + the optional parameters section can be skipped or #opt_params can be zero. 73 73 Otherwise #opt_params is the number of following arguments. 74 74 75 75 Example of optional parameters section:
+2 -2
Documentation/admin-guide/device-mapper/writecache.rst
··· 37 37 autocommit_blocks n (default: 64 for pmem, 65536 for ssd) 38 38 when the application writes this amount of blocks without 39 39 issuing the FLUSH request, the blocks are automatically 40 - commited 40 + committed 41 41 autocommit_time ms (default: 1000) 42 42 autocommit time in milliseconds. The data is automatically 43 - commited if this time passes and no FLUSH request is 43 + committed if this time passes and no FLUSH request is 44 44 received 45 45 fua (by default on) 46 46 applicable only to persistent memory - use the FUA flag
+3
Documentation/admin-guide/features.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 2 + 3 + .. kernel-feat:: $srctree/Documentation/features
+1 -1
Documentation/admin-guide/hw-vuln/tsx_async_abort.rst
··· 60 60 61 61 The victim of a malicious actor does not need to make use of TSX. Only the 62 62 attacker needs to begin a TSX transaction and raise an asynchronous abort 63 - which in turn potenitally leaks data stored in the buffers. 63 + which in turn potentially leaks data stored in the buffers. 64 64 65 65 More detailed technical information is available in the TAA specific x86 66 66 architecture section: :ref:`Documentation/x86/tsx_async_abort.rst <tsx_async_abort>`.
+3 -1
Documentation/admin-guide/index.rst
··· 19 19 sysctl/index 20 20 21 21 abi 22 + features 22 23 23 24 This section describes CPU vulnerabilities and their mitigations. 24 25 ··· 34 33 .. toctree:: 35 34 :maxdepth: 1 36 35 37 - reporting-bugs 36 + reporting-issues 37 + Reporting bugs (obsolete) <reporting-bugs> 38 38 security-bugs 39 39 bug-hunting 40 40 bug-bisect
+1
Documentation/admin-guide/kernel-parameters.rst
··· 172 172 X86 Either 32-bit or 64-bit x86 (same as X86-32+X86-64) 173 173 X86_UV SGI UV support is enabled. 174 174 XEN Xen support is enabled 175 + XTENSA xtensa architecture is enabled. 175 176 176 177 In addition, the following text indicates that the option:: 177 178
+1 -1
Documentation/admin-guide/kernel-parameters.txt
··· 2709 2709 option description. 2710 2710 2711 2711 memmap=nn[KMG]@ss[KMG] 2712 - [KNL] Force usage of a specific region of memory. 2712 + [KNL, X86, MIPS, XTENSA] Force usage of a specific region of memory. 2713 2713 Region of memory to be used is from ss to ss+nn. 2714 2714 If @ss[KMG] is omitted, it is equivalent to mem=nn[KMG], 2715 2715 which limits max address to nn[KMG].
+1 -1
Documentation/admin-guide/md.rst
··· 221 221 222 222 layout 223 223 The ``layout`` for the array for the particular level. This is 224 - simply a number that is interpretted differently by different 224 + simply a number that is interpreted differently by different 225 225 levels. It can be written while assembling an array. 226 226 227 227 array_size
+1 -1
Documentation/admin-guide/media/bttv.rst
··· 77 77 only bt878-based cards can have a subsystem ID (which does not mean 78 78 that every card really has one). bt848 cards can't have a Subsystem 79 79 ID and therefore can't be autodetected. There is a list with the ID's 80 - at :doc:`bttv-cardlist` (in case you are intrested or want to mail 80 + at :doc:`bttv-cardlist` (in case you are interested or want to mail 81 81 patches with updates). 82 82 83 83
+1 -1
Documentation/admin-guide/media/dvb_references.rst
··· 10 10 http://vger.kernel.org/vger-lists.html#linux-media for details. 11 11 12 12 There are also some other old lists hosted at: 13 - https://linuxtv.org/lists.php. If you're insterested on that for historic 13 + https://linuxtv.org/lists.php. If you're interested on that for historic 14 14 reasons, please check the archive at https://linuxtv.org/pipermail/linux-dvb/. 15 15 16 16 The media subsystem Wiki is hosted at https://linuxtv.org/wiki/.
+2 -2
Documentation/admin-guide/media/frontend-cardlist.rst
··· 68 68 cx24117 Conexant CX24117 based 69 69 cx24120 Conexant CX24120 based 70 70 cx24123 Conexant CX24123 based 71 - ds3000 Montage Tehnology DS3000 based 71 + ds3000 Montage Technology DS3000 based 72 72 mb86a16 Fujitsu MB86A16 based 73 73 mt312 Zarlink VP310/MT312/ZL10313 based 74 74 s5h1420 Samsung S5H1420 based ··· 83 83 tda8083 Philips TDA8083 based 84 84 tda8261 Philips TDA8261 based 85 85 tda826x Philips TDA826X silicon tuner 86 - ts2020 Montage Tehnology TS2020 based tuners 86 + ts2020 Montage Technology TS2020 based tuners 87 87 tua6100 Infineon TUA6100 PLL 88 88 cx24113 Conexant CX24113/CX24128 tuner for DVB-S/DSS 89 89 itd1000 Integrant ITD1000 Zero IF tuner for DVB-S/DSS
+1 -1
Documentation/admin-guide/media/gspca-cardlist.rst
··· 305 305 pac7302 093a:2626 Labtec 2200 306 306 pac7302 093a:2627 Genius FaceCam 300 307 307 pac7302 093a:2628 Genius iLook 300 308 - pac7302 093a:2629 Genious iSlim 300 308 + pac7302 093a:2629 Genius iSlim 300 309 309 pac7302 093a:262a Webcam 300k 310 310 pac7302 093a:262c Philips SPC 230 NC 311 311 jl2005bcd 0979:0227 Various brands, 19 known cameras supported
+3 -3
Documentation/admin-guide/media/ipu3.rst
··· 86 86 Let us take the example of ov5670 sensor connected to CSI2 port 0, for a 87 87 2592x1944 image capture. 88 88 89 - Using the media contorller APIs, the ov5670 sensor is configured to send 89 + Using the media controller APIs, the ov5670 sensor is configured to send 90 90 frames in packed raw Bayer format to IPU3 CSI2 receiver. 91 91 92 92 .. code-block:: none ··· 313 313 314 314 **Geometric Distortion Correction** 315 315 316 - Geometric Distortion Correction is used to performe correction of distortions 317 - and image filtering. It needs some extra filter and envelop padding pixels to 316 + Geometric Distortion Correction is used to perform correction of distortions 317 + and image filtering. It needs some extra filter and envelope padding pixels to 318 318 work, so the input resolution of GDC should be larger than the output 319 319 resolution. 320 320
+1 -1
Documentation/admin-guide/media/remote-controller.rst
··· 68 68 69 69 Xorg recognizes several IR keycodes that have its numerical value lower 70 70 than 247. With the advent of Wayland, the input driver got updated too, 71 - and should now accept all keycodes. Yet, you may want to just reasign 71 + and should now accept all keycodes. Yet, you may want to just reassign 72 72 the keycodes to something that your favorite media application likes. 73 73 74 74 This can be done by setting
+2 -2
Documentation/admin-guide/mm/index.rst
··· 3 3 ================= 4 4 5 5 Linux memory management subsystem is responsible, as the name implies, 6 - for managing the memory in the system. This includes implemnetation of 6 + for managing the memory in the system. This includes implementation of 7 7 virtual memory and demand paging, memory allocation both for kernel 8 - internal structures and user space programms, mapping of files into 8 + internal structures and user space programs, mapping of files into 9 9 processes address space and many other cool things. 10 10 11 11 Linux memory management is a complex system with many configurable
+1 -1
Documentation/admin-guide/mm/numaperf.rst
··· 74 74 /sys/devices/system/node/nodeY/access0/initiators/ 75 75 76 76 These attributes apply only when accessed from nodes that have the 77 - are linked under the this access's inititiators. 77 + are linked under the this access's initiators. 78 78 79 79 The performance characteristics the kernel provides for the local initiators 80 80 are exported are as follows::
+1 -1
Documentation/admin-guide/mm/userfaultfd.rst
··· 114 114 you must provide some kind of page in your thread after reading from 115 115 the uffd. You must provide either ``UFFDIO_COPY`` or ``UFFDIO_ZEROPAGE``. 116 116 The normal behavior of the OS automatically providing a zero page on 117 - an annonymous mmaping is not in place. 117 + an anonymous mmaping is not in place. 118 118 119 119 - None of the page-delivering ioctls default to the range that you 120 120 registered with. You must fill in all fields for the appropriate
+1 -1
Documentation/admin-guide/module-signing.rst
··· 106 106 certificate and a private key. 107 107 108 108 If the PEM file containing the private key is encrypted, or if the 109 - PKCS#11 token requries a PIN, this can be provided at build time by 109 + PKCS#11 token requires a PIN, this can be provided at build time by 110 110 means of the ``KBUILD_SIGN_PIN`` variable. 111 111 112 112
+1 -1
Documentation/admin-guide/perf/imx-ddr.rst
··· 4 4 5 5 There are no performance counters inside the DRAM controller, so performance 6 6 signals are brought out to the edge of the controller where a set of 4 x 32 bit 7 - counters is implemented. This is controlled by the CSV modes programed in counter 7 + counters is implemented. This is controlled by the CSV modes programmed in counter 8 8 control register which causes a large number of PERF signals to be generated. 9 9 10 10 Selection of the value for each counter is done via the config registers. There
+2 -2
Documentation/admin-guide/pm/intel-speed-select.rst
··· 57 57 58 58 Summary of platform capability 59 59 ------------------------------ 60 - To check the current platform and driver capaibilities, execute:: 60 + To check the current platform and driver capabilities, execute:: 61 61 62 62 #intel-speed-select --info 63 63 ··· 658 658 Intel(R) SST-BF: 659 659 660 660 - Discover Intel(R) SST-BF and note low and high priority base frequency 661 - - Note the high prioity CPU list 661 + - Note the high priority CPU list 662 662 - Enable CLOS using core-power feature set 663 663 - Configure CLOS parameters. Use CLOS.min to set to minimum performance 664 664 - Subscribe desired CPUs to CLOS groups
+3 -3
Documentation/admin-guide/pm/intel_pstate.rst
··· 56 56 57 57 ``intel_pstate`` can operate in two different modes, active or passive. In the 58 58 active mode, it uses its own internal performance scaling governor algorithm or 59 - allows the hardware to do preformance scaling by itself, while in the passive 59 + allows the hardware to do performance scaling by itself, while in the passive 60 60 mode it responds to requests made by a generic ``CPUFreq`` governor implementing 61 61 a certain performance scaling algorithm. Which of them will be in effect 62 62 depends on what kernel command line options are used and on the capabilities of ··· 380 380 381 381 ``no_turbo`` 382 382 If set (equal to 1), the driver is not allowed to set any turbo P-states 383 - (see `Turbo P-states Support`_). If unset (equalt to 0, which is the 383 + (see `Turbo P-states Support`_). If unset (equal to 0, which is the 384 384 default), turbo P-states can be set by the driver. 385 385 [Note that ``intel_pstate`` does not support the general ``boost`` 386 386 attribute (supported by some other scaling drivers) which is replaced 387 387 by this one.] 388 388 389 - This attrubute does not affect the maximum supported frequency value 389 + This attribute does not affect the maximum supported frequency value 390 390 supplied to the ``CPUFreq`` core and exposed via the policy interface, 391 391 but it affects the maximum possible value of per-policy P-state limits 392 392 (see `Interpretation of Policy Attributes`_ below for details).
+1 -1
Documentation/admin-guide/ramoops.rst
··· 22 22 * ``mem_address`` for the start 23 23 * ``mem_size`` for the size. The memory size will be rounded down to a 24 24 power of two. 25 - * ``mem_type`` to specifiy if the memory type (default is pgprot_writecombine). 25 + * ``mem_type`` to specify if the memory type (default is pgprot_writecombine). 26 26 27 27 Typically the default value of ``mem_type=0`` should be used as that sets the pstore 28 28 mapping to pgprot_writecombine. Setting ``mem_type=1`` attempts to use
+5
Documentation/admin-guide/reporting-bugs.rst
··· 1 1 .. _reportingbugs: 2 2 3 + .. note:: 4 + 5 + This document is obsolete, and will be replaced by 6 + 'Documentation/admin-guide/reporting-issues.rst' in the near future. 7 + 3 8 Reporting bugs 4 9 ++++++++++++++ 5 10
+1631
Documentation/admin-guide/reporting-issues.rst
··· 1 + .. SPDX-License-Identifier: (GPL-2.0+ OR CC-BY-4.0) 2 + .. 3 + If you want to distribute this text under CC-BY-4.0 only, please use 'The 4 + Linux kernel developers' for author attribution and link this as source: 5 + https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/Documentation/admin-guide/reporting-issues.rst 6 + .. 7 + Note: Only the content of this RST file as found in the Linux kernel sources 8 + is available under CC-BY-4.0, as versions of this text that were processed 9 + (for example by the kernel's build system) might contain content taken from 10 + files which use a more restrictive license. 11 + 12 + .. important:: 13 + 14 + This document is being prepared to replace 15 + 'Documentation/admin-guide/reporting-bugs.rst'. The main work is done and 16 + you are already free to follow its instructions when reporting issues to the 17 + Linux kernel developers. But keep in mind, below text still needs a few 18 + finishing touches and review. It was merged to the Linux kernel sources at 19 + this stage to make this process easier and increase the text's visibility. 20 + 21 + Any improvements for the text or other feedback is thus very much welcome. 22 + Please send it to 'Thorsten Leemhuis <linux@leemhuis.info>' and 'Jonathan 23 + Corbet <corbet@lwn.net>', ideally with 'Linux kernel mailing list (LKML) 24 + <linux-kernel@vger.kernel.org>' and the 'Linux Kernel Documentation List 25 + <linux-doc@vger.kernel.org>' in CC. 26 + 27 + Areas in the text that still need work or discussion contain a hint like this 28 + which point out the remaining issues; all of them start with the word "FIXME" 29 + to make them easy to find. 30 + 31 + 32 + Reporting issues 33 + ++++++++++++++++ 34 + 35 + 36 + The short guide (aka TL;DR) 37 + =========================== 38 + 39 + If you're facing multiple issues with the Linux kernel at once, report each 40 + separately to its developers. Try your best guess which kernel part might be 41 + causing the issue. Check the :ref:`MAINTAINERS <maintainers>` file for how its 42 + developers expect to be told about issues. Note, it's rarely 43 + `bugzilla.kernel.org <https://bugzilla.kernel.org/>`_, as in almost all cases 44 + the report needs to be sent by email! 45 + 46 + Check the destination thoroughly for existing reports; also search the LKML 47 + archives and the web. Join existing discussion if you find matches. If you 48 + don't find any, install `the latest Linux mainline kernel 49 + <https://kernel.org/>`_. Make sure it's vanilla, thus is not patched or using 50 + add-on kernel modules. Also ensure the kernel is running in a healthy 51 + environment and is not already tainted before the issue occurs. 52 + 53 + If you can reproduce your issue with the mainline kernel, send a report to the 54 + destination you determined earlier. Make sure it includes all relevant 55 + information, which in case of a regression should mention the change that's 56 + causing it which can often can be found with a bisection. Also ensure the 57 + report reaches all people that need to know about it, for example the security 58 + team, the stable maintainers or the developers of the patch that causes a 59 + regression. Once the report is out, answer any questions that might be raised 60 + and help where you can. That includes keeping the ball rolling: every time a 61 + new rc1 mainline kernel is released, check if the issue is still happening 62 + there and attach a status update to your initial report. 63 + 64 + If you can not reproduce the issue with the mainline kernel, consider sticking 65 + with it; if you'd like to use an older version line and want to see it fixed 66 + there, first make sure it's still supported. Install its latest release as 67 + vanilla kernel. If you cannot reproduce the issue there, try to find the commit 68 + that fixed it in mainline or any discussion preceding it: those will often 69 + mention if backporting is planed or considered too complex. If backporting was 70 + not discussed, ask if it's in the cards. In case you don't find any commits or 71 + a preceding discussion, see the Linux-stable mailing list archives for existing 72 + reports, as it might be a regression specific to the version line. If it is, 73 + report it like you would report a problem in mainline (including the 74 + bisection). 75 + 76 + If you reached this point without a solution, ask for advice one the 77 + subsystem's mailing list. 78 + 79 + 80 + Step-by-step guide how to report issues to the kernel maintainers 81 + ================================================================= 82 + 83 + The above TL;DR outlines roughly how to report issues to the Linux kernel 84 + developers. It might be all that's needed for people already familiar with 85 + reporting issues to Free/Libre & Open Source Software (FLOSS) projects. For 86 + everyone else there is this section. It is more detailed and uses a 87 + step-by-step approach. It still tries to be brief for readability and leaves 88 + out a lot of details; those are described below the step-by-step guide in a 89 + reference section, which explains each of the steps in more detail. 90 + 91 + Note: this section covers a few more aspects than the TL;DR and does things in 92 + a slightly different order. That's in your interest, to make sure you notice 93 + early if an issue that looks like a Linux kernel problem is actually caused by 94 + something else. These steps thus help to ensure the time you invest in this 95 + process won't feel wasted in the end: 96 + 97 + * Stop reading this document and report the problem to your vendor instead, 98 + unless you are running the latest mainline kernel already or are willing to 99 + install it. This kernel must not be modified or enhanced in any way, and 100 + thus be considered 'vanilla'. 101 + 102 + * See if the issue you are dealing with qualifies as regression, security 103 + issue, or a really severe problem: those are 'issues of high priority' that 104 + need special handling in some steps that are about to follow. 105 + 106 + * Check if your kernel was 'tainted' when the issue occurred, as the event 107 + that made the kernel set this flag might be causing the issue you face. 108 + 109 + * Locate the driver or kernel subsystem that seems to be causing the issue. 110 + Find out how and where its developers expect reports. Note: most of the 111 + time this won't be bugzilla.kernel.org, as issues typically need to be sent 112 + by mail to a maintainer and a public mailing list. 113 + 114 + * Search the archives of the bug tracker or mailing list in question 115 + thoroughly for reports that might match your issue. Also check if you find 116 + something with your favorite internet search engine or in the Linux Kernel 117 + Mailing List (LKML) archives. If you find anything, join the discussion 118 + instead of sending a new report. 119 + 120 + * Create a fresh backup and put system repair and restore tools at hand. 121 + 122 + * Ensure your system does not enhance its kernels by building additional 123 + kernel modules on-the-fly, which solutions like DKMS might be doing locally 124 + without your knowledge. 125 + 126 + * Make sure it's not the kernel's surroundings that are causing the issue 127 + you face. 128 + 129 + * Write down coarsely how to reproduce the issue. If you deal with multiple 130 + issues at once, create separate notes for each of them and make sure they 131 + work independently on a freshly booted system. That's needed, as each issue 132 + needs to get reported to the kernel developers separately, unless they are 133 + strongly entangled. 134 + 135 + After these preparations you'll now enter the main part: 136 + 137 + * Install the latest Linux mainline kernel: that's where all issues get 138 + fixed first, because it's the version line the kernel developers mainly 139 + care about. Testing and reporting with the latest Linux stable kernel can 140 + be an acceptable alternative in some situations, for example during the 141 + merge window; but during that period you might want to suspend your efforts 142 + till its end anyway. 143 + 144 + * Ensure the kernel you just installed does not 'taint' itself when 145 + running. 146 + 147 + * Reproduce the issue with the kernel you just installed. If it doesn't show 148 + up there, head over to the instructions for issues only happening with 149 + stable and longterm kernels. 150 + 151 + * Optimize your notes: try to find and write the most straightforward way to 152 + reproduce your issue. Make sure the end result has all the important 153 + details, and at the same time is easy to read and understand for others 154 + that hear about it for the first time. And if you learned something in this 155 + process, consider searching again for existing reports about the issue. 156 + 157 + * If the failure includes a stack dump, like an Oops does, consider decoding 158 + it to find the offending line of code. 159 + 160 + * If your problem is a regression, try to narrow down when the issue was 161 + introduced as much as possible. 162 + 163 + * Start to compile the report by writing a detailed description about the 164 + issue. Always mention a few things: the latest kernel version you installed 165 + for reproducing, the Linux Distribution used, and your notes on how to 166 + reproduce the issue. Ideally, make the kernel's build configuration 167 + (.config) and the output from ``dmesg`` available somewhere on the net and 168 + link to it. Include or upload all other information that might be relevant, 169 + like the output/screenshot of an Oops or the output from ``lspci``. Once 170 + you wrote this main part, insert a normal length paragraph on top of it 171 + outlining the issue and the impact quickly. On top of this add one sentence 172 + that briefly describes the problem and gets people to read on. Now give the 173 + thing a descriptive title or subject that yet again is shorter. Then you're 174 + ready to send or file the report like the MAINTAINERS file told you, unless 175 + you are dealing with one of those 'issues of high priority': they need 176 + special care which is explained in 'Special handling for high priority 177 + issues' below. 178 + 179 + * Wait for reactions and keep the thing rolling until you can accept the 180 + outcome in one way or the other. Thus react publicly and in a timely manner 181 + to any inquiries. Test proposed fixes. Do proactive testing: retest with at 182 + least every first release candidate (RC) of a new mainline version and 183 + report your results. Send friendly reminders if things stall. And try to 184 + help yourself, if you don't get any help or if it's unsatisfying. 185 + 186 + 187 + Reporting issues only occurring in older kernel version lines 188 + ------------------------------------------------------------- 189 + 190 + This section is for you, if you tried the latest mainline kernel as outlined 191 + above, but failed to reproduce your issue there; at the same time you want to 192 + see the issue fixed in older version lines or a vendor kernel that's regularly 193 + rebased on new stable or longterm releases. If that case follow these steps: 194 + 195 + * Prepare yourself for the possibility that going through the next few steps 196 + might not get the issue solved in older releases: the fix might be too big 197 + or risky to get backported there. 198 + 199 + * Check if the kernel developers still maintain the Linux kernel version 200 + line you care about: go to the front page of kernel.org and make sure it 201 + mentions the latest release of the particular version line without an 202 + '[EOL]' tag. 203 + 204 + * Check the archives of the Linux stable mailing list for existing reports. 205 + 206 + * Install the latest release from the particular version line as a vanilla 207 + kernel. Ensure this kernel is not tainted and still shows the problem, as 208 + the issue might have already been fixed there. 209 + 210 + * Search the Linux kernel version control system for the change that fixed 211 + the issue in mainline, as its commit message might tell you if the fix is 212 + scheduled for backporting already. If you don't find anything that way, 213 + search the appropriate mailing lists for posts that discuss such an issue 214 + or peer-review possible fixes; then check the discussions if the fix was 215 + deemed unsuitable for backporting. If backporting was not considered at 216 + all, join the newest discussion, asking if it's in the cards. 217 + 218 + * Check if you're dealing with a regression that was never present in 219 + mainline by installing the first release of the version line you care 220 + about. If the issue doesn't show up with it, you basically need to report 221 + the issue with this version like you would report a problem with mainline 222 + (see above). This ideally includes a bisection followed by a search for 223 + existing reports on the net; with the help of the subject and the two 224 + relevant commit-ids. If that doesn't turn up anything, write the report; CC 225 + or forward the report to the stable maintainers, the stable mailing list, 226 + and those who authored the change. Include the shortened commit-id if you 227 + found the change that causes it. 228 + 229 + * One of the former steps should lead to a solution. If that doesn't work 230 + out, ask the maintainers for the subsystem that seems to be causing the 231 + issue for advice; CC the mailing list for the particular subsystem as well 232 + as the stable mailing list. 233 + 234 + 235 + Reference section: Reporting issues to the kernel maintainers 236 + ============================================================= 237 + 238 + The detailed guides above outline all the major steps in brief fashion, which 239 + should be enough for most people. But sometimes there are situations where even 240 + experienced users might wonder how to actually do one of those steps. That's 241 + what this section is for, as it will provide a lot more details on each of the 242 + above steps. Consider this as reference documentation: it's possible to read it 243 + from top to bottom. But it's mainly meant to skim over and a place to look up 244 + details how to actually perform those steps. 245 + 246 + A few words of general advice before digging into the details: 247 + 248 + * The Linux kernel developers are well aware this process is complicated and 249 + demands more than other FLOSS projects. We'd love to make it simpler. But 250 + that would require work in various places as well as some infrastructure, 251 + which would need constant maintenance; nobody has stepped up to do that 252 + work, so that's just how things are for now. 253 + 254 + * A warranty or support contract with some vendor doesn't entitle you to 255 + request fixes from developers in the upstream Linux kernel community: such 256 + contracts are completely outside the scope of the Linux kernel, its 257 + development community, and this document. That's why you can't demand 258 + anything such a contract guarantees in this context, not even if the 259 + developer handling the issue works for the vendor in question. If you want 260 + to claim your rights, use the vendor's support channel instead. When doing 261 + so, you might want to mention you'd like to see the issue fixed in the 262 + upstream Linux kernel; motivate them by saying it's the only way to ensure 263 + the fix in the end will get incorporated in all Linux distributions. 264 + 265 + * If you never reported an issue to a FLOSS project before you should consider 266 + reading `How to Report Bugs Effectively 267 + <https://www.chiark.greenend.org.uk/~sgtatham/bugs.html>`_, `How To Ask 268 + Questions The Smart Way 269 + <http://www.catb.org/esr/faqs/smart-questions.html>`_, and `How to ask good 270 + questions <https://jvns.ca/blog/good-questions/>`_. 271 + 272 + With that off the table, find below the details on how to properly report 273 + issues to the Linux kernel developers. 274 + 275 + 276 + Make sure you're using the upstream Linux kernel 277 + ------------------------------------------------ 278 + 279 + *Stop reading this document and report the problem to your vendor instead, 280 + unless you are running the latest mainline kernel already or are willing to 281 + install it. This kernel must not be modified or enhanced in any way, and 282 + thus be considered 'vanilla'.* 283 + 284 + Like most programmers, Linux kernel developers don't like to spend time dealing 285 + with reports for issues that don't even happen with the source code they 286 + maintain: it's just a waste everybody's time, yours included. That's why you 287 + later will have to test your issue with the latest 'vanilla' kernel: a kernel 288 + that was build using the Linux sources taken straight from `kernel.org 289 + <https://kernel.org/>`_ and not modified or enhanced in any way. 290 + 291 + Almost all kernels used in devices (Computers, Laptops, Smartphones, Routers, 292 + …) and most kernels shipped by Linux distributors are ancient from the point of 293 + kernel development and heavily modified. They thus do not qualify for reporting 294 + an issue to the Linux kernel developers: the issue you face with such a kernel 295 + might be fixed already or caused by the changes or additions, even if they look 296 + small or totally unrelated. That's why issues with such kernels need to be 297 + reported to the vendor that distributed it. Its developers should look into the 298 + report and, in case it turns out to be an upstream issue, fix it directly 299 + upstream or report it there. In practice that sometimes does not work out. If 300 + that the case, you might want to circumvent the vendor by installing the latest 301 + mainline kernel yourself and reporting the issue as outlined in this document; 302 + just make sure to use really fresh kernel (see below). 303 + 304 + 305 + .. note:: 306 + 307 + FIXME: Should we accept reports for issues with kernel images that are pretty 308 + close to vanilla? But when are they close enough and how to put that line in 309 + words? Maybe something like this? 310 + 311 + *Note: Some Linux kernel developers accept reports from vendor kernels that 312 + are known to be close to upstream. That for example is often the case for 313 + the kernels that Debian GNU/Linux Sid or Fedora Rawhide ship, which are 314 + normally following mainline closely and carry only a few patches. So a 315 + report with one of these might be accepted by the developers that need to 316 + handle it. But if they do, depends heavily on the individual developers and 317 + the issue at hand. That's why installing a mainline vanilla kernel is the 318 + safe bet.* 319 + 320 + *Arch Linux, other Fedora releases, and openSUSE Tumbleweed often use quite 321 + recent stable kernels that are pretty close to upstream, too. Some 322 + developers accept bugs from them as well. But note that you normally should 323 + avoid stable kernels for reporting issues and use a mainline kernel instead 324 + (see below).* 325 + 326 + Are there any other major Linux distributions that should be mentioned here? 327 + 328 + 329 + Issue of high priority? 330 + ----------------------- 331 + 332 + *See if the issue you are dealing with qualifies as regression, security 333 + issue, or a really severe problem: those are 'issues of high priority' that 334 + need special handling in some steps that are about to follow.* 335 + 336 + Linus Torvalds and the leading Linux kernel developers want to see some issues 337 + fixed as soon as possible, hence there are 'issues of high priority' that get 338 + handled slightly differently in the reporting process. Three type of cases 339 + qualify: regressions, security issues, and really severe problems. 340 + 341 + You deal with a 'regression' if something that worked with an older version of 342 + the Linux kernel does not work with a newer one or somehow works worse with it. 343 + It thus is a regression when a WiFi driver that did a fine job with Linux 5.7 344 + somehow misbehaves with 5.8 or doesn't work at all. It's also a regression if 345 + an application shows erratic behavior with a newer kernel, which might happen 346 + due to incompatible changes in the interface between the kernel and the 347 + userland (like procfs and sysfs). Significantly reduced performance or 348 + increased power consumption also qualify as regression. But keep in mind: the 349 + new kernel needs to be built with a configuration that is similar to the one 350 + from the old kernel (see below how to achieve that). That's because the kernel 351 + developers sometimes can not avoid incompatibilities when implementing new 352 + features; but to avoid regressions such features have to be enabled explicitly 353 + during build time configuration. 354 + 355 + What qualifies as security issue is left to your judgment. Consider reading 356 + 'Documentation/admin-guide/security-bugs.rst' before proceeding, as it 357 + provides additional details how to best handle security issues. 358 + 359 + An issue is a 'really severe problem' when something totally unacceptably bad 360 + happens. That's for example the case when a Linux kernel corrupts the data it's 361 + handling or damages hardware it's running on. You're also dealing with a severe 362 + issue when the kernel suddenly stops working with an error message ('kernel 363 + panic') or without any farewell note at all. Note: do not confuse a 'panic' (a 364 + fatal error where the kernel stop itself) with a 'Oops' (a recoverable error), 365 + as the kernel remains running after the latter. 366 + 367 + 368 + Check 'taint' flag 369 + ------------------ 370 + 371 + *Check if your kernel was 'tainted' when the issue occurred, as the event 372 + that made the kernel set this flag might be causing the issue you face.* 373 + 374 + The kernel marks itself with a 'taint' flag when something happens that might 375 + lead to follow-up errors that look totally unrelated. The issue you face might 376 + be such an error if your kernel is tainted. That's why it's in your interest to 377 + rule this out early before investing more time into this process. This is the 378 + only reason why this step is here, as this process later will tell you to 379 + install the latest mainline kernel; you will need to check the taint flag again 380 + then, as that's when it matters because it's the kernel the report will focus 381 + on. 382 + 383 + On a running system is easy to check if the kernel tainted itself: if ``cat 384 + /proc/sys/kernel/tainted`` returns '0' then the kernel is not tainted and 385 + everything is fine. Checking that file is impossible in some situations; that's 386 + why the kernel also mentions the taint status when it reports an internal 387 + problem (a 'kernel bug'), a recoverable error (a 'kernel Oops') or a 388 + non-recoverable error before halting operation (a 'kernel panic'). Look near 389 + the top of the error messages printed when one of these occurs and search for a 390 + line starting with 'CPU:'. It should end with 'Not tainted' if the kernel was 391 + not tainted when it noticed the problem; it was tainted if you see 'Tainted:' 392 + followed by a few spaces and some letters. 393 + 394 + If your kernel is tainted, study 'Documentation/admin-guide/tainted-kernels.rst' 395 + to find out why. Try to eliminate the reason. Often it's caused by one these 396 + three things: 397 + 398 + 1. A recoverable error (a 'kernel Oops') occurred and the kernel tainted 399 + itself, as the kernel knows it might misbehave in strange ways after that 400 + point. In that case check your kernel or system log and look for a section 401 + that starts with this:: 402 + 403 + Oops: 0000 [#1] SMP 404 + 405 + That's the first Oops since boot-up, as the '#1' between the brackets shows. 406 + Every Oops and any other problem that happens after that point might be a 407 + follow-up problem to that first Oops, even if both look totally unrelated. 408 + Rule this out by getting rid of the cause for the first Oops and reproducing 409 + the issue afterwards. Sometimes simply restarting will be enough, sometimes 410 + a change to the configuration followed by a reboot can eliminate the Oops. 411 + But don't invest too much time into this at this point of the process, as 412 + the cause for the Oops might already be fixed in the newer Linux kernel 413 + version you are going to install later in this process. 414 + 415 + 2. Your system uses a software that installs its own kernel modules, for 416 + example Nvidia's proprietary graphics driver or VirtualBox. The kernel 417 + taints itself when it loads such module from external sources (even if 418 + they are Open Source): they sometimes cause errors in unrelated kernel 419 + areas and thus might be causing the issue you face. You therefore have to 420 + prevent those modules from loading when you want to report an issue to the 421 + Linux kernel developers. Most of the time the easiest way to do that is: 422 + temporarily uninstall such software including any modules they might have 423 + installed. Afterwards reboot. 424 + 425 + 3. The kernel also taints itself when it's loading a module that resides in 426 + the staging tree of the Linux kernel source. That's a special area for 427 + code (mostly drivers) that does not yet fulfill the normal Linux kernel 428 + quality standards. When you report an issue with such a module it's 429 + obviously okay if the kernel is tainted; just make sure the module in 430 + question is the only reason for the taint. If the issue happens in an 431 + unrelated area reboot and temporarily block the module from being loaded 432 + by specifying ``foo.blacklist=1`` as kernel parameter (replace 'foo' with 433 + the name of the module in question). 434 + 435 + 436 + Locate kernel area that causes the issue 437 + ---------------------------------------- 438 + 439 + *Locate the driver or kernel subsystem that seems to be causing the issue. 440 + Find out how and where its developers expect reports. Note: most of the 441 + time this won't be bugzilla.kernel.org, as issues typically need to be sent 442 + by mail to a maintainer and a public mailing list.* 443 + 444 + It's crucial to send your report to the right people, as the Linux kernel is a 445 + big project and most of its developers are only familiar with a small subset of 446 + it. Quite a few programmers for example only care for just one driver, for 447 + example one for a WiFi chip; its developer likely will only have small or no 448 + knowledge about the internals of remote or unrelated "subsystems", like the TCP 449 + stack, the PCIe/PCI subsystem, memory management or file systems. 450 + 451 + Problem is: the Linux kernel lacks a central bug tracker where you can simply 452 + file your issue and make it reach the developers that need to know about it. 453 + That's why you have to find the right place and way to report issues yourself. 454 + You can do that with the help of a script (see below), but it mainly targets 455 + kernel developers and experts. For everybody else the MAINTAINERS file is the 456 + better place. 457 + 458 + How to read the MAINTAINERS file 459 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 460 + To illustrate how to use the :ref:`MAINTAINERS <maintainers>` file, lets assume 461 + the WiFi in your Laptop suddenly misbehaves after updating the kernel. In that 462 + case it's likely an issue in the WiFi driver. Obviously it could also be some 463 + code it builds upon, but unless you suspect something like that stick to the 464 + driver. If it's really something else, the driver's developers will get the 465 + right people involved. 466 + 467 + Sadly, there is no way to check which code is driving a particular hardware 468 + component that is both universal and easy. 469 + 470 + In case of a problem with the WiFi driver you for example might want to look at 471 + the output of ``lspci -k``, as it lists devices on the PCI/PCIe bus and the 472 + kernel module driving it:: 473 + 474 + [user@something ~]$ lspci -k 475 + [...] 476 + 3a:00.0 Network controller: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter (rev 32) 477 + Subsystem: Bigfoot Networks, Inc. Device 1535 478 + Kernel driver in use: ath10k_pci 479 + Kernel modules: ath10k_pci 480 + [...] 481 + 482 + But this approach won't work if your WiFi chip is connected over USB or some 483 + other internal bus. In those cases you might want to check your WiFi manager or 484 + the output of ``ip link``. Look for the name of the problematic network 485 + interface, which might be something like 'wlp58s0'. This name can be used like 486 + this to find the module driving it:: 487 + 488 + [user@something ~]$ realpath --relative-to=/sys/module/ /sys/class/net/wlp58s0/device/driver/module 489 + ath10k_pci 490 + 491 + In case tricks like these don't bring you any further, try to search the 492 + internet on how to narrow down the driver or subsystem in question. And if you 493 + are unsure which it is: just try your best guess, somebody will help you if you 494 + guessed poorly. 495 + 496 + Once you know the driver or subsystem, you want to search for it in the 497 + MAINTAINERS file. In the case of 'ath10k_pci' you won't find anything, as the 498 + name is too specific. Sometimes you will need to search on the net for help; 499 + but before doing so, try a somewhat shorted or modified name when searching the 500 + MAINTAINERS file, as then you might find something like this:: 501 + 502 + QUALCOMM ATHEROS ATH10K WIRELESS DRIVER 503 + Mail: A. Some Human <shuman@example.com> 504 + Mailing list: ath10k@lists.infradead.org 505 + Status: Supported 506 + Web-page: https://wireless.wiki.kernel.org/en/users/Drivers/ath10k 507 + SCM: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git 508 + Files: drivers/net/wireless/ath/ath10k/ 509 + 510 + Note: the line description will be abbreviations, if you read the plain 511 + MAINTAINERS file found in the root of the Linux source tree. 'Mail:' for 512 + example will be 'M:', 'Mailing list:' will be 'L', and 'Status:' will be 'S:'. 513 + A section near the top of the file explains these and other abbreviations. 514 + 515 + First look at the line 'Status'. Ideally it should be 'Supported' or 516 + 'Maintained'. If it states 'Obsolete' then you are using some outdated approach 517 + that was replaced by a newer solution you need to switch to. Sometimes the code 518 + only has someone who provides 'Odd Fixes' when feeling motivated. And with 519 + 'Orphan' you are totally out of luck, as nobody takes care of the code anymore. 520 + That only leaves these options: arrange yourself to live with the issue, fix it 521 + yourself, or find a programmer somewhere willing to fix it. 522 + 523 + After checking the status, look for a line starting with 'bugs:': it will tell 524 + you where to find a subsystem specific bug tracker to file your issue. The 525 + example above does not have such a line. That is the case for most sections, as 526 + Linux kernel development is completely driven by mail. Very few subsystems use 527 + a bug tracker, and only some of those rely on bugzilla.kernel.org. 528 + 529 + 530 + .. note:: 531 + 532 + FIXME: The old text took a totally different approach to bugzilla.kernel.org, 533 + as it mentions it as the place to file issue for people that don't known how 534 + to contact the appropriate people. The new one mentions it rarely; and when 535 + it does like here, it warns users that it's often the wrong place to go. 536 + 537 + This approach was chosen as the main author of this document noticed quite a 538 + few users (or even a lot?) get no reply to the bugs they file in bugzilla. 539 + That's kind of expected, as quite a few (many? most?) of the maintainers 540 + don't even get notified when reports for their subsystem get filed there. And 541 + not getting a single reply to report is something that is just annoying for 542 + users and might make them angry. Improving bugzilla.k.o would be an option, 543 + but on the kernel and maintainers summit 2017 it was agreed on to first go 544 + this route (sorry it took so long): it's easier to achieve and less 545 + controversial, as putting additional burden on already overworked maintainers 546 + is unlikely to get well received. 547 + 548 + 549 + In this and many other cases you thus have to look for lines starting with 550 + 'Mail:' instead. Those mention the name and the email addresses for the 551 + maintainers of the particular code. Also look for a line starting with 'Mailing 552 + list:', which tells you the public mailing list where the code is developed. 553 + Your report later needs to go by mail to those addresses. Additionally, for all 554 + issue reports sent by email, make sure to add the Linux Kernel Mailing List 555 + (LKML) <linux-kernel@vger.kernel.org> to CC. Don't omit either of the mailing 556 + lists when sending your issue report by mail later! Maintainers are busy people 557 + and might leave some work for other developers on the subsystem specific list; 558 + and LKML is important to have one place where all issue reports can be found. 559 + 560 + 561 + .. note:: 562 + 563 + FIXME: Above section tells users to always CC LKML. These days it's a kind of 564 + "catch-all" list anyway, which nearly nobody seems to follow closely. So it 565 + seems appropriate to go "all in" and make people send their reports here, 566 + too, as everything (reports, fixes, ...) then can be found in one place (at 567 + least for all reports sent by mail and all subsystems that CC LKML). 568 + 569 + Related: Should we create mailing list like 'linux-issues@vger.kernel.org' 570 + and tell users above to always CC it when reporting issues? Then there would 571 + be one central place reporters could search for existing reports (at least 572 + for issues reported by mail) without getting regular LKML traffic mixed into 573 + the results. 574 + 575 + 576 + Finding the maintainers with the help of a script 577 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 578 + 579 + For people that have the Linux sources at hand there is a second option to find 580 + the proper place to report: the script 'scripts/get_maintainer.pl' which tries 581 + to find all people to contact. It queries the MAINTAINERS file and needs to be 582 + called with a path to the source code in question. For drivers compiled as 583 + module if often can be found with a command like this:: 584 + 585 + $ modinfo ath10k_pci | grep filename | sed 's!/lib/modules/.*/kernel/!!; s!filename:!!; s!\.ko\(\|\.xz\)!!' 586 + drivers/net/wireless/ath/ath10k/ath10k_pci.ko 587 + 588 + Pass parts of this to the script:: 589 + 590 + $ ./scripts/get_maintainer.pl -f drivers/net/wireless/ath/ath10k* 591 + Some Human <shuman@example.com> (supporter:QUALCOMM ATHEROS ATH10K WIRELESS DRIVER) 592 + Another S. Human <asomehuman@example.com> (maintainer:NETWORKING DRIVERS) 593 + ath10k@lists.infradead.org (open list:QUALCOMM ATHEROS ATH10K WIRELESS DRIVER) 594 + linux-wireless@vger.kernel.org (open list:NETWORKING DRIVERS (WIRELESS)) 595 + netdev@vger.kernel.org (open list:NETWORKING DRIVERS) 596 + linux-kernel@vger.kernel.org (open list) 597 + 598 + Don't sent your report to all of them. Send it to the maintainers, which the 599 + script calls "supporter:"; additionally CC the most specific mailing list for 600 + the code as well as the Linux Kernel Mailing List (LKML). In this case you thus 601 + would need to send the report to 'Some Human <shuman@example.com>' with 602 + 'ath10k@lists.infradead.org' and 'linux-kernel@vger.kernel.org' in CC. 603 + 604 + Note: in case you cloned the Linux sources with git you might want to call 605 + ``get_maintainer.pl`` a second time with ``--git``. The script then will look 606 + at the commit history to find which people recently worked on the code in 607 + question, as they might be able to help. But use these results with care, as it 608 + can easily send you in a wrong direction. That for example happens quickly in 609 + areas rarely changed (like old or unmaintained drivers): sometimes such code is 610 + modified during tree-wide cleanups by developers that do not care about the 611 + particular driver at all. 612 + 613 + 614 + Search for existing reports 615 + --------------------------- 616 + 617 + *Search the archives of the bug tracker or mailing list in question 618 + thoroughly for reports that might match your issue. Also check if you find 619 + something with your favorite internet search engine or in the Linux Kernel 620 + Mailing List (LKML) archives. If you find anything, join the discussion 621 + instead of sending a new report.* 622 + 623 + Reporting an issue that someone else already brought forward is often a waste 624 + of time for everyone involved, especially you as the reporter. So it's in your 625 + own interest to thoroughly check if somebody reported the issue already. Thus 626 + do not hurry with this step of the reporting process. Spending 30 to 60 minutes 627 + or even more time can save you and others quite a lot of time and trouble. 628 + 629 + The best place to search is the bug tracker or the mailing list where your 630 + report needs to be filed. You'll find quite a few of those lists on 631 + `lore.kernel.org <https://lore.kernel.org/>`_, but some are hosted in 632 + different places. That for example is the case for the ath10k WiFi driver used 633 + as example in the previous step. But you'll often find the archives for these 634 + lists easily on the net. Searching for 'archive ath10k@lists.infradead.org' for 635 + example will quickly lead you to the `Info page for the ath10k mailing list 636 + <https://lists.infradead.org/mailman/listinfo/ath10k>`_, which at the top links 637 + to its `list archives <https://lists.infradead.org/pipermail/ath10k/>`_. 638 + 639 + Sadly this and quite a few other lists miss a way to search the archives. In 640 + those cases use a regular internet search engine and add something like 641 + 'site:lists.infradead.org/pipermail/ath10k/' to your search terms, which limits 642 + the results to the archives at that URL. 643 + 644 + Additionally, search the internet and the `Linux Kernel Mailing List (LKML) 645 + archives <https://lore.kernel.org/lkml/>`_, as maybe the real culprit might be 646 + in some other subsystem. Searching in `bugzilla.kernel.org 647 + <https://bugzilla.kernel.org/>`_ might also be a good idea, but if you find 648 + anything there keep in mind: most subsystems expect reports in different 649 + places, hence those you find there might have not even reached the people 650 + responsible for the subsystem in question. Nevertheless, the data there might 651 + provide valuable insights. 652 + 653 + If you get flooded with results consider telling your search engine to limit 654 + search timeframe to the past month or year. And wherever you search, make sure 655 + to use good search terms; vary them a few times, too. While doing so try to 656 + look at the issue from the perspective of someone else: that will help you to 657 + come up with other words to use as search terms. Also make sure not to use too 658 + many search terms at once. Remember to search with and without information like 659 + the name of the kernel driver or the name of the affected hardware component. 660 + But its exact brand name (say 'ASUS Red Devil Radeon RX 5700 XT Gaming OC') 661 + often is not much helpful, as it is too specific. Instead try search terms like 662 + the model line (Radeon 5700 or Radeon 5000) and the code name of the main chip 663 + ('Navi' or 'Navi10') with and without its manufacturer ('AMD'). 664 + 665 + In case you find an existing report about your issue, join the discussion, as 666 + you might be able to provide valuable additional information. That can be 667 + important even when a fix is prepared or in its final stages already, as 668 + developers might look for people that can provide additional information or 669 + test a proposed fix. Jump to the section 'Duties after the report went out' for 670 + details on how to get properly involved. 671 + 672 + 673 + Prepare for emergencies 674 + ----------------------- 675 + 676 + *Create a fresh backup and put system repair and restore tools at hand.* 677 + 678 + Reminder, you are dealing with computers, which sometimes do unexpected things, 679 + especially if you fiddle with crucial parts like the kernel of its operating 680 + system. That's what you are about to do in this process. Thus, make sure to 681 + create a fresh backup; also ensure you have all tools at hand to repair or 682 + reinstall the operating system as well as everything you need to restore the 683 + backup. 684 + 685 + 686 + Make sure your kernel doesn't get enhanced 687 + ------------------------------------------ 688 + 689 + *Ensure your system does not enhance its kernels by building additional 690 + kernel modules on-the-fly, which solutions like DKMS might be doing locally 691 + without your knowledge.* 692 + 693 + Your kernel must be 'vanilla' when reporting an issue, but stops being pure as 694 + soon as it loads a kernel module not built from the sources used to compile the 695 + kernel image itself. That's why you need to ensure your Linux kernel stays 696 + vanilla by removing or disabling mechanisms like akmods and DKMS: those might 697 + build additional kernel modules automatically, for example when your boot into 698 + a newly installed Linux kernel the first time. Reboot after removing them and 699 + any modules they installed. 700 + 701 + Note, you might not be aware that your system is using one of these solutions: 702 + they often get set up silently when you install Nvidia's proprietary graphics 703 + driver, VirtualBox, or other software that requires a some support from a 704 + module not part of the Linux kernel. That why your might need to uninstall the 705 + packages with such software to get rid of any 3rd party kernel module. 706 + 707 + 708 + Ensure a healthy environment 709 + ---------------------------- 710 + 711 + *Make sure it's not the kernel's surroundings that are causing the issue 712 + you face.* 713 + 714 + Problems that look a lot like a kernel issue are sometimes caused by build or 715 + runtime environment. It's hard to rule out that problem completely, but you 716 + should minimize it: 717 + 718 + * Use proven tools when building your kernel, as bugs in the compiler or the 719 + binutils can cause the resulting kernel to misbehave. 720 + 721 + * Ensure your computer components run within their design specifications; 722 + that's especially important for the main processor, the main memory, and the 723 + motherboard. Therefore, stop undervolting or overclocking when facing a 724 + potential kernel issue. 725 + 726 + * Try to make sure it's not faulty hardware that is causing your issue. Bad 727 + main memory for example can result in a multitude of issues that will 728 + manifest itself in problems looking like kernel issues. 729 + 730 + * If you're dealing with a filesystem issue, you might want to check the file 731 + system in question with ``fsck``, as it might be damaged in a way that leads 732 + to unexpected kernel behavior. 733 + 734 + * When dealing with a regression, make sure it's not something else that 735 + changed in parallel to updating the kernel. The problem for example might be 736 + caused by other software that was updated at the same time. It can also 737 + happen that a hardware component coincidentally just broke when you rebooted 738 + into a new kernel for the first time. Updating the systems BIOS or changing 739 + something in the BIOS Setup can also lead to problems that on look a lot 740 + like a kernel regression. 741 + 742 + 743 + Document how to reproduce issue 744 + ------------------------------- 745 + 746 + *Write down coarsely how to reproduce the issue. If you deal with multiple 747 + issues at once, create separate notes for each of them and make sure they 748 + work independently on a freshly booted system. That's needed, as each issue 749 + needs to get reported to the kernel developers separately, unless they are 750 + strongly entangled.* 751 + 752 + If you deal with multiple issues at once, you'll have to report each of them 753 + separately, as they might be handled by different developers. Describing 754 + various issues in one report also makes it quite difficult for others to tear 755 + it apart. Hence, only combine issues in one report if they are very strongly 756 + entangled. 757 + 758 + Additionally, during the reporting process you will have to test if the issue 759 + happens with other kernel versions. Therefore, it will make your work easier if 760 + you know exactly how to reproduce an issue quickly on a freshly booted system. 761 + 762 + Note: it's often fruitless to report issues that only happened once, as they 763 + might be caused by a bit flip due to cosmic radiation. That's why you should 764 + try to rule that out by reproducing the issue before going further. Feel free 765 + to ignore this advice if you are experienced enough to tell a one-time error 766 + due to faulty hardware apart from a kernel issue that rarely happens and thus 767 + is hard to reproduce. 768 + 769 + 770 + Install a fresh kernel for testing 771 + ---------------------------------- 772 + 773 + *Install the latest Linux mainline kernel: that's where all issues get 774 + fixed first, because it's the version line the kernel developers mainly 775 + care about. Testing and reporting with the latest Linux stable kernel can 776 + be an acceptable alternative in some situations, for example during the 777 + merge window; but during that period you might want to suspend your efforts 778 + till its end anyway.* 779 + 780 + Reporting an issue to the Linux kernel developers they fixed weeks or months 781 + ago is annoying for them and wasting their and your time. That's why it's in 782 + everybody's interest to check if the issue occurs with the latest codebase 783 + before reporting it. 784 + 785 + In the scope of the Linux kernel the term 'latest' means: a kernel version 786 + recently created from the main line of development, as this 'mainline' tree is 787 + where developers first apply fixes; only after that are they are allowed to get 788 + backported to older, still supported version lines called 'stable' and 789 + 'longterm' kernels. That's why you should check a recent mainline kernel, even 790 + if you deal with an issue you only want to see fixed in an older version line. 791 + Another reason: some fixes are only applied to mainline or recent version 792 + lines, as it's too hard or risky to backport them to older versions. If that 793 + the case, reporting the issue again is unlikely to change anything. 794 + 795 + Longterm kernels (sometimes called "LTS kernels") are therefore unsuitable for 796 + testing; they simply are too distant from current development. Even the latest 797 + Linux 'stable' kernel is a significant bit behind and thus better avoided. At 798 + least most of the time, as sometimes a stable kernel can the best choice; but 799 + in those situations you might want to wait a few days anyway: 800 + 801 + Choosing between mainline, stable and waiting 802 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 803 + 804 + Head over to `kernel.org <https://kernel.org/>`_ to decide which version to 805 + use. Ignore the big yellow button that says 'Latest release' and look a little 806 + lower for a table. At its top you'll see a line starting with 'mainline', which 807 + most of the time will point to a pre-release with a version number like 808 + '5.8-rc2'. If that's the case, you'll want to use this mainline kernel for 809 + testing. Do not let that 'rc' scare you, these 'development kernels' are pretty 810 + reliable — and you made a backup, as you were instructed above, didn't you? 811 + 812 + In about two out of every nine to ten weeks, 'mainline' might point you to a 813 + proper release with a version number like '5.7'. If that happens, consider 814 + suspending the reporting process until the first pre-release of the next 815 + version (5.8-rc1) shows up on kernel.org. That's because the Linux development 816 + cycle then is in its two-week long 'merge window'. The bulk of the changes and 817 + all intrusive ones get merged for the next release during this time. It's a bit 818 + more risky to use mainline during this period. Kernel developers are also often 819 + quite busy then and might have no spare time to deal with issue reports. It's 820 + also quite possible that one of the many changes applied during the merge 821 + window fixes the issue you face; that's why you soon would have to retest with 822 + a newer kernel version anyway, as outlined below in the section 'Duties after 823 + the report went out'. 824 + 825 + That's why it might make sense to wait till the merge window is over. But don't 826 + to that if you're dealing with something that shouldn't wait. In that case 827 + consider obtaining the latest mainline kernel via git (see below) or use the 828 + latest stable version offered on kernel.org. Using that is also acceptable in 829 + case mainline for some reason does currently not work for you. An in general: 830 + using it for reproducing the issue is also better than not reporting it issue 831 + at all. 832 + 833 + How to obtain a fresh Linux kernel 834 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 835 + 836 + You can use pre-built or self-compiled kernel for testing; if you choose the 837 + latter approach, you can either obtain the source code using git or download it 838 + as tar archive. 839 + 840 + Using a pre-compiled kernel for testing is often the quickest, easiest, and 841 + safest way – especially is you are unfamiliar with the Linux kernel. But it 842 + needs to be a vanilla kernel, which can be hard to come buy. You are in luck if 843 + you are using a popular Linux distribution: for quite a few of them you'll find 844 + repositories on the net that contain packages with the latest mainline or 845 + stable kernels in vanilla fashion. It's totally okay to use these, just make 846 + sure from the repository's documentation they are really vanilla. And ensure 847 + the packages contain the latest versions as offered on kernel.org; they are 848 + likely unsuitable if the package is older than a week, as new mainline and 849 + stable kernels typically get released at least once a week. And be aware that 850 + you might need to get build your own kernel later anyway when it comes to 851 + helping test fixes, as described later in this document. 852 + 853 + Developers and experienced Linux users familiar with git are often best served 854 + by obtaining the latest Linux kernel sources straight from the `official 855 + development repository on kernel.org 856 + <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/>`_. 857 + Those are likely a bit ahead of the latest mainline pre-release. Don't worry 858 + about it: they are as reliable as a proper pre-release, unless the kernel's 859 + development cycle is currently in the middle of a merge window. But even then 860 + they are quite reliable. 861 + 862 + People unfamiliar with git are often best served by downloading the sources as 863 + tarball from `kernel.org <https://kernel.org/>`_. 864 + 865 + How to actually build a kernel isnot described here, as many websites explain 866 + the necessary steps already. If you are new to it, consider following one of 867 + those how-to's that suggest to use ``make localmodconfig``, as that tries to 868 + pick up the configuration of your current kernel and then tries to adjust it 869 + somewhat for your system. That does not make the resulting kernel any better, 870 + but quicker to compile. 871 + 872 + 873 + Check 'taint' flag 874 + ------------------ 875 + 876 + *Ensure the kernel you just installed does not 'taint' itself when 877 + running.* 878 + 879 + As outlined above in more detail already: the kernel sets a 'taint' flag when 880 + something happens that can lead to follow-up errors that look totally 881 + unrelated. That's why you need to check if the kernel you just installed does 882 + not set this flag. And if it does, you in almost all the cases needs to 883 + eliminate the reason for it before you reporting issues that occur with it. See 884 + the section above for details how to do that. 885 + 886 + 887 + Reproduce issue with the fresh kernel 888 + ------------------------------------- 889 + 890 + *Reproduce the issue with the kernel you just installed. If it doesn't show 891 + up there, head over to the instructions for issues only happening with 892 + stable and longterm kernels.* 893 + 894 + Check if the issue occurs with the fresh Linux kernel version you just 895 + installed. If it was fixed there already, consider sticking with this version 896 + line and abandoning your plan to report the issue. But keep in mind that other 897 + users might still be plagued by it, as long as it's not fixed in either stable 898 + and longterm version from kernel.org (and thus vendor kernels derived from 899 + those). If you prefer to use one of those or just want to help their users, 900 + head over to the section "Details about reporting issues only occurring in 901 + older kernel version lines" below. 902 + 903 + 904 + Optimize description to reproduce issue 905 + --------------------------------------- 906 + 907 + *Optimize your notes: try to find and write the most straightforward way to 908 + reproduce your issue. Make sure the end result has all the important 909 + details, and at the same time is easy to read and understand for others 910 + that hear about it for the first time. And if you learned something in this 911 + process, consider searching again for existing reports about the issue.* 912 + 913 + An unnecessarily complex report will make it hard for others to understand your 914 + report. Thus try to find a reproducer that's straight forward to describe and 915 + thus easy to understand in written form. Include all important details, but at 916 + the same time try to keep it as short as possible. 917 + 918 + In this in the previous steps you likely have learned a thing or two about the 919 + issue you face. Use this knowledge and search again for existing reports 920 + instead you can join. 921 + 922 + 923 + Decode failure messages 924 + ----------------------- 925 + 926 + .. note:: 927 + 928 + FIXME: The text in this section is a placeholder for now and quite similar to 929 + the old text found in 'Documentation/admin-guide/reporting-bugs.rst' 930 + currently. It and the document it references are known to be outdated and 931 + thus need to be revisited. Thus consider this note a request for help: if you 932 + are familiar with this topic, please write a few lines that would fit here. 933 + Alternatively, simply outline the current situation roughly to the main 934 + authors of this document (see intro), as they might be able to write 935 + something then. 936 + 937 + This section in the end should answer questions like "when is this actually 938 + needed", "what .config options to ideally set earlier to make this step easy 939 + or unnecessary?" (likely CONFIG_UNWINDER_ORC when it's available, otherwise 940 + CONFIG_UNWINDER_FRAME_POINTER; but is there anything else needed?). 941 + 942 + .. 943 + 944 + *If the failure includes a stack dump, like an Oops does, consider decoding 945 + it to find the offending line of code.* 946 + 947 + When the kernel detects an error, it will print a stack dump that allows to 948 + identify the exact line of code where the issue happens. But that information 949 + sometimes needs to get decoded to be readable, which is explained in 950 + admin-guide/bug-hunting.rst. 951 + 952 + 953 + Special care for regressions 954 + ---------------------------- 955 + 956 + *If your problem is a regression, try to narrow down when the issue was 957 + introduced as much as possible.* 958 + 959 + Linux lead developer Linus Torvalds insists that the Linux kernel never 960 + worsens, that's why he deems regressions as unacceptable and wants to see them 961 + fixed quickly. That's why changes that introduced a regression are often 962 + promptly reverted if the issue they cause can't get solved quickly any other 963 + way. Reporting a regression is thus a bit like playing a kind of trump card to 964 + get something quickly fixed. But for that to happen the change that's causing 965 + the regression needs to be known. Normally it's up to the reporter to track 966 + down the culprit, as maintainers often won't have the time or setup at hand to 967 + reproduce it themselves. 968 + 969 + To find the change there is a process called 'bisection' which the document 970 + 'Documentation/admin-guide/bug-bisect.rst' describes in detail. That process 971 + will often require you to build about ten to twenty kernel images, trying to 972 + reproduce the issue with each of them before building the next. Yes, that takes 973 + some time, but don't worry, it works a lot quicker than most people assume. 974 + Thanks to a 'binary search' this will lead you to the one commit in the source 975 + code management system that's causing the regression. Once you find it, search 976 + the net for the subject of the change, its commit id and the shortened commit id 977 + (the first 12 characters of the commit id). This will lead you to existing 978 + reports about it, if there are any. 979 + 980 + Note, a bisection needs a bit of know-how, which not everyone has, and quite a 981 + bit of effort, which not everyone is willing to invest. Nevertheless, it's 982 + highly recommended performing a bisection yourself. If you really can't or 983 + don't want to go down that route at least find out which mainline kernel 984 + introduced the regression. If something for example breaks when switching from 985 + 5.5.15 to 5.8.4, then try at least all the mainline releases in that area (5.6, 986 + 5.7 and 5.8) to check when it first showed up. Unless you're trying to find a 987 + regression in a stable or longterm kernel, avoid testing versions which number 988 + has three sections (5.6.12, 5.7.8), as that makes the outcome hard to 989 + interpret, which might render your testing useless. Once you found the major 990 + version which introduced the regression, feel free to move on in the reporting 991 + process. But keep in mind: it depends on the issue at hand if the developers 992 + will be able to help without knowing the culprit. Sometimes they might 993 + recognize from the report want went wrong and can fix it; other times they will 994 + be unable to help unless you perform a bisection. 995 + 996 + When dealing with regressions make sure the issue you face is really caused by 997 + the kernel and not by something else, as outlined above already. 998 + 999 + In the whole process keep in mind: an issue only qualifies as regression if the 1000 + older and the newer kernel got built with a similar configuration. The best way 1001 + to archive this: copy the configuration file (``.config``) from the old working 1002 + kernel freshly to each newer kernel version you try. Afterwards run ``make 1003 + oldnoconfig`` to adjust it for the needs of the new version without enabling 1004 + any new feature, as those are allowed to cause regressions. 1005 + 1006 + 1007 + Write and send the report 1008 + ------------------------- 1009 + 1010 + *Start to compile the report by writing a detailed description about the 1011 + issue. Always mention a few things: the latest kernel version you installed 1012 + for reproducing, the Linux Distribution used, and your notes on how to 1013 + reproduce the issue. Ideally, make the kernel's build configuration 1014 + (.config) and the output from ``dmesg`` available somewhere on the net and 1015 + link to it. Include or upload all other information that might be relevant, 1016 + like the output/screenshot of an Oops or the output from ``lspci``. Once 1017 + you wrote this main part, insert a normal length paragraph on top of it 1018 + outlining the issue and the impact quickly. On top of this add one sentence 1019 + that briefly describes the problem and gets people to read on. Now give the 1020 + thing a descriptive title or subject that yet again is shorter. Then you're 1021 + ready to send or file the report like the MAINTAINERS file told you, unless 1022 + you are dealing with one of those 'issues of high priority': they need 1023 + special care which is explained in 'Special handling for high priority 1024 + issues' below.* 1025 + 1026 + Now that you have prepared everything it's time to write your report. How to do 1027 + that is partly explained by the three documents linked to in the preface above. 1028 + That's why this text will only mention a few of the essentials as well as 1029 + things specific to the Linux kernel. 1030 + 1031 + There is one thing that fits both categories: the most crucial parts of your 1032 + report are the title/subject, the first sentence, and the first paragraph. 1033 + Developers often get quite a lot of mail. They thus often just take a few 1034 + seconds to skim a mail before deciding to move on or look closer. Thus: the 1035 + better the top section of your report, the higher are the chances that someone 1036 + will look into it and help you. And that is why you should ignore them for now 1037 + and write the detailed report first. ;-) 1038 + 1039 + Things each report should mention 1040 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1041 + 1042 + Describe in detail how your issue happens with the fresh vanilla kernel you 1043 + installed. Try to include the step-by-step instructions you wrote and optimized 1044 + earlier that outline how you and ideally others can reproduce the issue; in 1045 + those rare cases where that's impossible try to describe what you did to 1046 + trigger it. 1047 + 1048 + Also include all the relevant information others might need to understand the 1049 + issue and its environment. What's actually needed depends a lot on the issue, 1050 + but there are some things you should include always: 1051 + 1052 + * the output from ``cat /proc/version``, which contains the Linux kernel 1053 + version number and the compiler it was built with. 1054 + 1055 + * the Linux distribution the machine is running (``hostnamectl | grep 1056 + "Operating System"``) 1057 + 1058 + * the architecture of the CPU and the operating system (``uname -mi``) 1059 + 1060 + * if you are dealing with a regression and performed a bisection, mention the 1061 + subject and the commit-id of the change that is causing it. 1062 + 1063 + In a lot of cases it's also wise to make two more things available to those 1064 + that read your report: 1065 + 1066 + * the configuration used for building your Linux kernel (the '.config' file) 1067 + 1068 + * the kernel's messages that you get from ``dmesg`` written to a file. Make 1069 + sure that it starts with a line like 'Linux version 5.8-1 1070 + (foobar@example.com) (gcc (GCC) 10.2.1, GNU ld version 2.34) #1 SMP Mon Aug 1071 + 3 14:54:37 UTC 2020' If it's missing, then important messages from the first 1072 + boot phase already got discarded. In this case instead consider using 1073 + ``journalctl -b 0 -k``; alternatively you can also reboot, reproduce the 1074 + issue and call ``dmesg`` right afterwards. 1075 + 1076 + These two files are big, that's why it's a bad idea to put them directly into 1077 + your report. If you are filing the issue in a bug tracker then attach them to 1078 + the ticket. If you report the issue by mail do not attach them, as that makes 1079 + the mail too large; instead do one of these things: 1080 + 1081 + * Upload the files somewhere public (your website, a public file paste 1082 + service, a ticket created just for this purpose on `bugzilla.kernel.org 1083 + <https://bugzilla.kernel.org/>`_, ...) and include a link to them in your 1084 + report. Ideally use something where the files stay available for years, as 1085 + they could be useful to someone many years from now; this for example can 1086 + happen if five or ten years from now a developer works on some code that was 1087 + changed just to fix your issue. 1088 + 1089 + * Put the files aside and mention you will send them later in individual 1090 + replies to your own mail. Just remember to actually do that once the report 1091 + went out. ;-) 1092 + 1093 + Things that might be wise to provide 1094 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1095 + 1096 + Depending on the issue you might need to add more background data. Here are a 1097 + few suggestions what often is good to provide: 1098 + 1099 + * If you are dealing with a 'warning', an 'OOPS' or a 'panic' from the kernel, 1100 + include it. If you can't copy'n'paste it, try to capture a netconsole trace 1101 + or at least take a picture of the screen. 1102 + 1103 + * If the issue might be related to your computer hardware, mention what kind 1104 + of system you use. If you for example have problems with your graphics card, 1105 + mention its manufacturer, the card's model, and what chip is uses. If it's a 1106 + laptop mention its name, but try to make sure it's meaningful. 'Dell XPS 13' 1107 + for example is not, because it might be the one from 2012; that one looks 1108 + not that different from the one sold today, but apart from that the two have 1109 + nothing in common. Hence, in such cases add the exact model number, which 1110 + for example are '9380' or '7390' for XPS 13 models introduced during 2019. 1111 + Names like 'Lenovo Thinkpad T590' are also somewhat ambiguous: there are 1112 + variants of this laptop with and without a dedicated graphics chip, so try 1113 + to find the exact model name or specify the main components. 1114 + 1115 + * Mention the relevant software in use. If you have problems with loading 1116 + modules, you want to mention the versions of kmod, systemd, and udev in use. 1117 + If one of the DRM drivers misbehaves, you want to state the versions of 1118 + libdrm and Mesa; also specify your Wayland compositor or the X-Server and 1119 + its driver. If you have a filesystem issue, mention the version of 1120 + corresponding filesystem utilities (e2fsprogs, btrfs-progs, xfsprogs, ...). 1121 + 1122 + * Gather additional information from the kernel that might be of interest. The 1123 + output from ``lspci -nn`` will for example help others to identify what 1124 + hardware you use. If you have a problem with hardware you even might want to 1125 + make the output from ``sudo lspci -vvv`` available, as that provides 1126 + insights how the components were configured. For some issues it might be 1127 + good to include the contents of files like ``/proc/cpuinfo``, 1128 + ``/proc/ioports``, ``/proc/iomem``, ``/proc/modules``, or 1129 + ``/proc/scsi/scsi``. Some subsystem also offer tools to collect relevant 1130 + information. One such tool is ``alsa-info.sh`` `which the audio/sound 1131 + subsystem developers provide <https://www.alsa-project.org/wiki/AlsaInfo>`_. 1132 + 1133 + Those examples should give your some ideas of what data might be wise to 1134 + attach, but you have to think yourself what will be helpful for others to know. 1135 + Don't worry too much about forgetting something, as developers will ask for 1136 + additional details they need. But making everything important available from 1137 + the start increases the chance someone will take a closer look. 1138 + 1139 + 1140 + The important part: the head of your report 1141 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1142 + 1143 + Now that you have the detailed part of the report prepared let's get to the 1144 + most important section: the first few sentences. Thus go to the top, add 1145 + something like 'The detailed description:' before the part you just wrote and 1146 + insert two newlines at the top. Now write one normal length paragraph that 1147 + describes the issue roughly. Leave out all boring details and focus on the 1148 + crucial parts readers need to know to understand what this is all about; if you 1149 + think this bug affects a lot of users, mention this to get people interested. 1150 + 1151 + Once you did that insert two more lines at the top and write a one sentence 1152 + summary that explains quickly what the report is about. After that you have to 1153 + get even more abstract and write an even shorter subject/title for the report. 1154 + 1155 + Now that you have written this part take some time to optimize it, as it is the 1156 + most important parts of your report: a lot of people will only read this before 1157 + they decide if reading the rest is time well spent. 1158 + 1159 + Now send or file the report like the :ref:`MAINTAINERS <maintainers>` file told 1160 + you, unless it's one of those 'issues of high priority' outlined earlier: in 1161 + that case please read the next subsection first before sending the report on 1162 + its way. 1163 + 1164 + Special handling for high priority issues 1165 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1166 + 1167 + Reports for high priority issues need special handling. 1168 + 1169 + **Severe bugs**: make sure the subject or ticket title as well as the first 1170 + paragraph makes the severeness obvious. 1171 + 1172 + **Regressions**: If the issue is a regression add [REGRESSION] to the mail's 1173 + subject or the title in the bug-tracker. If you did not perform a bisection 1174 + mention at least the latest mainline version you tested that worked fine (say 1175 + 5.7) and the oldest where the issue occurs (say 5.8). If you did a successful 1176 + bisection mention the commit id and subject of the change that causes the 1177 + regression. Also make sure to add the author of that change to your report; if 1178 + you need to file your bug in a bug-tracker forward the report to him in a 1179 + private mail and mention where your filed it. 1180 + 1181 + **Security issues**: for these issues your will have to evaluate if a 1182 + short-term risk to other users would arise if details were publicly disclosed. 1183 + If that's not the case simply proceed with reporting the issue as described. 1184 + For issues that bear such a risk you will need to adjust the reporting process 1185 + slightly: 1186 + 1187 + * If the MAINTAINERS file instructed you to report the issue by mail, do not 1188 + CC any public mailing lists. 1189 + 1190 + * If you were supposed to file the issue in a bug tracker make sure to mark 1191 + the ticket as 'private' or 'security issue'. If the bug tracker does not 1192 + offer a way to keep reports private, forget about it and send your report as 1193 + a private mail to the maintainers instead. 1194 + 1195 + In both cases make sure to also mail your report to the addresses the 1196 + MAINTAINERS file lists in the section 'security contact'. Ideally directly CC 1197 + them when sending the report by mail. If you filed it in a bug tracker, forward 1198 + the report's text to these addresses; but on top of it put a small note where 1199 + you mention that you filed it with a link to the ticket. 1200 + 1201 + See 'Documentation/admin-guide/security-bugs.rst' for more information. 1202 + 1203 + 1204 + Duties after the report went out 1205 + -------------------------------- 1206 + 1207 + *Wait for reactions and keep the thing rolling until you can accept the 1208 + outcome in one way or the other. Thus react publicly and in a timely manner 1209 + to any inquiries. Test proposed fixes. Do proactive testing: retest with at 1210 + least every first release candidate (RC) of a new mainline version and 1211 + report your results. Send friendly reminders if things stall. And try to 1212 + help yourself, if you don't get any help or if it's unsatisfying.* 1213 + 1214 + If your report was good and you are really lucky then one of the developers 1215 + might immediately spot what's causing the issue; they then might write a patch 1216 + to fix it, test it, and send it straight for integration in mainline while 1217 + tagging it for later backport to stable and longterm kernels that need it. Then 1218 + all you need to do is reply with a 'Thank you very much' and switch to a version 1219 + with the fix once it gets released. 1220 + 1221 + But this ideal scenario rarely happens. That's why the job is only starting 1222 + once you got the report out. What you'll have to do depends on the situations, 1223 + but often it will be the things listed below. But before digging into the 1224 + details, here are a few important things you need to keep in mind for this part 1225 + of the process. 1226 + 1227 + 1228 + General advice for further interactions 1229 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1230 + 1231 + **Always reply in public**: When you filed the issue in a bug tracker, always 1232 + reply there and do not contact any of the developers privately about it. For 1233 + mailed reports always use the 'Reply-all' function when replying to any mails 1234 + you receive. That includes mails with any additional data you might want to add 1235 + to your report: go to your mail applications 'Sent' folder and use 'reply-all' 1236 + on your mail with the report. This approach will make sure the public mailing 1237 + list(s) and everyone else that gets involved over time stays in the loop; it 1238 + also keeps the mail thread intact, which among others is really important for 1239 + mailing lists to group all related mails together. 1240 + 1241 + There are just two situations where a comment in a bug tracker or a 'Reply-all' 1242 + is unsuitable: 1243 + 1244 + * Someone tells you to send something privately. 1245 + 1246 + * You were told to send something, but noticed it contains sensitive 1247 + information that needs to be kept private. In that case it's okay to send it 1248 + in private to the developer that asked for it. But note in the ticket or a 1249 + mail that you did that, so everyone else knows you honored the request. 1250 + 1251 + **Do research before asking for clarifications or help**: In this part of the 1252 + process someone might tell you to do something that requires a skill you might 1253 + not have mastered yet. For example, you might be asked to use some test tools 1254 + you never have heard of yet; or you might be asked to apply a patch to the 1255 + Linux kernel sources to test if it helps. In some cases it will be fine sending 1256 + a reply asking for instructions how to do that. But before going that route try 1257 + to find the answer own your own by searching the internet; alternatively 1258 + consider asking in other places for advice. For example ask a fried or post 1259 + about it to a chatroom or forum you normally hang out. 1260 + 1261 + **Be patient**: If you are really lucky you might get a reply to your report 1262 + within a few hours. But most of the time it will take longer, as maintainers 1263 + are scattered around the globe and thus might be in a different time zone – one 1264 + where they already enjoy their night away from keyboard. 1265 + 1266 + In general, kernel developers will take one to five business days to respond to 1267 + reports. Sometimes it will take longer, as they might be busy with the merge 1268 + windows, other work, visiting developer conferences, or simply enjoying a long 1269 + summer holiday. 1270 + 1271 + The 'issues of high priority' (see above for an explanation) are an exception 1272 + here: maintainers should address them as soon as possible; that's why you 1273 + should wait a week at maximum (or just two days if it's something urgent) 1274 + before sending a friendly reminder. 1275 + 1276 + Sometimes the maintainer might not be responding in a timely manner; other 1277 + times there might be disagreements, for example if an issue qualifies as 1278 + regression or not. In such cases raise your concerns on the mailing list and 1279 + ask others for public or private replies how to move on. If that fails, it 1280 + might be appropriate to get a higher authority involved. In case of a WiFi 1281 + driver that would be the wireless maintainers; if there are no higher level 1282 + maintainers or all else fails, it might be one of those rare situations where 1283 + it's okay to get Linus Torvalds involved. 1284 + 1285 + **Proactive testing**: Every time the first pre-release (the 'rc1') of a new 1286 + mainline kernel version gets released, go and check if the issue is fixed there 1287 + or if anything of importance changed. Mention the outcome in the ticket or in a 1288 + mail you sent as reply to your report (make sure it has all those in the CC 1289 + that up to that point participated in the discussion). This will show your 1290 + commitment and that you are willing to help. It also tells developers if the 1291 + issue persists and makes sure they do not forget about it. A few other 1292 + occasional retests (for example with rc3, rc5 and the final) are also a good 1293 + idea, but only report your results if something relevant changed or if you are 1294 + writing something anyway. 1295 + 1296 + With all these general things off the table let's get into the details of how 1297 + to help to get issues resolved once they were reported. 1298 + 1299 + Inquires and testing request 1300 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1301 + 1302 + Here are your duties in case you got replies to your report: 1303 + 1304 + **Check who you deal with**: Most of the time it will be the maintainer or a 1305 + developer of the particular code area that will respond to your report. But as 1306 + issues are normally reported in public it could be anyone that's replying — 1307 + including people that want to help, but in the end might guide you totally off 1308 + track with their questions or requests. That rarely happens, but it's one of 1309 + many reasons why it's wise to quickly run an internet search to see who you're 1310 + interacting with. By doing this you also get aware if your report was heard by 1311 + the right people, as a reminder to the maintainer (see below) might be in order 1312 + later if discussion fades out without leading to a satisfying solution for the 1313 + issue. 1314 + 1315 + **Inquiries for data**: Often you will be asked to test something or provide 1316 + additional details. Try to provide the requested information soon, as you have 1317 + the attention of someone that might help and risk losing it the longer you 1318 + wait; that outcome is even likely if you do not provide the information within 1319 + a few business days. 1320 + 1321 + **Requests for testing**: When you are asked to test a diagnostic patch or a 1322 + possible fix, try to test it in timely manner, too. But do it properly and make 1323 + sure to not rush it: mixing things up can happen easily and can lead to a lot 1324 + of confusion for everyone involved. A common mistake for example is thinking a 1325 + proposed patch with a fix was applied, but in fact wasn't. Things like that 1326 + happen even to experienced testers occasionally, but they most of the time will 1327 + notice when the kernel with the fix behaves just as one without it. 1328 + 1329 + What to do when nothing of substance happens 1330 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1331 + 1332 + Some reports will not get any reaction from the responsible Linux kernel 1333 + developers; or a discussion around the issue evolved, but faded out with 1334 + nothing of substance coming out of it. 1335 + 1336 + In these cases wait two (better: three) weeks before sending a friendly 1337 + reminder: maybe the maintainer was just away from keyboard for a while when 1338 + your report arrived or had something more important to take care of. When 1339 + writing the reminder, kindly ask if anything else from your side is needed to 1340 + get the ball running somehow. If the report got out by mail, do that in the 1341 + first lines of a mail that is a reply to your initial mail (see above) which 1342 + includes a full quote of the original report below: that's on of those few 1343 + situations where such a 'TOFU' (Text Over, Fullquote Under) is the right 1344 + approach, as then all the recipients will have the details at hand immediately 1345 + in the proper order. 1346 + 1347 + After the reminder wait three more weeks for replies. If you still don't get a 1348 + proper reaction, you first should reconsider your approach. Did you maybe try 1349 + to reach out to the wrong people? Was the report maybe offensive or so 1350 + confusing that people decided to completely stay away from it? The best way to 1351 + rule out such factors: show the report to one or two people familiar with FLOSS 1352 + issue reporting and ask for their opinion. Also ask them for their advice how 1353 + to move forward. That might mean: prepare a better report and make those people 1354 + review it before you send it out. Such an approach is totally fine; just 1355 + mention that this is the second and improved report on the issue and include a 1356 + link to the first report. 1357 + 1358 + If the report was proper you can send a second reminder; in it ask for advice 1359 + why the report did not get any replies. A good moment for this second reminder 1360 + mail is shortly after the first pre-release (the 'rc1') of a new Linux kernel 1361 + version got published, as you should retest and provide a status update at that 1362 + point anyway (see above). 1363 + 1364 + If the second reminder again results in no reaction within a week, try to 1365 + contact a higher-level maintainer asking for advice: even busy maintainers by 1366 + then should at least have sent some kind of acknowledgment. 1367 + 1368 + Remember to prepare yourself for a disappointment: maintainers ideally should 1369 + react somehow to every issue report, but they are only obliged to fix those 1370 + 'issues of high priority' outlined earlier. So don't be too devastating if you 1371 + get a reply along the lines of 'thanks for the report, I have more important 1372 + issues to deal with currently and won't have time to look into this for the 1373 + foreseeable future'. 1374 + 1375 + It's also possible that after some discussion in the bug tracker or on a list 1376 + nothing happens anymore and reminders don't help to motivate anyone to work out 1377 + a fix. Such situations can be devastating, but is within the cards when it 1378 + comes to Linux kernel development. This and several other reasons for not 1379 + getting help are explained in 'Why some issues won't get any reaction or remain 1380 + unfixed after being reported' near the end of this document. 1381 + 1382 + Don't get devastated if you don't find any help or if the issue in the end does 1383 + not get solved: the Linux kernel is FLOSS and thus you can still help yourself. 1384 + You for example could try to find others that are affected and team up with 1385 + them to get the issue resolved. Such a team could prepare a fresh report 1386 + together that mentions how many you are and why this is something that in your 1387 + option should get fixed. Maybe together you can also narrow down the root cause 1388 + or the change that introduced a regression, which often makes developing a fix 1389 + easier. And with a bit of luck there might be someone in the team that knows a 1390 + bit about programming and might be able to write a fix. 1391 + 1392 + 1393 + Details about reporting issues only occurring in older kernel version lines 1394 + --------------------------------------------------------------------------- 1395 + 1396 + This subsection provides details for steps you need to take if you could not 1397 + reproduce your issue with a mainline kernel, but want to see it fixed in older 1398 + version lines (aka stable and longterm kernels). 1399 + 1400 + Some fixes are too complex 1401 + ~~~~~~~~~~~~~~~~~~~~~~~~~~ 1402 + 1403 + *Prepare yourself for the possibility that going through the next few steps 1404 + might not get the issue solved in older releases: the fix might be too big 1405 + or risky to get backported there.* 1406 + 1407 + Even small and seemingly obvious code-changes sometimes introduce new and 1408 + totally unexpected problems. The maintainers of the stable and longterm kernels 1409 + are very aware of that and thus only apply changes to these kernels that are 1410 + within rules outlined in 'Documentation/process/stable-kernel-rules.rst'. 1411 + 1412 + Complex or risky changes for example do not qualify and thus only get applied 1413 + to mainline. Other fixes are easy to get backported to the newest stable and 1414 + longterm kernels, but too risky to integrate into older ones. So be aware the 1415 + fix you are hoping for might be one of those that won't be backported to the 1416 + version line your care about. In that case you'll have no other choice then to 1417 + live with the issue or switch to a newer Linux version, unless you want to 1418 + patch the fix into your kernels yourself. 1419 + 1420 + Make sure the particular version line still gets support 1421 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1422 + 1423 + *Check if the kernel developers still maintain the Linux kernel version 1424 + line you care about: go to the front page of kernel.org and make sure it 1425 + mentions the latest release of the particular version line without an 1426 + '[EOL]' tag.* 1427 + 1428 + Most kernel version lines only get supported for about three months, as 1429 + maintaining them longer is quite a lot of work. Hence, only one per year is 1430 + chosen and gets supported for at least two years (often six). That's why you 1431 + need to check if the kernel developers still support the version line you care 1432 + for. 1433 + 1434 + Note, if kernel.org lists two 'stable' version lines on the front page, you 1435 + should consider switching to the newer one and forget about the older one: 1436 + support for it is likely to be abandoned soon. Then it will get a "end-of-life" 1437 + (EOL) stamp. Version lines that reached that point still get mentioned on the 1438 + kernel.org front page for a week or two, but are unsuitable for testing and 1439 + reporting. 1440 + 1441 + Search stable mailing list 1442 + ~~~~~~~~~~~~~~~~~~~~~~~~~~ 1443 + 1444 + *Check the archives of the Linux stable mailing list for existing reports.* 1445 + 1446 + Maybe the issue you face is already known and was fixed or is about to. Hence, 1447 + `search the archives of the Linux stable mailing list 1448 + <https://lore.kernel.org/stable/>`_ for reports about an issue like yours. If 1449 + you find any matches, consider joining the discussion, unless the fix is 1450 + already finished and scheduled to get applied soon. 1451 + 1452 + Reproduce issue with the newest release 1453 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1454 + 1455 + *Install the latest release from the particular version line as a vanilla 1456 + kernel. Ensure this kernel is not tainted and still shows the problem, as 1457 + the issue might have already been fixed there.* 1458 + 1459 + Before investing any more time in this process you want to check if the issue 1460 + was already fixed in the latest release of version line you're interested in. 1461 + This kernel needs to be vanilla and shouldn't be tainted before the issue 1462 + happens, as detailed outlined already above in the process of testing mainline. 1463 + 1464 + Check code history and search for existing discussions 1465 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1466 + 1467 + *Search the Linux kernel version control system for the change that fixed 1468 + the issue in mainline, as its commit message might tell you if the fix is 1469 + scheduled for backporting already. If you don't find anything that way, 1470 + search the appropriate mailing lists for posts that discuss such an issue 1471 + or peer-review possible fixes; then check the discussions if the fix was 1472 + deemed unsuitable for backporting. If backporting was not considered at 1473 + all, join the newest discussion, asking if it's in the cards.* 1474 + 1475 + In a lot of cases the issue you deal with will have happened with mainline, but 1476 + got fixed there. The commit that fixed it would need to get backported as well 1477 + to get the issue solved. That's why you want to search for it or any 1478 + discussions abound it. 1479 + 1480 + * First try to find the fix in the Git repository that holds the Linux kernel 1481 + sources. You can do this with the web interfaces `on kernel.org 1482 + <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/>`_ 1483 + or its mirror `on GitHub <https://github.com/torvalds/linux>`_; if you have 1484 + a local clone you alternatively can search on the command line with ``git 1485 + log --grep=<pattern>``. 1486 + 1487 + If you find the fix, look if the commit message near the end contains a 1488 + 'stable tag' that looks like this: 1489 + 1490 + Cc: <stable@vger.kernel.org> # 5.4+ 1491 + 1492 + If that's case the developer marked the fix safe for backporting to version 1493 + line 5.4 and later. Most of the time it's getting applied there within two 1494 + weeks, but sometimes it takes a bit longer. 1495 + 1496 + * If the commit doesn't tell you anything or if you can't find the fix, look 1497 + again for discussions about the issue. Search the net with your favorite 1498 + internet search engine as well as the archives for the `Linux kernel 1499 + developers mailing list <https://lore.kernel.org/lkml/>`_. Also read the 1500 + section `Locate kernel area that causes the issue` above and follow the 1501 + instructions to find the subsystem in question: its bug tracker or mailing 1502 + list archive might have the answer you are looking for. 1503 + 1504 + * If you see a proposed fix, search for it in the version control system as 1505 + outlined above, as the commit might tell you if a backport can be expected. 1506 + 1507 + * Check the discussions for any indicators the fix might be too risky to get 1508 + backported to the version line you care about. If that's the case you have 1509 + to live with the issue or switch to the kernel version line where the fix 1510 + got applied. 1511 + 1512 + * If the fix doesn't contain a stable tag and backporting was not discussed, 1513 + join the discussion: mention the version where you face the issue and that 1514 + you would like to see it fixed, if suitable. 1515 + 1516 + Check if it's a regression specific to stable or longterm kernels 1517 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1518 + 1519 + *Check if you're dealing with a regression that was never present in 1520 + mainline by installing the first release of the version line you care 1521 + about. If the issue doesn't show up with it, you basically need to report 1522 + the issue with this version like you would report a problem with mainline 1523 + (see above). This ideally includes a bisection followed by a search for 1524 + existing reports on the net; with the help of the subject and the two 1525 + relevant commit-ids. If that doesn't turn up anything, write the report; CC 1526 + or forward the report to the stable maintainers, the stable mailing list, 1527 + and those who authored the change. Include the shortened commit-id if you 1528 + found the change that causes it.* 1529 + 1530 + Sometimes you won't find anything in the previous step: the issue you face 1531 + might have never occurred in mainline, as it is caused by some change that is 1532 + incomplete or not correctly applied. To check this, install the first release 1533 + from version line you care about, e.g., if you care about 5.4.x, install 5.4. 1534 + 1535 + If the issue doesn't show itself there, it's a regression specific to the 1536 + particular version line. In that case you need to report it like an issue 1537 + happening in mainline, like the last few steps in the main section in the above 1538 + outline. 1539 + 1540 + One of them suggests doing a bisection, which you are strongly advised to do in 1541 + this case. After finding the culprit, search the net for existing reports 1542 + again: not only search for the exact subject and the commit-id (proper and 1543 + shortened to twelve characters) of the change, but also for the commit-id 1544 + (proper and shortened) mentioned as 'Upstream commit' in the commit message. 1545 + 1546 + Write the report; just keep a few specialties in mind: CC or forward the report 1547 + to the stable maintainers, the stable mailing list, which the :ref:`MAINTAINERS 1548 + <maintainers>` file mentions in the section "STABLE BRANCH". If you performed a 1549 + successful bisection, CC the author of the change and include its subject and 1550 + the shortened commit-id. 1551 + 1552 + Ask for advice 1553 + ~~~~~~~~~~~~~~ 1554 + 1555 + *One of the former steps should lead to a solution. If that doesn't work 1556 + out, ask the maintainers for the subsystem that seems to be causing the 1557 + issue for advice; CC the mailing list for the particular subsystem as well 1558 + as the stable mailing list.* 1559 + 1560 + If the previous three steps didn't get you closer to a solution there is only 1561 + one option left: ask for advice. Do that in a mail you sent to the maintainers 1562 + for the subsystem where the issue seems to have its roots; CC the mailing list 1563 + for the subsystem as well as the stable mailing list the :ref:`MAINTAINERS 1564 + <maintainers>` file mention in the section "STABLE BRANCH". 1565 + 1566 + 1567 + Why some issues won't get any reaction or remain unfixed after being reported 1568 + ============================================================================= 1569 + 1570 + When reporting a problem to the Linux developers, be aware only 'issues of high 1571 + priority' (regressions, security issues, severe problems) are definitely going 1572 + to get resolved. The maintainers or if all else fails Linus Torvalds himself 1573 + will make sure of that. They and the other kernel developers will fix a lot of 1574 + other issues as well. But be aware that sometimes they can't or won't help; and 1575 + sometimes there isn't even anyone to send a report to. 1576 + 1577 + This is best explained with kernel developers that contribute to the Linux 1578 + kernel in their spare time. Quite a few of the drivers in the kernel were 1579 + written by such programmers, often because they simply wanted to make their 1580 + hardware usable on their favorite operating system. 1581 + 1582 + These programmers most of the time will happily fix problems other people 1583 + report. But nobody can force them to do, as they are contributing voluntarily. 1584 + 1585 + Then there are situations where such developers really want to fix an issue, 1586 + but can't: sometimes they lack hardware programming documentation to do so. 1587 + This often happens when the publicly available docs are superficial or the 1588 + driver was written with the help of reverse engineering. 1589 + 1590 + Sooner or later spare time developers will also stop caring for the driver. 1591 + Maybe their test hardware broke, got replaced by something more fancy, or is so 1592 + old that it's something you don't find much outside of computer museums 1593 + anymore. Sometimes developer stops caring for their code and Linux at all, as 1594 + something different in their life became way more important. In some cases 1595 + nobody is willing to take over the job as maintainer – and nobody can be forced 1596 + to, as contributing to the Linux kernel is done on a voluntary basis. Abandoned 1597 + drivers nevertheless remain in the kernel: they are still useful for people and 1598 + removing would be a regression. 1599 + 1600 + The situation is not that different with developers that are paid for their 1601 + work on the Linux kernel. Those contribute most changes these days. But their 1602 + employers sooner or later also stop caring for their code or make its 1603 + programmer focus on other things. Hardware vendors for example earn their money 1604 + mainly by selling new hardware; quite a few of them hence are not investing 1605 + much time and energy in maintaining a Linux kernel driver for something they 1606 + stopped selling years ago. Enterprise Linux distributors often care for a 1607 + longer time period, but in new versions often leave support for old and rare 1608 + hardware aside to limit the scope. Often spare time contributors take over once 1609 + a company orphans some code, but as mentioned above: sooner or later they will 1610 + leave the code behind, too. 1611 + 1612 + Priorities are another reason why some issues are not fixed, as maintainers 1613 + quite often are forced to set those, as time to work on Linux is limited. 1614 + That's true for spare time or the time employers grant their developers to 1615 + spend on maintenance work on the upstream kernel. Sometimes maintainers also 1616 + get overwhelmed with reports, even if a driver is working nearly perfectly. To 1617 + not get completely stuck, the programmer thus might have no other choice than 1618 + to prioritize issue reports and reject some of them. 1619 + 1620 + But don't worry too much about all of this, a lot of drivers have active 1621 + maintainers who are quite interested in fixing as many issues as possible. 1622 + 1623 + 1624 + Closing words 1625 + ============= 1626 + 1627 + Compared with other Free/Libre & Open Source Software it's hard to report 1628 + issues to the Linux kernel developers: the length and complexity of this 1629 + document and the implications between the lines illustrate that. But that's how 1630 + it is for now. The main author of this text hopes documenting the state of the 1631 + art will lay some groundwork to improve the situation over time.
+1 -1
Documentation/admin-guide/security-bugs.rst
··· 21 21 22 22 As it is with any bug, the more information provided the easier it 23 23 will be to diagnose and fix. Please review the procedure outlined in 24 - :doc:`reporting-bugs` if you are unclear about what 24 + 'Documentation/admin-guide/reporting-issues.rst' if you are unclear about what 25 25 information is helpful. Any exploit code is very helpful and will not 26 26 be released without consent from the reporter unless it has already been 27 27 made public.
+1 -1
Documentation/admin-guide/sysctl/abi.rst
··· 28 28 29 29 Determines whether the kernels maps a vDSO page into 32-bit processes; 30 30 can be set to 1 to enable, or 0 to disable. Defaults to enabled if 31 - ``CONFIG_COMPAT_VDSO`` is set, disabled otherwide. 31 + ``CONFIG_COMPAT_VDSO`` is set, disabled otherwise. 32 32 33 33 This controls the same setting as the ``vdso32`` kernel boot 34 34 parameter.
+9 -9
Documentation/admin-guide/sysctl/kernel.rst
··· 14 14 ------------------------------------------------------------------------------ 15 15 16 16 This file contains documentation for the sysctl files in 17 - ``/proc/sys/kernel/`` and is valid for Linux kernel version 2.2. 17 + ``/proc/sys/kernel/``. 18 18 19 19 The files in this directory can be used to tune and monitor 20 20 miscellaneous and general things in the operation of the Linux ··· 879 879 perf_event_mlock_kb 880 880 =================== 881 881 882 - Control size of per-cpu ring buffer not counted agains mlock limit. 882 + Control size of per-cpu ring buffer not counted against mlock limit. 883 883 884 884 The default value is 512 + 1 page 885 885 ··· 1095 1095 incurs a small amount of overhead in the scheduler but is 1096 1096 useful for debugging and performance tuning. 1097 1097 1098 - sched_util_clamp_min: 1099 - ===================== 1098 + sched_util_clamp_min 1099 + ==================== 1100 1100 1101 1101 Max allowed *minimum* utilization. 1102 1102 ··· 1106 1106 sched_util_clamp_min, i.e., it is restricted to the range 1107 1107 [0:sched_util_clamp_min]. 1108 1108 1109 - sched_util_clamp_max: 1110 - ===================== 1109 + sched_util_clamp_max 1110 + ==================== 1111 1111 1112 1112 Max allowed *maximum* utilization. 1113 1113 ··· 1117 1117 sched_util_clamp_max, i.e., it is restricted to the range 1118 1118 [0:sched_util_clamp_max]. 1119 1119 1120 - sched_util_clamp_min_rt_default: 1121 - ================================ 1120 + sched_util_clamp_min_rt_default 1121 + =============================== 1122 1122 1123 1123 By default Linux is tuned for performance. Which means that RT tasks always run 1124 1124 at the highest frequency and most capable (highest capacity) CPU (in ··· 1336 1336 ====== ===== ============================================================== 1337 1337 1 `(P)` proprietary module was loaded 1338 1338 2 `(F)` module was force loaded 1339 - 4 `(S)` SMP kernel oops on an officially SMP incapable processor 1339 + 4 `(S)` kernel running on an out of specification system 1340 1340 8 `(R)` module was force unloaded 1341 1341 16 `(M)` processor reported a Machine Check Exception (MCE) 1342 1342 32 `(B)` bad page referenced or some unexpected page flags
+1 -1
Documentation/admin-guide/sysctl/vm.rst
··· 146 146 acceptable trade for large contiguous free memory. Set to 0 to prevent 147 147 compaction from moving pages that are unevictable. Default value is 1. 148 148 On CONFIG_PREEMPT_RT the default value is 0 in order to avoid a page fault, due 149 - to compaction, which would block the task from becomming active until the fault 149 + to compaction, which would block the task from becoming active until the fault 150 150 is resolved. 151 151 152 152
+18 -5
Documentation/admin-guide/tainted-kernels.rst
··· 84 84 === === ====== ======================================================== 85 85 0 G/P 1 proprietary module was loaded 86 86 1 _/F 2 module was force loaded 87 - 2 _/S 4 SMP kernel oops on an officially SMP incapable processor 87 + 2 _/S 4 kernel running on an out of specification system 88 88 3 _/R 8 module was force unloaded 89 89 4 _/M 16 processor reported a Machine Check Exception (MCE) 90 90 5 _/B 32 bad page referenced or some unexpected page flags ··· 116 116 1) ``F`` if any module was force loaded by ``insmod -f``, ``' '`` if all 117 117 modules were loaded normally. 118 118 119 - 2) ``S`` if the oops occurred on an SMP kernel running on hardware that 120 - hasn't been certified as safe to run multiprocessor. 121 - Currently this occurs only on various Athlons that are not 122 - SMP capable. 119 + 2) ``S`` if the kernel is running on a processor or system that is out of 120 + specification: hardware has been put into an unsupported configuration, 121 + therefore proper execution cannot be guaranteed. 122 + Kernel will be tainted if, for example: 123 + 124 + - on x86: PAE is forced through forcepae on intel CPUs (such as Pentium M) 125 + which do not report PAE but may have a functional implementation, an SMP 126 + kernel is running on non officially capable SMP Athlon CPUs, MSRs are 127 + being poked at from userspace. 128 + - on arm: kernel running on certain CPUs (such as Keystone 2) without 129 + having certain kernel features enabled. 130 + - on arm64: there are mismatched hardware features between CPUs, the 131 + bootloader has booted CPUs in different modes. 132 + - certain drivers are being used on non supported architectures (such as 133 + scsi/snic on something else than x86_64, scsi/ips on non 134 + x86/x86_64/itanium, have broken firmware settings for the 135 + irqchip/irq-gic on arm64 ...). 123 136 124 137 3) ``R`` if a module was force unloaded by ``rmmod -f``, ``' '`` if all 125 138 modules were unloaded normally.
+3
Documentation/arm/features.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 2 + 3 + .. kernel-feat:: $srctree/Documentation/features arm
+2
Documentation/arm/index.rst
··· 23 23 vlocks 24 24 porting 25 25 26 + features 27 + 26 28 SoC-specific documents 27 29 ====================== 28 30
+10
Documentation/arm/sunxi.rst
··· 158 158 * User Manual 159 159 160 160 https://linux-sunxi.org/images/4/46/Allwinner_H6_V200_User_Manual_V1.1.pdf 161 + 162 + - Allwinner H616 163 + 164 + * Datasheet 165 + 166 + https://linux-sunxi.org/images/b/b9/H616_Datasheet_V1.0_cleaned.pdf 167 + 168 + * User Manual 169 + 170 + https://linux-sunxi.org/images/2/24/H616_User_Manual_V1.0_cleaned.pdf
+2
Documentation/arm64/elf_hwcaps.rst
··· 1 + .. _elf_hwcaps_index: 2 + 1 3 ================ 2 4 ARM64 ELF hwcaps 3 5 ================
+3
Documentation/arm64/features.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 2 + 3 + .. kernel-feat:: $srctree/Documentation/features arm64
+2
Documentation/arm64/index.rst
··· 24 24 tagged-address-abi 25 25 tagged-pointers 26 26 27 + features 28 + 27 29 .. only:: subproject and html 28 30 29 31 Indices
+2
Documentation/arm64/perf.rst
··· 1 1 .. SPDX-License-Identifier: GPL-2.0 2 2 3 + .. _perf_index: 4 + 3 5 ===================== 4 6 Perf Event Attributes 5 7 =====================
+4 -1
Documentation/conf.py
··· 39 39 extensions = ['kerneldoc', 'rstFlatTable', 'kernel_include', 40 40 'kfigure', 'sphinx.ext.ifconfig', 'automarkup', 41 41 'maintainers_include', 'sphinx.ext.autosectionlabel', 42 - 'kernel_abi'] 42 + 'kernel_abi', 'kernel_feat'] 43 43 44 44 # 45 45 # cdomain is badly broken in Sphinx 3+. Leaving it out generates *most* ··· 112 112 113 113 else: 114 114 extensions.append('cdomain') 115 + if major == 1 and minor < 7: 116 + sys.stderr.write('WARNING: Sphinx 1.7 or greater will be required as of ' 117 + 'the 5.12 release\n') 115 118 116 119 # Ensure that autosectionlabel will produce unique names 117 120 autosectionlabel_prefix_document = True
+3 -1
Documentation/core-api/printk-formats.rst
··· 531 531 %*pb outputs the bitmap with field width as the number of bits and %*pbl 532 532 output the bitmap as range list with field width as the number of bits. 533 533 534 - Passed by reference. 534 + The field width is passed by value, the bitmap is passed by reference. 535 + Helper macros cpumask_pr_args() and nodemask_pr_args() are available to ease 536 + printing cpumask and nodemask. 535 537 536 538 Flags bitfields such as page flags, gfp_flags 537 539 ---------------------------------------------
+8 -1
Documentation/dev-tools/coccinelle.rst
··· 224 224 225 225 rm -f err.log 226 226 export COCCI=scripts/coccinelle/misc/irqf_oneshot.cocci 227 - make coccicheck DEBUG_FILE="err.log" MODE=report SPFLAGS="--profile --show-trying" M=./drivers/mfd/arizona-irq.c 227 + make coccicheck DEBUG_FILE="err.log" MODE=report SPFLAGS="--profile --show-trying" M=./drivers/mfd 228 228 229 229 err.log will now have the profiling information, while stdout will 230 230 provide some progress information as Coccinelle moves forward with 231 231 work. 232 232 233 + NOTE: 234 + 233 235 DEBUG_FILE support is only supported when using coccinelle >= 1.0.2. 236 + 237 + Currently, DEBUG_FILE support is only available to check folders, and 238 + not single files. This is because checking a single file requires spatch 239 + to be called twice leading to DEBUG_FILE being set both times to the same value, 240 + giving rise to an error. 234 241 235 242 .cocciconfig support 236 243 --------------------
+2 -2
Documentation/dev-tools/kasan.rst
··· 330 330 ~~~~~~~~~~~~~ 331 331 332 332 With ``CONFIG_KUNIT`` built-in, ``CONFIG_KASAN_KUNIT_TEST`` can be built-in 333 - on any architecure that supports KASAN. These and any other KUnit 333 + on any architecture that supports KASAN. These and any other KUnit 334 334 tests enabled will run and print the results at boot as a late-init 335 335 call. 336 336 ··· 351 351 ``CONFIG_KASAN`` built-in. The type of error expected and the 352 352 function being run is printed before the expression expected to give 353 353 an error. Then the error is printed, if found, and that test 354 - should be interpretted to pass only if the error was the one expected 354 + should be interpreted to pass only if the error was the one expected 355 355 by the test.
+1 -1
Documentation/dev-tools/kcov.rst
··· 243 243 currently reserved and must be zero. In the future the number of bytes 244 244 used for the subsystem or handle ids might be increased. 245 245 246 - When a particular userspace proccess collects coverage via a common 246 + When a particular userspace process collects coverage via a common 247 247 handle, kcov will collect coverage for each code section that is annotated 248 248 to use the common handle obtained as kcov_handle from the current 249 249 task_struct. However non common handles allow to collect coverage
+3 -4
Documentation/dev-tools/kgdb.rst
··· 63 63 It is advised, but not required, that you turn on the 64 64 ``CONFIG_FRAME_POINTER`` kernel option which is called :menuselection:`Compile 65 65 the kernel with frame pointers` in the config menu. This option inserts code 66 - to into the compiled executable which saves the frame information in 67 - registers or on the stack at different points which allows a debugger 68 - such as gdb to more accurately construct stack back traces while 69 - debugging the kernel. 66 + into the compiled executable which saves the frame information in registers 67 + or on the stack at different points which allows a debugger such as gdb to 68 + more accurately construct stack back traces while debugging the kernel. 70 69 71 70 If the architecture that you are using supports the kernel option 72 71 ``CONFIG_STRICT_KERNEL_RWX``, you should consider turning it off. This
+2 -1
Documentation/devicetree/bindings/submitting-patches.rst
··· 25 25 26 26 make dt_binding_check 27 27 28 - See ../writing-schema.rst for more details about schema and tools setup. 28 + See Documentation/devicetree/writing-schema.rst for more details about 29 + schema and tools setup. 29 30 30 31 3) DT binding files should be dual licensed. The preferred license tag is 31 32 (GPL-2.0-only OR BSD-2-Clause).
+3 -3
Documentation/doc-guide/kernel-doc.rst
··· 247 247 struct { 248 248 int memb1; 249 249 int memb2; 250 - } 250 + }; 251 251 struct { 252 252 void *memb3; 253 253 int memb4; 254 - } 255 - } 254 + }; 255 + }; 256 256 union { 257 257 struct { 258 258 int memb1;
+1 -1
Documentation/doc-guide/sphinx.rst
··· 375 375 376 376 SVG image example 377 377 378 - The kernel figure (and image) directive support **DOT** formated files, see 378 + The kernel figure (and image) directive support **DOT** formatted files, see 379 379 380 380 * DOT: http://graphviz.org/pdf/dotguide.pdf 381 381 * Graphviz: http://www.graphviz.org/content/dot-language
+1
Documentation/driver-api/index.rst
··· 29 29 infiniband 30 30 frame-buffer 31 31 regulator 32 + reset 32 33 iio/index 33 34 input 34 35 usb/index
+2 -2
Documentation/driver-api/mtd/intel-spi.rst
··· 52 52 16384+0 records out 53 53 8388608 bytes (8.4 MB) copied, 10.0269 s, 837 kB/s 54 54 55 - 6) Verify the backup: 55 + 6) Verify the backup:: 56 56 57 57 # sha1sum /dev/mtd0ro bios.bak 58 58 fdbb011920572ca6c991377c4b418a0502668b73 /dev/mtd0ro ··· 66 66 # flash_erase /dev/mtd0 0 0 67 67 Erasing 4 Kibyte @ 7ff000 -- 100 % complete 68 68 69 - 8) Once completed without errors you can write the new BIOS image: 69 + 8) Once completed without errors you can write the new BIOS image:: 70 70 71 71 # dd if=MNW2MAX1.X64.0092.R01.1605221712.bin of=/dev/mtd0 72 72
+4 -2
Documentation/driver-api/mtd/spi-nor.rst
··· 34 34 ------------------------ 35 35 SPI NOR chip 36 36 37 - After this framework, the layer is like: 37 + After this framework, the layer is like:: 38 + 38 39 MTD 39 40 ------------------------ 40 41 SPI NOR framework ··· 46 45 ------------------------ 47 46 SPI NOR chip 48 47 49 - With the SPI NOR controller driver (Freescale QuadSPI), it looks like: 48 + With the SPI NOR controller driver (Freescale QuadSPI), it looks like:: 49 + 50 50 MTD 51 51 ------------------------ 52 52 SPI NOR framework
+221
Documentation/driver-api/reset.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0-only 2 + 3 + ==================== 4 + Reset controller API 5 + ==================== 6 + 7 + Introduction 8 + ============ 9 + 10 + Reset controllers are central units that control the reset signals to multiple 11 + peripherals. 12 + The reset controller API is split into two parts: 13 + the `consumer driver interface <#consumer-driver-interface>`__ (`API reference 14 + <#reset-consumer-api>`__), which allows peripheral drivers to request control 15 + over their reset input signals, and the `reset controller driver interface 16 + <#reset-controller-driver-interface>`__ (`API reference 17 + <#reset-controller-driver-api>`__), which is used by drivers for reset 18 + controller devices to register their reset controls to provide them to the 19 + consumers. 20 + 21 + While some reset controller hardware units also implement system restart 22 + functionality, restart handlers are out of scope for the reset controller API. 23 + 24 + Glossary 25 + -------- 26 + 27 + The reset controller API uses these terms with a specific meaning: 28 + 29 + Reset line 30 + 31 + Physical reset line carrying a reset signal from a reset controller 32 + hardware unit to a peripheral module. 33 + 34 + Reset control 35 + 36 + Control method that determines the state of one or multiple reset lines. 37 + Most commonly this is a single bit in reset controller register space that 38 + either allows direct control over the physical state of the reset line, or 39 + is self-clearing and can be used to trigger a predetermined pulse on the 40 + reset line. 41 + In more complicated reset controls, a single trigger action can launch a 42 + carefully timed sequence of pulses on multiple reset lines. 43 + 44 + Reset controller 45 + 46 + A hardware module that provides a number of reset controls to control a 47 + number of reset lines. 48 + 49 + Reset consumer 50 + 51 + Peripheral module or external IC that is put into reset by the signal on a 52 + reset line. 53 + 54 + Consumer driver interface 55 + ========================= 56 + 57 + This interface provides an API that is similar to the kernel clock framework. 58 + Consumer drivers use get and put operations to acquire and release reset 59 + controls. 60 + Functions are provided to assert and deassert the controlled reset lines, 61 + trigger reset pulses, or to query reset line status. 62 + 63 + When requesting reset controls, consumers can use symbolic names for their 64 + reset inputs, which are mapped to an actual reset control on an existing reset 65 + controller device by the core. 66 + 67 + A stub version of this API is provided when the reset controller framework is 68 + not in use in order to minimize the need to use ifdefs. 69 + 70 + Shared and exclusive resets 71 + --------------------------- 72 + 73 + The reset controller API provides either reference counted deassertion and 74 + assertion or direct, exclusive control. 75 + The distinction between shared and exclusive reset controls is made at the time 76 + the reset control is requested, either via devm_reset_control_get_shared() or 77 + via devm_reset_control_get_exclusive(). 78 + This choice determines the behavior of the API calls made with the reset 79 + control. 80 + 81 + Shared resets behave similarly to clocks in the kernel clock framework. 82 + They provide reference counted deassertion, where only the first deassert, 83 + which increments the deassertion reference count to one, and the last assert 84 + which decrements the deassertion reference count back to zero, have a physical 85 + effect on the reset line. 86 + 87 + Exclusive resets on the other hand guarantee direct control. 88 + That is, an assert causes the reset line to be asserted immediately, and a 89 + deassert causes the reset line to be deasserted immediately. 90 + 91 + Assertion and deassertion 92 + ------------------------- 93 + 94 + Consumer drivers use the reset_control_assert() and reset_control_deassert() 95 + functions to assert and deassert reset lines. 96 + For shared reset controls, calls to the two functions must be balanced. 97 + 98 + Note that since multiple consumers may be using a shared reset control, there 99 + is no guarantee that calling reset_control_assert() on a shared reset control 100 + will actually cause the reset line to be asserted. 101 + Consumer drivers using shared reset controls should assume that the reset line 102 + may be kept deasserted at all times. 103 + The API only guarantees that the reset line can not be asserted as long as any 104 + consumer has requested it to be deasserted. 105 + 106 + Triggering 107 + ---------- 108 + 109 + Consumer drivers use reset_control_reset() to trigger a reset pulse on a 110 + self-deasserting reset control. 111 + In general, these resets can not be shared between multiple consumers, since 112 + requesting a pulse from any consumer driver will reset all connected 113 + peripherals. 114 + 115 + The reset controller API allows requesting self-deasserting reset controls as 116 + shared, but for those only the first trigger request causes an actual pulse to 117 + be issued on the reset line. 118 + All further calls to this function have no effect until all consumers have 119 + called reset_control_rearm(). 120 + For shared reset controls, calls to the two functions must be balanced. 121 + This allows devices that only require an initial reset at any point before the 122 + driver is probed or resumed to share a pulsed reset line. 123 + 124 + Querying 125 + -------- 126 + 127 + Only some reset controllers support querying the current status of a reset 128 + line, via reset_control_status(). 129 + If supported, this function returns a positive non-zero value if the given 130 + reset line is asserted. 131 + The reset_control_status() function does not accept a 132 + `reset control array <#reset-control-arrays>`__ handle as its input parameter. 133 + 134 + Optional resets 135 + --------------- 136 + 137 + Often peripherals require a reset line on some platforms but not on others. 138 + For this, reset controls can be requested as optional using 139 + devm_reset_control_get_optional_exclusive() or 140 + devm_reset_control_get_optional_shared(). 141 + These functions return a NULL pointer instead of an error when the requested 142 + reset control is not specified in the device tree. 143 + Passing a NULL pointer to the reset_control functions causes them to return 144 + quietly without an error. 145 + 146 + Reset control arrays 147 + -------------------- 148 + 149 + Some drivers need to assert a bunch of reset lines in no particular order. 150 + devm_reset_control_array_get() returns an opaque reset control handle that can 151 + be used to assert, deassert, or trigger all specified reset controls at once. 152 + The reset control API does not guarantee the order in which the individual 153 + controls therein are handled. 154 + 155 + Reset controller driver interface 156 + ================================= 157 + 158 + Drivers for reset controller modules provide the functionality necessary to 159 + assert or deassert reset signals, to trigger a reset pulse on a reset line, or 160 + to query its current state. 161 + All functions are optional. 162 + 163 + Initialization 164 + -------------- 165 + 166 + Drivers fill a struct :c:type:`reset_controller_dev` and register it with 167 + reset_controller_register() in their probe function. 168 + The actual functionality is implemented in callback functions via a struct 169 + :c:type:`reset_control_ops`. 170 + 171 + API reference 172 + ============= 173 + 174 + The reset controller API is documented here in two parts: 175 + the `reset consumer API <#reset-consumer-api>`__ and the `reset controller 176 + driver API <#reset-controller-driver-api>`__. 177 + 178 + Reset consumer API 179 + ------------------ 180 + 181 + Reset consumers can control a reset line using an opaque reset control handle, 182 + which can be obtained from devm_reset_control_get_exclusive() or 183 + devm_reset_control_get_shared(). 184 + Given the reset control, consumers can call reset_control_assert() and 185 + reset_control_deassert(), trigger a reset pulse using reset_control_reset(), or 186 + query the reset line status using reset_control_status(). 187 + 188 + .. kernel-doc:: include/linux/reset.h 189 + :internal: 190 + 191 + .. kernel-doc:: drivers/reset/core.c 192 + :functions: reset_control_reset 193 + reset_control_assert 194 + reset_control_deassert 195 + reset_control_status 196 + reset_control_acquire 197 + reset_control_release 198 + reset_control_rearm 199 + reset_control_put 200 + of_reset_control_get_count 201 + of_reset_control_array_get 202 + devm_reset_control_array_get 203 + reset_control_get_count 204 + 205 + Reset controller driver API 206 + --------------------------- 207 + 208 + Reset controller drivers are supposed to implement the necessary functions in 209 + a static constant structure :c:type:`reset_control_ops`, allocate and fill out 210 + a struct :c:type:`reset_controller_dev`, and register it using 211 + devm_reset_controller_register(). 212 + 213 + .. kernel-doc:: include/linux/reset-controller.h 214 + :internal: 215 + 216 + .. kernel-doc:: drivers/reset/core.c 217 + :functions: of_reset_simple_xlate 218 + reset_controller_register 219 + reset_controller_unregister 220 + devm_reset_controller_register 221 + reset_controller_add_lookup
+2 -15
Documentation/features/list-arch.sh
··· 1 + # SPDX-License-Identifier: GPL-2.0 1 2 # 2 3 # Small script that visualizes the kernel feature support status 3 4 # of an architecture. ··· 8 7 9 8 ARCH=${1:-$(uname -m | sed 's/x86_64/x86/' | sed 's/i386/x86/')} 10 9 11 - cd $(dirname $0) 12 - echo "#" 13 - echo "# Kernel feature support matrix of the '$ARCH' architecture:" 14 - echo "#" 15 - 16 - for F in */*/arch-support.txt; do 17 - SUBSYS=$(echo $F | cut -d/ -f1) 18 - N=$(grep -h "^# Feature name:" $F | cut -c25-) 19 - C=$(grep -h "^# Kconfig:" $F | cut -c25-) 20 - D=$(grep -h "^# description:" $F | cut -c25-) 21 - S=$(grep -hv "^#" $F | grep -w $ARCH | cut -d\| -f3) 22 - 23 - printf "%10s/%-22s:%s| %35s # %s\n" "$SUBSYS" "$N" "$S" "$C" "$D" 24 - done 25 - 10 + $(dirname $0)/../../scripts/get_feat.pl list --arch $ARCH
+1 -1
Documentation/features/locking/queued-rwlocks/arch-support.txt
··· 22 22 | nios2: | TODO | 23 23 | openrisc: | ok | 24 24 | parisc: | TODO | 25 - | powerpc: | TODO | 25 + | powerpc: | ok | 26 26 | riscv: | TODO | 27 27 | s390: | TODO | 28 28 | sh: | TODO |
+1 -1
Documentation/features/locking/queued-spinlocks/arch-support.txt
··· 22 22 | nios2: | TODO | 23 23 | openrisc: | ok | 24 24 | parisc: | TODO | 25 - | powerpc: | TODO | 25 + | powerpc: | ok | 26 26 | riscv: | TODO | 27 27 | s390: | TODO | 28 28 | sh: | TODO |
+2 -2
Documentation/features/seccomp/seccomp-filter/arch-support.txt
··· 11 11 | arm: | ok | 12 12 | arm64: | ok | 13 13 | c6x: | TODO | 14 - | csky: | TODO | 14 + | csky: | ok | 15 15 | h8300: | TODO | 16 16 | hexagon: | TODO | 17 17 | ia64: | TODO | ··· 25 25 | powerpc: | ok | 26 26 | riscv: | ok | 27 27 | s390: | ok | 28 - | sh: | TODO | 28 + | sh: | ok | 29 29 | sparc: | TODO | 30 30 | um: | ok | 31 31 | x86: | ok |
+1 -1
Documentation/features/time/context-tracking/arch-support.txt
··· 11 11 | arm: | ok | 12 12 | arm64: | ok | 13 13 | c6x: | TODO | 14 - | csky: | TODO | 14 + | csky: | ok | 15 15 | h8300: | TODO | 16 16 | hexagon: | TODO | 17 17 | ia64: | TODO |
+1 -1
Documentation/features/time/virt-cpuacct/arch-support.txt
··· 11 11 | arm: | ok | 12 12 | arm64: | ok | 13 13 | c6x: | TODO | 14 - | csky: | TODO | 14 + | csky: | ok | 15 15 | h8300: | TODO | 16 16 | hexagon: | TODO | 17 17 | ia64: | ok |
+1 -1
Documentation/filesystems/index.rst
··· 113 113 sysv-fs 114 114 tmpfs 115 115 ubifs 116 - ubifs-authentication.rst 116 + ubifs-authentication 117 117 udf 118 118 virtiofs 119 119 vfat
+2 -2
Documentation/filesystems/mount_api.rst
··· 774 774 should just be set to lie inside the low-to-high range. 775 775 776 776 If all is good, true is returned. If the table is invalid, errors are 777 - logged to dmesg and false is returned. 777 + logged to the kernel log buffer and false is returned. 778 778 779 779 * :: 780 780 ··· 782 782 783 783 This performs some validation checks on a parameter description. It 784 784 returns true if the description is good and false if it is not. It will 785 - log errors to dmesg if validation fails. 785 + log errors to the kernel log buffer if validation fails. 786 786 787 787 * :: 788 788
+1
Documentation/filesystems/proc.rst
··· 546 546 nh no huge page advise flag 547 547 mg mergable advise flag 548 548 bt arm64 BTI guarded page 549 + mt arm64 MTE allocation tags are enabled 549 550 == ======================================= 550 551 551 552 Note that there is no guarantee that every flag and associated mnemonic will
+3
Documentation/ia64/features.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 2 + 3 + .. kernel-feat:: $srctree/Documentation/features ia64
+2
Documentation/ia64/index.rst
··· 15 15 irq-redir 16 16 mca 17 17 serial 18 + 19 + features
+1 -1
Documentation/index.rst
··· 160 160 ia64/index 161 161 m68k/index 162 162 mips/index 163 - nios2/nios2 163 + nios2/index 164 164 openrisc/index 165 165 parisc/index 166 166 powerpc/index
+3
Documentation/m68k/features.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 2 + 3 + .. kernel-feat:: $srctree/Documentation/features m68k
+2
Documentation/m68k/index.rst
··· 10 10 kernel-options 11 11 buddha-driver 12 12 13 + features 14 + 13 15 .. only:: subproject and html 14 16 15 17 Indices
+3
Documentation/mips/features.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 2 + 3 + .. kernel-feat:: $srctree/Documentation/features mips
+2
Documentation/mips/index.rst
··· 11 11 booting 12 12 ingenic-tcu 13 13 14 + features 15 + 14 16 .. only:: subproject and html 15 17 16 18 Indices
+2 -2
Documentation/networking/device_drivers/ethernet/3com/vortex.rst
··· 374 374 email address will be in the driver source or in the MAINTAINERS file. 375 375 376 376 - The contents of your report will vary a lot depending upon the 377 - problem. If it's a kernel crash then you should refer to the 378 - admin-guide/reporting-bugs.rst file. 377 + problem. If it's a kernel crash then you should refer to 378 + 'Documentation/admin-guide/reporting-issues.rst'. 379 379 380 380 But for most problems it is useful to provide the following: 381 381
+3
Documentation/nios2/features.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 2 + 3 + .. kernel-feat:: $srctree/Documentation/features nios2
+12
Documentation/nios2/index.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 2 + 3 + ============================== 4 + Nios II Specific Documentation 5 + ============================== 6 + 7 + .. toctree:: 8 + :maxdepth: 2 9 + :numbered: 10 + 11 + nios2 12 + features
+3
Documentation/openrisc/features.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 2 + 3 + .. kernel-feat:: $srctree/Documentation/features openrisc
+2
Documentation/openrisc/index.rst
··· 10 10 openrisc_port 11 11 todo 12 12 13 + features 14 + 13 15 .. only:: subproject and html 14 16 15 17 Indices
+3
Documentation/parisc/features.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 2 + 3 + .. kernel-feat:: $srctree/Documentation/features parisc
+2
Documentation/parisc/index.rst
··· 10 10 debugging 11 11 registers 12 12 13 + features 14 + 13 15 .. only:: subproject and html 14 16 15 17 Indices
+3
Documentation/powerpc/features.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 2 + 3 + .. kernel-feat:: $srctree/Documentation/features powerpc
+2
Documentation/powerpc/index.rst
··· 34 34 vas-api 35 35 vcpudispatch_stats 36 36 37 + features 38 + 37 39 .. only:: subproject and html 38 40 39 41 Indices
+1 -1
Documentation/process/clang-format.rst
··· 97 97 98 98 There are integrations for many popular text editors. For some of them, 99 99 like vim, emacs, BBEdit and Visual Studio you can find support built-in. 100 - For instructions, read the appropiate section at: 100 + For instructions, read the appropriate section at: 101 101 102 102 https://clang.llvm.org/docs/ClangFormat.html 103 103
+1 -1
Documentation/process/embargoed-hardware-issues.rst
··· 152 152 entities who have already been, or should be, informed about the issue. 153 153 This serves several purposes: 154 154 155 - - The list of disclosed entities allows communication accross the 155 + - The list of disclosed entities allows communication across the 156 156 industry, e.g. other OS vendors, HW vendors, etc. 157 157 158 158 - The disclosed entities can be contacted to name experts who should
+4 -5
Documentation/process/howto.rst
··· 348 348 349 349 https://bugzilla.kernel.org/page.cgi?id=faq.html 350 350 351 - The file :ref:`admin-guide/reporting-bugs.rst <reportingbugs>` 352 - in the main kernel source directory has a good 353 - template for how to report a possible kernel bug, and details what kind 354 - of information is needed by the kernel developers to help track down the 355 - problem. 351 + The file 'Documentation/admin-guide/reporting-issues.rst' in the main kernel 352 + source directory has a good template for how to report a possible kernel bug, 353 + and details what kind of information is needed by the kernel developers to help 354 + track down the problem. 356 355 357 356 358 357 Managing bug reports
+2 -2
Documentation/process/kernel-docs.rst
··· 90 90 :Date: 2008 91 91 :Keywords: patches, review process, types of submissions, basic rules, case studies 92 92 :Description: This paper gives several experience values on what types of patches 93 - there are and how likley they get merged. 93 + there are and how likely they get merged. 94 94 :Abstract: 95 95 [...]. This paper examines some common problems for 96 96 submitting larger changes and some strategies to avoid problems. ··· 328 328 block devices, hardware interrupts, scsi, DMA, access to user memory, 329 329 memory allocation, timers. 330 330 :Description: A guide designed to help you get up to speed on the 331 - concepts that are not intuitevly obvious, and to document the internal 331 + concepts that are not intuitively obvious, and to document the internal 332 332 structures of Linux. 333 333 334 334 * Title: **Dynamic Kernels: Modularized Device Drivers**
+2
Documentation/process/submitting-patches.rst
··· 404 404 405 405 using your real name (sorry, no pseudonyms or anonymous contributions.) 406 406 This will be done for you automatically if you use ``git commit -s``. 407 + Reverts should also include "Signed-off-by". ``git revert -s`` does that 408 + for you. 407 409 408 410 Some people also put extra tags at the end. They'll just be ignored for 409 411 now, but you can do this to mark internal company procedures or just
+3
Documentation/riscv/features.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 2 + 3 + .. kernel-feat:: $srctree/Documentation/features riscv
+2
Documentation/riscv/index.rst
··· 9 9 pmu 10 10 patch-acceptance 11 11 12 + features 13 + 12 14 .. only:: subproject and html 13 15 14 16 Indices
+3
Documentation/s390/features.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 2 + 3 + .. kernel-feat:: $srctree/Documentation/features s390
+2
Documentation/s390/index.rst
··· 19 19 20 20 text_files 21 21 22 + features 23 + 22 24 .. only:: subproject and html 23 25 24 26 Indices
+3
Documentation/sh/features.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 2 + 3 + .. kernel-feat:: $srctree/Documentation/features sh
+2
Documentation/sh/index.rst
··· 11 11 new-machine 12 12 register-banks 13 13 14 + features 15 + 14 16 Memory Management 15 17 ================= 16 18
+3
Documentation/sparc/features.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 2 + 3 + .. kernel-feat:: $srctree/Documentation/features sparc
+2
Documentation/sparc/index.rst
··· 9 9 adi 10 10 11 11 oradax/oracle-dax 12 + 13 + features
+75 -47
Documentation/sphinx/automarkup.py
··· 53 53 # 54 54 RE_doc = re.compile(r'\bDocumentation(/[\w\-_/]+)(\.\w+)*') 55 55 56 + RE_namespace = re.compile(r'^\s*..\s*c:namespace::\s*(\S+)\s*$') 57 + 56 58 # 57 59 # Reserved C words that we should skip when cross-referencing 58 60 # ··· 71 69 Skipfuncs = [ 'open', 'close', 'read', 'write', 'fcntl', 'mmap', 72 70 'select', 'poll', 'fork', 'execve', 'clone', 'ioctl', 73 71 'socket' ] 72 + 73 + c_namespace = '' 74 74 75 75 def markup_refs(docname, app, node): 76 76 t = node.astext() ··· 132 128 # 133 129 # Go through the dance of getting an xref out of the C domain 134 130 # 135 - target = match.group(2) 131 + base_target = match.group(2) 136 132 target_text = nodes.Text(match.group(0)) 137 133 xref = None 138 - if not (target in Skipfuncs or target in Skipnames): 139 - for class_s, reftype_s in zip(class_str, reftype_str): 140 - lit_text = nodes.literal(classes=['xref', 'c', class_s]) 141 - lit_text += target_text 142 - pxref = addnodes.pending_xref('', refdomain = 'c', 143 - reftype = reftype_s, 144 - reftarget = target, modname = None, 145 - classname = None) 146 - # 147 - # XXX The Latex builder will throw NoUri exceptions here, 148 - # work around that by ignoring them. 149 - # 150 - try: 151 - xref = cdom.resolve_xref(app.env, docname, app.builder, 152 - reftype_s, target, pxref, 153 - lit_text) 154 - except NoUri: 155 - xref = None 134 + possible_targets = [base_target] 135 + # Check if this document has a namespace, and if so, try 136 + # cross-referencing inside it first. 137 + if c_namespace: 138 + possible_targets.insert(0, c_namespace + "." + base_target) 156 139 157 - if xref: 158 - return xref 140 + if base_target not in Skipnames: 141 + for target in possible_targets: 142 + if target not in Skipfuncs: 143 + for class_s, reftype_s in zip(class_str, reftype_str): 144 + lit_text = nodes.literal(classes=['xref', 'c', class_s]) 145 + lit_text += target_text 146 + pxref = addnodes.pending_xref('', refdomain = 'c', 147 + reftype = reftype_s, 148 + reftarget = target, modname = None, 149 + classname = None) 150 + # 151 + # XXX The Latex builder will throw NoUri exceptions here, 152 + # work around that by ignoring them. 153 + # 154 + try: 155 + xref = cdom.resolve_xref(app.env, docname, app.builder, 156 + reftype_s, target, pxref, 157 + lit_text) 158 + except NoUri: 159 + xref = None 160 + 161 + if xref: 162 + return xref 159 163 160 164 return target_text 161 165 ··· 191 179 # 192 180 # Go through the dance of getting an xref out of the C domain 193 181 # 194 - target = match.group(2) 182 + base_target = match.group(2) 195 183 target_text = nodes.Text(match.group(0)) 196 184 xref = None 197 - if not ((match.re == RE_function and target in Skipfuncs) 198 - or (target in Skipnames)): 199 - lit_text = nodes.literal(classes=['xref', 'c', class_str[match.re]]) 200 - lit_text += target_text 201 - pxref = addnodes.pending_xref('', refdomain = 'c', 202 - reftype = reftype_str[match.re], 203 - reftarget = target, modname = None, 204 - classname = None) 205 - # 206 - # XXX The Latex builder will throw NoUri exceptions here, 207 - # work around that by ignoring them. 208 - # 209 - try: 210 - xref = cdom.resolve_xref(app.env, docname, app.builder, 211 - reftype_str[match.re], target, pxref, 212 - lit_text) 213 - except NoUri: 214 - xref = None 215 - # 216 - # Return the xref if we got it; otherwise just return the plain text. 217 - # 218 - if xref: 219 - return xref 220 - else: 221 - return target_text 185 + possible_targets = [base_target] 186 + # Check if this document has a namespace, and if so, try 187 + # cross-referencing inside it first. 188 + if c_namespace: 189 + possible_targets.insert(0, c_namespace + "." + base_target) 190 + 191 + if base_target not in Skipnames: 192 + for target in possible_targets: 193 + if not (match.re == RE_function and target in Skipfuncs): 194 + lit_text = nodes.literal(classes=['xref', 'c', class_str[match.re]]) 195 + lit_text += target_text 196 + pxref = addnodes.pending_xref('', refdomain = 'c', 197 + reftype = reftype_str[match.re], 198 + reftarget = target, modname = None, 199 + classname = None) 200 + # 201 + # XXX The Latex builder will throw NoUri exceptions here, 202 + # work around that by ignoring them. 203 + # 204 + try: 205 + xref = cdom.resolve_xref(app.env, docname, app.builder, 206 + reftype_str[match.re], target, pxref, 207 + lit_text) 208 + except NoUri: 209 + xref = None 210 + 211 + if xref: 212 + return xref 213 + 214 + return target_text 222 215 223 216 # 224 217 # Try to replace a documentation reference of the form Documentation/... with a ··· 256 239 else: 257 240 return nodes.Text(match.group(0)) 258 241 242 + def get_c_namespace(app, docname): 243 + source = app.env.doc2path(docname) 244 + with open(source) as f: 245 + for l in f: 246 + match = RE_namespace.search(l) 247 + if match: 248 + return match.group(1) 249 + return '' 250 + 259 251 def auto_markup(app, doctree, name): 252 + global c_namespace 253 + c_namespace = get_c_namespace(app, name) 260 254 # 261 255 # This loop could eventually be improved on. Someday maybe we 262 256 # want a proper tree traversal with a lot of awareness of which
+169
Documentation/sphinx/kernel_feat.py
··· 1 + # coding=utf-8 2 + # SPDX-License-Identifier: GPL-2.0 3 + # 4 + u""" 5 + kernel-feat 6 + ~~~~~~~~~~~ 7 + 8 + Implementation of the ``kernel-feat`` reST-directive. 9 + 10 + :copyright: Copyright (C) 2016 Markus Heiser 11 + :copyright: Copyright (C) 2016-2019 Mauro Carvalho Chehab 12 + :maintained-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> 13 + :license: GPL Version 2, June 1991 see Linux/COPYING for details. 14 + 15 + The ``kernel-feat`` (:py:class:`KernelFeat`) directive calls the 16 + scripts/get_feat.pl script to parse the Kernel ABI files. 17 + 18 + Overview of directive's argument and options. 19 + 20 + .. code-block:: rst 21 + 22 + .. kernel-feat:: <ABI directory location> 23 + :debug: 24 + 25 + The argument ``<ABI directory location>`` is required. It contains the 26 + location of the ABI files to be parsed. 27 + 28 + ``debug`` 29 + Inserts a code-block with the *raw* reST. Sometimes it is helpful to see 30 + what reST is generated. 31 + 32 + """ 33 + 34 + import codecs 35 + import os 36 + import subprocess 37 + import sys 38 + 39 + from os import path 40 + 41 + from docutils import nodes, statemachine 42 + from docutils.statemachine import ViewList 43 + from docutils.parsers.rst import directives, Directive 44 + from docutils.utils.error_reporting import ErrorString 45 + 46 + # 47 + # AutodocReporter is only good up to Sphinx 1.7 48 + # 49 + import sphinx 50 + 51 + Use_SSI = sphinx.__version__[:3] >= '1.7' 52 + if Use_SSI: 53 + from sphinx.util.docutils import switch_source_input 54 + else: 55 + from sphinx.ext.autodoc import AutodocReporter 56 + 57 + __version__ = '1.0' 58 + 59 + def setup(app): 60 + 61 + app.add_directive("kernel-feat", KernelFeat) 62 + return dict( 63 + version = __version__ 64 + , parallel_read_safe = True 65 + , parallel_write_safe = True 66 + ) 67 + 68 + class KernelFeat(Directive): 69 + 70 + u"""KernelFeat (``kernel-feat``) directive""" 71 + 72 + required_arguments = 1 73 + optional_arguments = 2 74 + has_content = False 75 + final_argument_whitespace = True 76 + 77 + option_spec = { 78 + "debug" : directives.flag 79 + } 80 + 81 + def warn(self, message, **replace): 82 + replace["fname"] = self.state.document.current_source 83 + replace["line_no"] = replace.get("line_no", self.lineno) 84 + message = ("%(fname)s:%(line_no)s: [kernel-feat WARN] : " + message) % replace 85 + self.state.document.settings.env.app.warn(message, prefix="") 86 + 87 + def run(self): 88 + 89 + doc = self.state.document 90 + if not doc.settings.file_insertion_enabled: 91 + raise self.warning("docutils: file insertion disabled") 92 + 93 + env = doc.settings.env 94 + cwd = path.dirname(doc.current_source) 95 + cmd = "get_feat.pl rest --dir " 96 + cmd += self.arguments[0] 97 + 98 + if len(self.arguments) > 1: 99 + cmd += " --arch " + self.arguments[1] 100 + 101 + srctree = path.abspath(os.environ["srctree"]) 102 + 103 + fname = cmd 104 + 105 + # extend PATH with $(srctree)/scripts 106 + path_env = os.pathsep.join([ 107 + srctree + os.sep + "scripts", 108 + os.environ["PATH"] 109 + ]) 110 + shell_env = os.environ.copy() 111 + shell_env["PATH"] = path_env 112 + shell_env["srctree"] = srctree 113 + 114 + lines = self.runCmd(cmd, shell=True, cwd=cwd, env=shell_env) 115 + nodeList = self.nestedParse(lines, fname) 116 + return nodeList 117 + 118 + def runCmd(self, cmd, **kwargs): 119 + u"""Run command ``cmd`` and return it's stdout as unicode.""" 120 + 121 + try: 122 + proc = subprocess.Popen( 123 + cmd 124 + , stdout = subprocess.PIPE 125 + , stderr = subprocess.PIPE 126 + , **kwargs 127 + ) 128 + out, err = proc.communicate() 129 + 130 + out, err = codecs.decode(out, 'utf-8'), codecs.decode(err, 'utf-8') 131 + 132 + if proc.returncode != 0: 133 + raise self.severe( 134 + u"command '%s' failed with return code %d" 135 + % (cmd, proc.returncode) 136 + ) 137 + except OSError as exc: 138 + raise self.severe(u"problems with '%s' directive: %s." 139 + % (self.name, ErrorString(exc))) 140 + return out 141 + 142 + def nestedParse(self, lines, fname): 143 + content = ViewList() 144 + node = nodes.section() 145 + 146 + if "debug" in self.options: 147 + code_block = "\n\n.. code-block:: rst\n :linenos:\n" 148 + for l in lines.split("\n"): 149 + code_block += "\n " + l 150 + lines = code_block + "\n\n" 151 + 152 + for c, l in enumerate(lines.split("\n")): 153 + content.append(l, fname, c) 154 + 155 + buf = self.state.memo.title_styles, self.state.memo.section_level, self.state.memo.reporter 156 + 157 + if Use_SSI: 158 + with switch_source_input(self.state, content): 159 + self.state.nested_parse(content, 0, node, match_titles=1) 160 + else: 161 + self.state.memo.title_styles = [] 162 + self.state.memo.section_level = 0 163 + self.state.memo.reporter = AutodocReporter(content, self.state.memo.reporter) 164 + try: 165 + self.state.nested_parse(content, 0, node, match_titles=1) 166 + finally: 167 + self.state.memo.title_styles, self.state.memo.section_level, self.state.memo.reporter = buf 168 + 169 + return node.children
+1
Documentation/sphinx/requirements.txt
··· 1 1 docutils 2 2 Sphinx==2.4.4 3 3 sphinx_rtd_theme 4 + six
+5 -5
Documentation/trace/events.rst
··· 798 798 synth_event_trace_start() function is used to 'open' the synthetic 799 799 event trace:: 800 800 801 - struct synth_trace_state trace_state; 801 + struct synth_event_trace_state trace_state; 802 802 803 803 ret = synth_event_trace_start(schedtest_event_file, &trace_state); 804 804 805 805 It's passed the trace_event_file representing the synthetic event 806 806 using the same methods as described above, along with a pointer to a 807 - struct synth_trace_state object, which will be zeroed before use and 807 + struct synth_event_trace_state object, which will be zeroed before use and 808 808 used to maintain state between this and following calls. 809 809 810 810 Once the event has been opened, which means space for it has been ··· 816 816 817 817 To assign the values one after the other without lookups, 818 818 synth_event_add_next_val() should be used. Each call is passed the 819 - same synth_trace_state object used in the synth_event_trace_start(), 819 + same synth_event_trace_state object used in the synth_event_trace_start(), 820 820 along with the value to set the next field in the event. After each 821 821 field is set, the 'cursor' points to the next field, which will be set 822 822 by the subsequent call, continuing until all the fields have been set ··· 845 845 ret = synth_event_add_next_val(395, &trace_state); 846 846 847 847 To assign the values in any order, synth_event_add_val() should be 848 - used. Each call is passed the same synth_trace_state object used in 848 + used. Each call is passed the same synth_event_trace_state object used in 849 849 the synth_event_trace_start(), along with the field name of the field 850 850 to set and the value to set it to. The same sequence of calls as in 851 851 the above examples using this method would be (without error-handling ··· 867 867 868 868 Finally, the event won't be actually traced until it's 'closed', 869 869 which is done using synth_event_trace_end(), which takes only the 870 - struct synth_trace_state object used in the previous calls:: 870 + struct synth_event_trace_state object used in the previous calls:: 871 871 872 872 ret = synth_event_trace_end(&trace_state); 873 873
+14 -16
Documentation/translations/it_IT/doc-guide/kernel-doc.rst
··· 419 419 Riferimenti usando reStructuredText 420 420 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 421 421 422 - Per fare riferimento a funzioni e tipi di dato definiti nei commenti kernel-doc 423 - all'interno dei documenti reStructuredText, utilizzate i riferimenti dal 424 - `dominio Sphinx per il C`_. Per esempio:: 422 + Nei documenti reStructuredText non serve alcuna sintassi speciale per 423 + fare riferimento a funzioni e tipi definiti nei commenti 424 + kernel-doc. Sarà sufficiente terminare i nomi di funzione con ``()``, 425 + e scrivere ``struct``, ``union``, ``enum``, o ``typedef`` prima di un 426 + tipo. Per esempio:: 425 427 426 - See function :c:func:`foo` and struct/union/enum/typedef :c:type:`bar`. 428 + See foo() 429 + See struct foo. 430 + See union bar. 431 + See enum baz. 432 + See typedef meh. 427 433 428 - Nonostante il riferimento ai tipi di dato funzioni col solo nome, 429 - ovvero senza specificare struct/union/enum/typedef, potreste preferire il 430 - seguente:: 434 + Tuttavia, la personalizzazione dei collegamenti è possibile solo con 435 + la seguente sintassi:: 431 436 432 - See :c:type:`struct foo <foo>`. 433 - See :c:type:`union bar <bar>`. 434 - See :c:type:`enum baz <baz>`. 435 - See :c:type:`typedef meh <meh>`. 437 + See :c:func:`my custom link text for function foo <foo>`. 438 + See :c:type:`my custom link text for struct bar <bar>`. 436 439 437 - Questo produce dei collegamenti migliori, ed è in linea con il modo in cui 438 - kernel-doc gestisce i riferimenti. 439 - 440 - Per maggiori informazioni, siete pregati di consultare la documentazione 441 - del `dominio Sphinx per il C`_. 442 440 443 441 Commenti per una documentazione generale 444 442 ----------------------------------------
+20
Documentation/translations/it_IT/doc-guide/sphinx.rst
··· 364 364 365 365 - column 3 366 366 367 + Riferimenti incrociati 368 + ---------------------- 369 + 370 + Per fare dei riferimenti incrociati da una pagina ad un'altra 371 + specificando il percorso a partire dalla cartella *Documentation*. 372 + Per esempio, se volete aggiungere un riferimento a questa pagina 373 + (l'estensione .rst è opzionale):: 374 + 375 + See Documentation/translations/it_IT/doc-guide/sphinx.rst. 376 + 377 + Se preferite usare un percorso relative allora vi serve la direttiva 378 + Sphinx ``doc``. Per esempio, se volete aggiungere un riferimento a 379 + questa pagina dalla stessa cartella:: 380 + 381 + See :doc:`sphinx`. 382 + 383 + Per maggiori informazioni su come aggiungere riferimenti incrociati a 384 + commenti kernel-doc di funzioni o tipi, leggete 385 + Documentation/translations/it_IT/doc-guide/sphinx.rst. 386 + 367 387 .. _it_sphinx_kfigure: 368 388 369 389 Figure ed immagini
+2 -2
Documentation/translations/it_IT/process/2.Process.rst
··· 123 123 Quindi, per esempio, la storia del kernel 5.2 appare così (anno 2019): 124 124 125 125 ============== =============================== 126 - 15 settembre 5.2 rilascio stabile FIXME settembre è sbagliato 126 + 7 luglio 5.2 rilascio stabile 127 127 14 luglio 5.2.1 128 128 21 luglio 5.2.2 129 129 26 luglio 5.2.3 ··· 434 434 http://vger.kernel.org/vger-lists.html 435 435 436 436 Esistono liste gestite altrove; un certo numero di queste sono in 437 - lists.redhat.com. 437 + redhat.com/mailman/listinfo. 438 438 439 439 La lista di discussione principale per lo sviluppo del kernel è, ovviamente, 440 440 linux-kernel. Questa lista è un luogo ostile dove trovarsi; i volumi possono
+19 -3
Documentation/translations/it_IT/process/changes.rst
··· 32 32 ====================== ================= ======================================== 33 33 Programma Versione minima Comando per verificare la versione 34 34 ====================== ================= ======================================== 35 - GNU C 4.6 gcc --version 35 + GNU C 4.9 gcc --version 36 + Clang/LLVM (optional) 10.0.1 clang --version 36 37 GNU make 3.81 make --version 37 - binutils 2.21 ld -v 38 + binutils 2.23 ld -v 38 39 flex 2.5.35 flex --version 39 40 bison 2.0 bison --version 40 41 util-linux 2.10o fdformat --version ··· 72 71 La versione necessaria di gcc potrebbe variare a seconda del tipo di CPU nel 73 72 vostro calcolatore. 74 73 74 + Clang/LLVM (opzionale) 75 + ---------------------- 76 + 77 + L'ultima versione di clang e *LLVM utils* (secondo `releases.llvm.org 78 + <https://releases.llvm.org>`_) sono supportati per la generazione del 79 + kernel. Non garantiamo che anche i rilasci più vecchi funzionino, inoltre 80 + potremmo rimuovere gli espedienti che abbiamo implementato per farli 81 + funzionare. Per maggiori informazioni 82 + :ref:`Building Linux with Clang/LLVM <kbuild_llvm>`. 83 + 75 84 Make 76 85 ---- 77 86 ··· 90 79 Binutils 91 80 -------- 92 81 93 - Per generare il kernel è necessario avere Binutils 2.21 o superiore. 82 + Per generare il kernel è necessario avere Binutils 2.23 o superiore. 94 83 95 84 pkg-config 96 85 ---------- ··· 348 337 --- 349 338 350 339 - <ftp://ftp.gnu.org/gnu/gcc/> 340 + 341 + Clang/LLVM 342 + ---------- 343 + 344 + - :ref:`Getting LLVM <getting_llvm>`. 351 345 352 346 Make 353 347 ----
+15 -9
Documentation/translations/it_IT/process/coding-style.rst
··· 92 92 Lo stile del codice riguarda la leggibilità e la manutenibilità utilizzando 93 93 strumenti comuni. 94 94 95 - Il limite delle righe è di 80 colonne e questo e un limite fortemente 96 - desiderato. 95 + Come limite di riga si preferiscono le 80 colonne. 97 96 98 - Espressioni più lunghe di 80 colonne saranno spezzettate in pezzi più piccoli, 99 - a meno che eccedere le 80 colonne non aiuti ad aumentare la leggibilità senza 100 - nascondere informazioni. I pezzi derivati sono sostanzialmente più corti degli 101 - originali e vengono posizionati più a destra. Lo stesso si applica, nei file 102 - d'intestazione, alle funzioni con una lista di argomenti molto lunga. Tuttavia, 103 - non spezzettate mai le stringhe visibili agli utenti come i messaggi di 104 - printk, questo perché inibireste la possibilità d'utilizzare grep per cercarle. 97 + Espressioni più lunghe di 80 colonne dovrebbero essere spezzettate in 98 + pezzi più piccoli, a meno che eccedere le 80 colonne non aiuti ad 99 + aumentare la leggibilità senza nascondere informazioni. 100 + 101 + I nuovi pezzi derivati sono sostanzialmente più corti degli originali 102 + e vengono posizionati più a destra. Uno stile molto comune è quello di 103 + allineare i nuovi pezzi alla parentesi aperta di una funzione. 104 + 105 + Lo stesso si applica, nei file d'intestazione, alle funzioni con una 106 + lista di argomenti molto lunga. 107 + 108 + Tuttavia, non spezzettate mai le stringhe visibili agli utenti come i 109 + messaggi di printk, questo perché inibireste la possibilità 110 + d'utilizzare grep per cercarle. 105 111 106 112 3) Posizionamento di parentesi graffe e spazi 107 113 ---------------------------------------------
+143 -4
Documentation/translations/it_IT/process/deprecated.rst
··· 95 95 96 96 header = kzalloc(struct_size(header, item, count), GFP_KERNEL); 97 97 98 + .. note:: Se per caso state usando struct_size() su una struttura dati che 99 + in coda contiene un array di lunghezza zero o uno, allora siete 100 + invitati a riorganizzare il vostro codice usando il 101 + `flexible array member <#zero-length-and-one-element-arrays>`_. 102 + 98 103 Per maggiori dettagli fate riferimento a array_size(), 99 104 array3_size(), e struct_size(), così come la famiglia di 100 105 funzioni check_add_overflow() e check_mul_overflow(). ··· 121 116 buffer e generare svariati tipi di malfunzionamenti. Nonostante l'opzione 122 117 `CONFIG_FORTIFY_SOURCE=y` e svariate opzioni del compilatore aiutano 123 118 a ridurne il rischio, non c'è alcuna buona ragione per continuare ad usare 124 - questa funzione. La versione sicura da usare è strscpy(). 119 + questa funzione. La versione sicura da usare è strscpy(), tuttavia va 120 + prestata attenzione a tutti quei casi dove viene usato il valore di 121 + ritorno di strcpy(). La funzione strscpy() non ritorna un puntatore 122 + alla destinazione, ma un contatore dei byte non NUL copiati (oppure 123 + un errno negativo se la stringa è stata troncata). 125 124 126 125 strncpy() su stringe terminate con NUL 127 126 -------------------------------------- ··· 136 127 terminazione nel buffer di destinazione quando la stringa d'origine è più 137 128 corta; questo potrebbe portare ad una penalizzazione delle prestazioni per 138 129 chi usa solo stringe terminate. La versione sicura da usare è 139 - strscpy(). (chi usa strscpy() e necessita di estendere la 140 - terminazione con NUL deve aggiungere una chiamata a memset()) 130 + strscpy(), tuttavia va prestata attenzione a tutti quei casi dove 131 + viene usato il valore di ritorno di strncpy(). La funzione strscpy() 132 + non ritorna un puntatore alla destinazione, ma un contatore dei byte 133 + non NUL copiati (oppure un errno negativo se la stringa è stata 134 + troncata). Tutti i casi che necessitano di estendere la 135 + terminazione con NUL dovrebbero usare strscpy_pad(). 141 136 142 137 Se il chiamate no usa stringhe terminate con NUL, allore strncpy() 143 138 può continuare ad essere usata, ma i buffer di destinazione devono essere ··· 153 140 La funzione strlcpy(), per prima cosa, legge interamente il buffer di 154 141 origine, magari leggendo più di quanto verrà effettivamente copiato. Questo 155 142 è inefficiente e può portare a overflow di lettura quando la stringa non è 156 - terminata con NUL. La versione sicura da usare è strscpy(). 143 + terminata con NUL. La versione sicura da usare è strscpy(), tuttavia 144 + va prestata attenzione a tutti quei casi dove viene usato il valore di 145 + ritorno di strlcpy(), dato che strscpy() ritorna un valore di errno 146 + negativo quanto la stringa viene troncata. 157 147 158 148 Segnaposto %p nella stringa di formato 159 149 -------------------------------------- ··· 243 227 * ``continue;`` 244 228 * ``goto <label>;`` 245 229 * ``return [expression];`` 230 + 231 + Array di lunghezza zero o con un solo elemento 232 + ---------------------------------------------- 233 + All'interno del kernel ricorre spesso la necessita di avere membri 234 + di dimensione variabile all'interno di una struttura dati. In questi 235 + casi il codice del kernel dovrebbe usare sempre i `"flexible array 236 + member" <https://en.wikipedia.org/wiki/Flexible_array_member>`_. La 237 + tecnica degli array a lunghezza nulla o di un solo elemento non 238 + dovrebbe essere più usata. 239 + 240 + Nel codice C più vecchio, la dichiarazione di un membro di dimensione 241 + variabile in coda ad una struttura dati veniva fatto dichiarando un 242 + array di un solo elemento posizionato alla fine della struttura dati:: 243 + 244 + struct something { 245 + size_t count; 246 + struct foo items[1]; 247 + }; 248 + 249 + Questo ha portato ad un calcolo di sizeof() traballante (dovrebbe 250 + rimuovere la dimensione del singolo elemento in coda per calcolare la 251 + dimensione esatta dell' "intestazione"). Per evitare questi problemi è 252 + stata introdotta un' `estensione a GNU C 253 + <https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html>`_ che 254 + permettesse la dichiarazione di array a lungezza zero:: 255 + 256 + struct something { 257 + size_t count; 258 + struct foo items[0]; 259 + }; 260 + 261 + Ma questo ha portato nuovi problemi, e non ha risolto alcuni dei 262 + problemi che affliggono entrambe le tecniche: per esempio 263 + l'impossibilità di riconoscere se un array di quel tipo viene usato 264 + nel mezzo di una struttura dati e _non_ alla fine (potrebbe accadere 265 + sia direttamente, sia indirettamente quando si usano le unioni o le 266 + strutture di strutture). 267 + 268 + Lo standard C99 introduce i "flexible array members". Questi array non 269 + hanno una dimensione nella loro dichiarazione:: 270 + 271 + struct something { 272 + size_t count; 273 + struct foo items[]; 274 + }; 275 + 276 + Questo è il modo con cui ci si aspetta che vengano dichiarati gli 277 + elementi di lunghezza variabile in coda alle strutture dati. Permette 278 + al compilatore di produrre errori quando gli array flessibili non si 279 + trovano alla fine della struttura dati, il che permette di prevenire 280 + alcuni tipi di bachi dovuti a `comportamenti inaspettati 281 + <https://git.kernel.org/linus/76497732932f15e7323dc805e8ea8dc11bb587cf>`_. 282 + Inoltre, permette al compilatore di analizzare correttamente le 283 + dimensioni degli array (attraverso sizeof(), `CONFIG_FORTIFY_SOURCE`, 284 + e `CONFIG_UBSAN_BOUNDS`). Per esempio, non esiste alcun meccanismo in 285 + grado di avvisarci che il seguente uso di sizeof() dia sempre come 286 + zero come risultato:: 287 + 288 + struct something { 289 + size_t count; 290 + struct foo items[0]; 291 + }; 292 + 293 + struct something *instance; 294 + 295 + instance = kmalloc(struct_size(instance, items, count), GFP_KERNEL); 296 + instance->count = count; 297 + 298 + size = sizeof(instance->items) * instance->count; 299 + memcpy(instance->items, source, size); 300 + 301 + Il valore di ``size`` nell'ultima riga sarà ``zero``, quando uno 302 + invece si aspetterebbe che il suo valore sia la dimensione totale in 303 + byte dell'allocazione dynamica che abbiamo appena fatto per l'array 304 + ``items``. Qui un paio di esempi reali del problema: `collegamento 1 305 + <https://git.kernel.org/linus/f2cd32a443da694ac4e28fbf4ac6f9d5cc63a539>`_, 306 + `collegamento 2 307 + <https://git.kernel.org/linus/ab91c2a89f86be2898cee208d492816ec238b2cf>`_. 308 + Invece, `i flexible array members hanno un tipo incompleto, e quindi 309 + sizeof() non può essere applicato 310 + <https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html>`_; dunque ogni 311 + uso scorretto di questo operatore verrà identificato immediatamente 312 + durante la compilazione. 313 + 314 + Per quanto riguarda gli array di un solo elemento, bisogna essere 315 + consapevoli che `questi array occupano almeno quanto lo spazio di un 316 + singolo oggetti dello stesso tipo 317 + <https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html>`_, e quindi 318 + contribuiscono al calcolo della dimensione della struttura che li 319 + contiene. In questo caso è facile commettere errori quando si vuole 320 + calcolare la dimensione totale della memoria totale da allocare per 321 + una struttura dati:: 322 + 323 + struct something { 324 + size_t count; 325 + struct foo items[1]; 326 + }; 327 + 328 + struct something *instance; 329 + 330 + instance = kmalloc(struct_size(instance, items, count - 1), GFP_KERNEL); 331 + instance->count = count; 332 + 333 + size = sizeof(instance->items) * instance->count; 334 + memcpy(instance->items, source, size); 335 + 336 + In questo esempio ci siamo dovuti ricordare di usare ``count - 1`` in 337 + struct_size(), altrimenti avremmo --inavvertitamente-- allocato 338 + memoria per un oggetti ``items`` in più. Il modo più pulito e meno 339 + propenso agli errori è quello di usare i `flexible array member`, in 340 + combinazione con struct_size() e flex_array_size():: 341 + 342 + struct something { 343 + size_t count; 344 + struct foo items[]; 345 + }; 346 + 347 + struct something *instance; 348 + 349 + instance = kmalloc(struct_size(instance, items, count), GFP_KERNEL); 350 + instance->count = count; 351 + 352 + memcpy(instance->items, source, flex_array_size(instance, items, instance->count));
+5
Documentation/translations/it_IT/process/email-clients.rst
··· 32 32 ben apprezzati perché rende più difficile citare porzioni di patch durante il 33 33 processo di revisione. 34 34 35 + Inoltre, è vivamente raccomandato l'uso di puro testo nel corpo del 36 + messaggio, sia per la patch che per qualsiasi altro messaggio. Il sito 37 + https://useplaintext.email/ può esservi d'aiuto per configurare il 38 + vostro programma di posta elettronica. 39 + 35 40 I programmi di posta elettronica che vengono usati per inviare le patch per il 36 41 kernel Linux dovrebbero inviarle senza alterazioni. Per esempio, non 37 42 dovrebbero modificare o rimuovere tabulazioni o spazi, nemmeno all'inizio o
+5 -3
Documentation/translations/it_IT/process/programming-language.rst
··· 11 11 Il kernel è scritto nel linguaggio di programmazione C [it-c-language]_. 12 12 Più precisamente, il kernel viene compilato con ``gcc`` [it-gcc]_ usando 13 13 l'opzione ``-std=gnu89`` [it-gcc-c-dialect-options]_: il dialetto GNU 14 - dello standard ISO C90 (con l'aggiunta di alcune funzionalità da C99) 14 + dello standard ISO C90 (con l'aggiunta di alcune funzionalità da C99). 15 + Linux supporta anche ``clang`` [it-clang]_, leggete la documentazione 16 + :ref:`Building Linux with Clang/LLVM <kbuild_llvm>`. 15 17 16 18 Questo dialetto contiene diverse estensioni al linguaggio [it-gnu-extensions]_, 17 19 e molte di queste vengono usate sistematicamente dal kernel. 18 20 19 - Il kernel offre un certo livello di supporto per la compilazione con ``clang`` 20 - [it-clang]_ e ``icc`` [it-icc]_ su diverse architetture, tuttavia in questo momento 21 + Il kernel offre un certo livello di supporto per la compilazione con 22 + ``icc`` [it-icc]_ su diverse architetture, tuttavia in questo momento 21 23 il supporto non è completo e richiede delle patch aggiuntive. 22 24 23 25 Attributi
+70 -223
Documentation/translations/it_IT/process/submitting-patches.rst
··· 16 16 17 17 Questo documento contiene un vasto numero di suggerimenti concisi. Per 18 18 maggiori dettagli su come funziona il processo di sviluppo del kernel leggete 19 - :ref:`Documentation/translations/it_IT/process <it_development_process_main>`. 20 - Leggete anche :ref:`Documentation/translations/it_IT/process/submit-checklist.rst <it_submitchecklist>` 21 - per una lista di punti da verificare prima di inviare del codice. Se state 22 - inviando un driver, allora leggete anche :ref:`Documentation/translations/it_IT/process/submitting-drivers.rst <it_submittingdrivers>`; 23 - per delle patch relative alle associazioni per Device Tree leggete 24 - Documentation/devicetree/bindings/submitting-patches.rst. 19 + :doc:`development-process`. 20 + Leggete anche :doc:`submit-checklist` per una lista di punti da 21 + verificare prima di inviare del codice. Se state inviando un driver, 22 + allora leggete anche :doc:`submitting-drivers`; per delle patch 23 + relative alle associazioni per Device Tree leggete 24 + :doc:`submitting-patches`. 25 25 26 - Molti di questi passi descrivono il comportamento di base del sistema di 27 - controllo di versione ``git``; se utilizzate ``git`` per preparare le vostre 28 - patch molto del lavoro più ripetitivo lo troverete già fatto per voi, tuttavia 29 - dovete preparare e documentare un certo numero di patch. Generalmente, l'uso 30 - di ``git`` renderà la vostra vita di sviluppatore del kernel più facile. 26 + Questa documentazione assume che sappiate usare ``git`` per preparare le patch. 27 + Se non siete pratici di ``git``, allora è bene che lo impariate; 28 + renderà la vostra vita di sviluppatore del kernel molto più semplice. 31 29 32 - 0) Ottenere i sorgenti attuali 33 - ------------------------------ 30 + Ottenere i sorgenti attuali 31 + --------------------------- 34 32 35 33 Se non avete un repositorio coi sorgenti del kernel più recenti, allora usate 36 34 ``git`` per ottenerli. Vorrete iniziare col repositorio principale che può ··· 43 45 che troverete nei sorgenti, o semplicemente chiedete al manutentore nel caso 44 46 in cui i sorgenti da usare non siano elencati il quel file. 45 47 46 - Esiste ancora la possibilità di scaricare un rilascio del kernel come archivio 47 - tar (come descritto in una delle prossime sezioni), ma questa è la via più 48 - complicata per sviluppare per il kernel. 49 - 50 - 1) ``diff -up`` 51 - --------------- 52 - 53 - Se dovete produrre le vostre patch a mano, usate ``diff -up`` o ``diff -uprN`` 54 - per crearle. Git produce di base le patch in questo formato; se state 55 - usando ``git``, potete saltare interamente questa sezione. 56 - 57 - Tutte le modifiche al kernel Linux avvengono mediate patch, come descritte 58 - in :manpage:`diff(1)`. Quando create la vostra patch, assicuratevi di 59 - crearla nel formato "unified diff", come l'argomento ``-u`` di 60 - :manpage:`diff(1)`. 61 - Inoltre, per favore usate l'argomento ``-p`` per mostrare la funzione C 62 - alla quale si riferiscono le diverse modifiche - questo rende il risultato 63 - di ``diff`` molto più facile da leggere. Le patch dovrebbero essere basate 64 - sulla radice dei sorgenti del kernel, e non sulle sue sottocartelle. 65 - 66 - Per creare una patch per un singolo file, spesso è sufficiente fare:: 67 - 68 - SRCTREE=linux 69 - MYFILE=drivers/net/mydriver.c 70 - 71 - cd $SRCTREE 72 - cp $MYFILE $MYFILE.orig 73 - vi $MYFILE # make your change 74 - cd .. 75 - diff -up $SRCTREE/$MYFILE{.orig,} > /tmp/patch 76 - 77 - Per creare una patch per molteplici file, dovreste spacchettare i sorgenti 78 - "vergini", o comunque non modificati, e fare un ``diff`` coi vostri. 79 - Per esempio:: 80 - 81 - MYSRC=/devel/linux 82 - 83 - tar xvfz linux-3.19.tar.gz 84 - mv linux-3.19 linux-3.19-vanilla 85 - diff -uprN -X linux-3.19-vanilla/Documentation/dontdiff \ 86 - linux-3.19-vanilla $MYSRC > /tmp/patch 87 - 88 - ``dontdiff`` è una lista di file che sono generati durante il processo di 89 - compilazione del kernel; questi dovrebbero essere ignorati in qualsiasi 90 - patch generata con :manpage:`diff(1)`. 91 - 92 - Assicuratevi che la vostra patch non includa file che non ne fanno veramente 93 - parte. Al fine di verificarne la correttezza, assicuratevi anche di 94 - revisionare la vostra patch -dopo- averla generata con :manpage:`diff(1)`. 95 - 96 - Se le vostre modifiche producono molte differenze, allora dovrete dividerle 97 - in patch indipendenti che modificano le cose in passi logici; leggete 98 - :ref:`split_changes`. Questo faciliterà la revisione da parte degli altri 99 - sviluppatori, il che è molto importante se volete che la patch venga accettata. 100 - 101 - Se state utilizzando ``git``, ``git rebase -i`` può aiutarvi nel procedimento. 102 - Se non usate ``git``, un'alternativa popolare è ``quilt`` 103 - <http://savannah.nongnu.org/projects/quilt>. 104 - 105 48 .. _it_describe_changes: 106 49 107 - 2) Descrivete le vostre modifiche 108 - --------------------------------- 50 + Descrivete le vostre modifiche 51 + ------------------------------ 109 52 110 53 Descrivete il vostro problema. Esiste sempre un problema che via ha spinto 111 54 ha fare il vostro lavoro, che sia la correzione di un baco da una riga o una ··· 147 208 [pretty] 148 209 fixes = Fixes: %h (\"%s\") 149 210 211 + Un esempio:: 212 + 213 + $ git log -1 --pretty=fixes 54a4f0239f2e 214 + Fixes: 54a4f0239f2e ("KVM: MMU: make kvm_mmu_zap_page() return the number of pages it actually freed") 215 + 150 216 .. _it_split_changes: 151 217 152 - 3) Separate le vostre modifiche 153 - ------------------------------- 218 + Separate le vostre modifiche 219 + ---------------------------- 154 220 155 221 Separate ogni **cambiamento logico** in patch distinte. 156 222 ··· 256 312 embargo potrebbe essere preso in considerazione per dare il tempo alle 257 313 distribuzioni di prendere la patch e renderla disponibile ai loro utenti; 258 314 in questo caso, ovviamente, la patch non dovrebbe essere inviata su alcuna 259 - lista di discussione pubblica. 315 + lista di discussione pubblica. Leggete anche 316 + :doc:`/admin-guide/security-bugs`. 260 317 261 318 Patch che correggono bachi importanti su un kernel già rilasciato, dovrebbero 262 319 essere inviate ai manutentori dei kernel stabili aggiungendo la seguente riga:: ··· 299 354 "patch monkey" in modalità ritrasmissione) 300 355 301 356 302 - 6) Niente: MIME, links, compressione, allegati. Solo puro testo 303 - ---------------------------------------------------------------- 357 + Niente: MIME, links, compressione, allegati. Solo puro testo 358 + ------------------------------------------------------------- 304 359 305 360 Linus e gli altri sviluppatori del kernel devono poter commentare 306 361 le modifiche che sottomettete. Per uno sviluppatore è importante ··· 309 364 una porzione specifica del vostro codice. 310 365 311 366 Per questa ragione tutte le patch devono essere inviate via e-mail 312 - come testo. 367 + come testo. Il modo più facile, e quello raccomandato, è con ``git 368 + send-email``. Al sito https://git-send-email.io è disponibile una 369 + guida interattiva sull'uso di ``git send-email``. 370 + 371 + Se decidete di non usare ``git send-email``: 313 372 314 373 .. warning:: 315 374 ··· 330 381 Eccezione: se il vostro servizio di posta storpia le patch, allora qualcuno 331 382 potrebbe chiedervi di rinviarle come allegato MIME. 332 383 333 - Leggete :ref:`Documentation/translations/it_IT/process/email-clients.rst <it_email_clients>` 384 + Leggete :doc:`/translations/it_IT/process/email-clients` 334 385 per dei suggerimenti sulla configurazione del programmi di posta elettronica 335 386 per l'invio di patch intatte. 336 387 337 - 7) Dimensione delle e-mail 338 - -------------------------- 388 + Rispondere ai commenti di revisione 389 + ----------------------------------- 339 390 340 - Le grosse modifiche non sono adatte ad una lista di discussione, e nemmeno 341 - per alcuni manutentori. Se la vostra patch, non compressa, eccede i 300 kB 342 - di spazio, allora caricatela in una spazio accessibile su internet fornendo 343 - l'URL (collegamento) ad essa. Ma notate che se la vostra patch eccede i 300 kB 344 - è quasi certo che necessiti comunque di essere spezzettata. 345 - 346 - 8) Rispondere ai commenti di revisione 347 - -------------------------------------- 348 - 349 - Quasi certamente i revisori vi invieranno dei commenti su come migliorare 350 - la vostra patch. Dovete rispondere a questi commenti; ignorare i revisori 351 - è un ottimo modo per essere ignorati. Riscontri o domande che non conducono 352 - ad una modifica del codice quasi certamente dovrebbero portare ad un commento 353 - nel changelog cosicché il prossimo revisore potrà meglio comprendere cosa stia 354 - accadendo. 391 + In risposta alla vostra email, quasi certamente i revisori vi 392 + invieranno dei commenti su come migliorare la vostra patch. Dovete 393 + rispondere a questi commenti; ignorare i revisori è un ottimo modo per 394 + essere ignorati. Riscontri o domande che non conducono ad una 395 + modifica del codice quasi certamente dovrebbero portare ad un commento 396 + nel changelog cosicché il prossimo revisore potrà meglio comprendere 397 + cosa stia accadendo. 355 398 356 399 Assicuratevi di dire ai revisori quali cambiamenti state facendo e di 357 400 ringraziarli per il loro tempo. Revisionare codice è un lavoro faticoso e che ··· 351 410 in questo caso, rispondete con educazione e concentratevi sul problema che 352 411 hanno evidenziato. 353 412 354 - 9) Non scoraggiatevi - o impazientitevi 355 - --------------------------------------- 413 + Leggete :doc:`/translations/it_IT/process/email-clients` per 414 + le raccomandazioni sui programmi di posta elettronica e l'etichetta da usare 415 + sulle liste di discussione. 416 + 417 + Non scoraggiatevi - o impazientitevi 418 + ------------------------------------ 356 419 357 420 Dopo che avete inviato le vostre modifiche, siate pazienti e aspettate. 358 421 I revisori sono persone occupate e potrebbero non ricevere la vostra patch ··· 369 424 rinviare le modifiche o sollecitare i revisori - probabilmente anche di più 370 425 durante la finestra d'integrazione. 371 426 372 - 10) Aggiungete PATCH nell'oggetto 373 - --------------------------------- 427 + Aggiungete PATCH nell'oggetto 428 + ----------------------------- 374 429 375 430 Dato l'alto volume di e-mail per Linus, e la lista linux-kernel, è prassi 376 431 prefiggere il vostro oggetto con [PATCH]. Questo permette a Linus e agli 377 432 altri sviluppatori del kernel di distinguere facilmente le patch dalle altre 378 433 discussioni. 379 434 435 + ``git send-email`` lo fa automaticamente. 380 436 381 - 11) Firmate il vostro lavoro - Il certificato d'origine dello sviluppatore 382 - -------------------------------------------------------------------------- 437 + 438 + Firmate il vostro lavoro - Il certificato d'origine dello sviluppatore 439 + ---------------------------------------------------------------------- 383 440 384 441 Per migliorare la tracciabilità su "chi ha fatto cosa", specialmente per 385 442 quelle patch che per raggiungere lo stadio finale passano attraverso ··· 424 477 Signed-off-by: Random J Developer <random@developer.example.org> 425 478 426 479 usando il vostro vero nome (spiacenti, non si accettano pseudonimi o 427 - contributi anonimi). 480 + contributi anonimi). Questo verrà fatto automaticamente se usate 481 + ``git commit -s``. Anche il ripristino di uno stato precedente dovrebbe 482 + includere "Signed-off-by", se usate ``git revert -s`` questo verrà 483 + fatto automaticamente. 428 484 429 485 Alcune persone aggiungono delle etichette alla fine. Per ora queste verranno 430 486 ignorate, ma potete farlo per meglio identificare procedure aziendali interne o 431 487 per aggiungere dettagli circa la firma. 432 488 433 - Se siete un manutentore di un sottosistema o di un ramo, qualche volta dovrete 434 - modificare leggermente le patch che avete ricevuto al fine di poterle 435 - integrare; questo perché il codice non è esattamente lo stesso nei vostri 436 - sorgenti e in quelli dei vostri contributori. Se rispettate rigidamente la 437 - regola (c), dovreste chiedere al mittente di rifare la patch, ma questo è 438 - controproducente e una totale perdita di tempo ed energia. La regola (b) 439 - vi permette di correggere il codice, ma poi diventa davvero maleducato cambiare 440 - la patch di qualcuno e addossargli la responsabilità per i vostri bachi. 441 - Per risolvere questo problema dovreste aggiungere una riga, fra l'ultimo 442 - Signed-off-by e il vostro, che spiega la vostra modifica. Nonostante non ci 443 - sia nulla di obbligatorio, un modo efficace è quello di indicare il vostro 444 - nome o indirizzo email fra parentesi quadre, seguito da una breve descrizione; 445 - questo renderà abbastanza visibile chi è responsabile per le modifiche 446 - dell'ultimo minuto. Per esempio:: 447 - 448 - Signed-off-by: Random J Developer <random@developer.example.org> 449 - [lucky@maintainer.example.org: struct foo moved from foo.c to foo.h] 450 - Signed-off-by: Lucky K Maintainer <lucky@maintainer.example.org> 451 - 452 - Questa pratica è particolarmente utile se siete i manutentori di un ramo 453 - stabile ma al contempo volete dare credito agli autori, tracciare e integrare 454 - le modifiche, e proteggere i mittenti dalle lamentele. Notate che in nessuna 455 - circostanza è permessa la modifica dell'identità dell'autore (l'intestazione 456 - From), dato che è quella che appare nei changelog. 457 - 458 - Un appunto speciale per chi porta il codice su vecchie versioni. Sembra che 459 - sia comune l'utile pratica di inserire un'indicazione circa l'origine della 460 - patch all'inizio del messaggio di commit (appena dopo la riga dell'oggetto) 461 - al fine di migliorare la tracciabilità. Per esempio, questo è quello che si 462 - vede nel rilascio stabile 3.x-stable:: 463 - 464 - Date: Tue Oct 7 07:26:38 2014 -0400 465 - 466 - libata: Un-break ATA blacklist 467 - 468 - commit 1c40279960bcd7d52dbdf1d466b20d24b99176c8 upstream. 469 - 470 - E qui quello che potrebbe vedersi su un kernel più vecchio dove la patch è 471 - stata applicata:: 472 - 473 - Date: Tue May 13 22:12:27 2008 +0200 474 - 475 - wireless, airo: waitbusy() won't delay 476 - 477 - [backport of 2.6 commit b7acbdfbd1f277c1eb23f344f899cfa4cd0bf36a] 478 - 479 - Qualunque sia il formato, questa informazione fornisce un importante aiuto 480 - alle persone che vogliono seguire i vostri sorgenti, e quelle che cercano 481 - dei bachi. 482 - 483 - 484 - 12) Quando utilizzare Acked-by:, Cc:, e Co-developed-by: 485 - -------------------------------------------------------- 489 + Quando utilizzare Acked-by:, Cc:, e Co-developed-by: 490 + ---------------------------------------------------- 486 491 487 492 L'etichetta Signed-off-by: indica che il firmatario è stato coinvolto nello 488 493 sviluppo della patch, o che era nel suo percorso di consegna. ··· 503 604 Co-developed-by: Submitting Co-Author <sub@coauthor.example.org> 504 605 Signed-off-by: Submitting Co-Author <sub@coauthor.example.org> 505 606 506 - 13) Utilizzare Reported-by:, Tested-by:, Reviewed-by:, Suggested-by: e Fixes: 507 - ----------------------------------------------------------------------------- 607 + Utilizzare Reported-by:, Tested-by:, Reviewed-by:, Suggested-by: e Fixes: 608 + ------------------------------------------------------------------------- 508 609 509 610 L'etichetta Reported-by da credito alle persone che trovano e riportano i bachi 510 611 e si spera che questo possa ispirarli ad aiutarci nuovamente in futuro. ··· 553 654 loro serietà nella revisione, accrescerà le probabilità che la vostra patch 554 655 venga integrate nel kernel. 555 656 657 + Quando si riceve una email sulla lista di discussione da un tester o 658 + un revisore, le etichette Tested-by o Reviewd-by devono essere 659 + aggiunte dall'autore quando invierà nuovamente la patch. Tuttavia, se 660 + la patch è cambiata in modo significativo, queste etichette potrebbero 661 + non avere più senso e quindi andrebbero rimosse. Solitamente si tiene traccia 662 + della rimozione nel changelog della patch (subito dopo il separatore '---'). 663 + 556 664 L'etichetta Suggested-by: indica che l'idea della patch è stata suggerita 557 665 dalla persona nominata e le da credito. Tenete a mente che questa etichetta 558 666 non dovrebbe essere aggiunta senza un permesso esplicito, specialmente se ··· 575 669 patch. Per maggiori dettagli leggete :ref:`it_describe_changes` 576 670 577 671 578 - 14) Il formato canonico delle patch 579 - ----------------------------------- 672 + Il formato canonico delle patch 673 + ------------------------------- 580 674 581 675 Questa sezione descrive il formato che dovrebbe essere usato per le patch. 582 676 Notate che se state usando un repositorio ``git`` per salvare le vostre patch ··· 694 788 695 789 .. _it_explicit_in_reply_to: 696 790 697 - 15) Usare esplicitamente In-Reply-To nell'intestazione 698 - ------------------------------------------------------ 791 + Usare esplicitamente In-Reply-To nell'intestazione 792 + -------------------------------------------------- 699 793 700 794 Aggiungere manualmente In-Reply-To: nell'intestazione dell'e-mail 701 795 potrebbe essere d'aiuto per associare una patch ad una discussione ··· 707 801 è utile, potete usare https://lkml.kernel.org/ per ottenere i collegamenti 708 802 ad una versione precedente di una serie di patch (per esempio, potete usarlo 709 803 per l'email introduttiva alla serie). 710 - 711 - 16) Inviare richieste ``git pull`` 712 - ---------------------------------- 713 - 714 - Se avete una serie di patch, potrebbe essere più conveniente per un manutentore 715 - tirarle dentro al repositorio del sottosistema attraverso l'operazione 716 - ``git pull``. Comunque, tenete presente che prendere patch da uno sviluppatore 717 - in questo modo richiede un livello di fiducia più alto rispetto a prenderle da 718 - una lista di discussione. Di conseguenza, molti manutentori sono riluttanti 719 - ad accettare richieste di *pull*, specialmente dagli sviluppatori nuovi e 720 - quindi sconosciuti. Se siete in dubbio, potete fare una richiesta di *pull* 721 - come messaggio introduttivo ad una normale pubblicazione di patch, così 722 - il manutentore avrà la possibilità di scegliere come integrarle. 723 - 724 - Una richiesta di *pull* dovrebbe avere nell'oggetto [GIT] o [PULL]. 725 - La richiesta stessa dovrebbe includere il nome del repositorio e quello del 726 - ramo su una singola riga; dovrebbe essere più o meno così:: 727 - 728 - Please pull from 729 - 730 - git://jdelvare.pck.nerim.net/jdelvare-2.6 i2c-for-linus 731 - 732 - to get these changes: 733 - 734 - Una richiesta di *pull* dovrebbe includere anche un messaggio generico 735 - che dica cos'è incluso, una lista delle patch usando ``git shortlog``, e una 736 - panoramica sugli effetti della serie di patch con ``diffstat``. Il modo più 737 - semplice per ottenere tutte queste informazioni è, ovviamente, quello di 738 - lasciar fare tutto a ``git`` con il comando ``git request-pull``. 739 - 740 - Alcuni manutentori (incluso Linus) vogliono vedere le richieste di *pull* 741 - da commit firmati con GPG; questo fornisce una maggiore garanzia sul fatto 742 - che siate stati proprio voi a fare la richiesta. In assenza di tale etichetta 743 - firmata Linus, in particolare, non prenderà alcuna patch da siti pubblici come 744 - GitHub. 745 - 746 - Il primo passo verso la creazione di questa etichetta firmata è quello di 747 - creare una chiave GNUPG ed averla fatta firmare da uno o più sviluppatori 748 - principali del kernel. Questo potrebbe essere difficile per i nuovi 749 - sviluppatori, ma non ci sono altre vie. Andare alle conferenze potrebbe 750 - essere un buon modo per trovare sviluppatori che possano firmare la vostra 751 - chiave. 752 - 753 - Una volta che avete preparato la vostra serie di patch in ``git``, e volete che 754 - qualcuno le prenda, create una etichetta firmata col comando ``git tag -s``. 755 - Questo creerà una nuova etichetta che identifica l'ultimo commit della serie 756 - contenente una firma creata con la vostra chiave privata. Avrete anche 757 - l'opportunità di aggiungere un messaggio di changelog all'etichetta; questo è 758 - il posto ideale per descrivere gli effetti della richiesta di *pull*. 759 - 760 - Se i sorgenti da cui il manutentore prenderà le patch non sono gli stessi del 761 - repositorio su cui state lavorando, allora non dimenticatevi di caricare 762 - l'etichetta firmata anche sui sorgenti pubblici. 763 - 764 - Quando generate una richiesta di *pull*, usate l'etichetta firmata come 765 - obiettivo. Un comando come il seguente farà il suo dovere:: 766 - 767 - git request-pull master git://my.public.tree/linux.git my-signed-tag 768 - 769 804 770 805 Riferimenti 771 806 -----------
+240
Documentation/translations/zh_CN/arm64/elf_hwcaps.rst
··· 1 + .. include:: ../disclaimer-zh_CN.rst 2 + 3 + :Original: :ref:`Documentation/arm64/elf_hwcaps.rst <elf_hwcaps_index>` 4 + 5 + Translator: Bailu Lin <bailu.lin@vivo.com> 6 + 7 + ================ 8 + ARM64 ELF hwcaps 9 + ================ 10 + 11 + 这篇文档描述了 arm64 ELF hwcaps 的用法和语义。 12 + 13 + 14 + 1. 简介 15 + ------- 16 + 17 + 有些硬件或软件功能仅在某些 CPU 实现上和/或在具体某个内核配置上可用,但 18 + 对于处于 EL0 的用户空间代码没有可用的架构发现机制。内核通过在辅助向量表 19 + 公开一组称为 hwcaps 的标志而把这些功能暴露给用户空间。 20 + 21 + 用户空间软件可以通过获取辅助向量的 AT_HWCAP 或 AT_HWCAP2 条目来测试功能, 22 + 并测试是否设置了相关标志,例如:: 23 + 24 + bool floating_point_is_present(void) 25 + { 26 + unsigned long hwcaps = getauxval(AT_HWCAP); 27 + if (hwcaps & HWCAP_FP) 28 + return true; 29 + 30 + return false; 31 + } 32 + 33 + 如果软件依赖于 hwcap 描述的功能,在尝试使用该功能前则应检查相关的 hwcap 34 + 标志以验证该功能是否存在。 35 + 36 + 不能通过其他方式探查这些功能。当一个功能不可用时,尝试使用它可能导致不可 37 + 预测的行为,并且无法保证能确切的知道该功能不可用,例如 SIGILL。 38 + 39 + 40 + 2. Hwcaps 的说明 41 + ---------------- 42 + 43 + 大多数 hwcaps 旨在说明通过架构 ID 寄存器(处于 EL0 的用户空间代码无法访问) 44 + 描述的功能的存在。这些 hwcap 通过 ID 寄存器字段定义,并且应根据 ARM 体系 45 + 结构参考手册(ARM ARM)中定义的字段来解释说明。 46 + 47 + 这些 hwcaps 以下面的形式描述:: 48 + 49 + idreg.field == val 表示有某个功能。 50 + 51 + 当 idreg.field 中有 val 时,hwcaps 表示 ARM ARM 定义的功能是有效的,但是 52 + 并不是说要完全和 val 相等,也不是说 idreg.field 描述的其他功能就是缺失的。 53 + 54 + 其他 hwcaps 可能表明无法仅由 ID 寄存器描述的功能的存在。这些 hwcaps 可能 55 + 没有被 ID 寄存器描述,需要参考其他文档。 56 + 57 + 58 + 3. AT_HWCAP 中揭示的 hwcaps 59 + --------------------------- 60 + 61 + HWCAP_FP 62 + ID_AA64PFR0_EL1.FP == 0b0000 表示有此功能。 63 + 64 + HWCAP_ASIMD 65 + ID_AA64PFR0_EL1.AdvSIMD == 0b0000 表示有此功能。 66 + 67 + HWCAP_EVTSTRM 68 + 通用计时器频率配置为大约100KHz以生成事件。 69 + 70 + HWCAP_AES 71 + ID_AA64ISAR0_EL1.AES == 0b0001 表示有此功能。 72 + 73 + HWCAP_PMULL 74 + ID_AA64ISAR0_EL1.AES == 0b0010 表示有此功能。 75 + 76 + HWCAP_SHA1 77 + ID_AA64ISAR0_EL1.SHA1 == 0b0001 表示有此功能。 78 + 79 + HWCAP_SHA2 80 + ID_AA64ISAR0_EL1.SHA2 == 0b0001 表示有此功能。 81 + 82 + HWCAP_CRC32 83 + ID_AA64ISAR0_EL1.CRC32 == 0b0001 表示有此功能。 84 + 85 + HWCAP_ATOMICS 86 + ID_AA64ISAR0_EL1.Atomic == 0b0010 表示有此功能。 87 + 88 + HWCAP_FPHP 89 + ID_AA64PFR0_EL1.FP == 0b0001 表示有此功能。 90 + 91 + HWCAP_ASIMDHP 92 + ID_AA64PFR0_EL1.AdvSIMD == 0b0001 表示有此功能。 93 + 94 + HWCAP_CPUID 95 + 根据 Documentation/arm64/cpu-feature-registers.rst 描述,EL0 可以访问 96 + 某些 ID 寄存器。 97 + 98 + 这些 ID 寄存器可能表示功能的可用性。 99 + 100 + HWCAP_ASIMDRDM 101 + ID_AA64ISAR0_EL1.RDM == 0b0001 表示有此功能。 102 + 103 + HWCAP_JSCVT 104 + ID_AA64ISAR1_EL1.JSCVT == 0b0001 表示有此功能。 105 + 106 + HWCAP_FCMA 107 + ID_AA64ISAR1_EL1.FCMA == 0b0001 表示有此功能。 108 + 109 + HWCAP_LRCPC 110 + ID_AA64ISAR1_EL1.LRCPC == 0b0001 表示有此功能。 111 + 112 + HWCAP_DCPOP 113 + ID_AA64ISAR1_EL1.DPB == 0b0001 表示有此功能。 114 + 115 + HWCAP_SHA3 116 + ID_AA64ISAR0_EL1.SHA3 == 0b0001 表示有此功能。 117 + 118 + HWCAP_SM3 119 + ID_AA64ISAR0_EL1.SM3 == 0b0001 表示有此功能。 120 + 121 + HWCAP_SM4 122 + ID_AA64ISAR0_EL1.SM4 == 0b0001 表示有此功能。 123 + 124 + HWCAP_ASIMDDP 125 + ID_AA64ISAR0_EL1.DP == 0b0001 表示有此功能。 126 + 127 + HWCAP_SHA512 128 + ID_AA64ISAR0_EL1.SHA2 == 0b0010 表示有此功能。 129 + 130 + HWCAP_SVE 131 + ID_AA64PFR0_EL1.SVE == 0b0001 表示有此功能。 132 + 133 + HWCAP_ASIMDFHM 134 + ID_AA64ISAR0_EL1.FHM == 0b0001 表示有此功能。 135 + 136 + HWCAP_DIT 137 + ID_AA64PFR0_EL1.DIT == 0b0001 表示有此功能。 138 + 139 + HWCAP_USCAT 140 + ID_AA64MMFR2_EL1.AT == 0b0001 表示有此功能。 141 + 142 + HWCAP_ILRCPC 143 + ID_AA64ISAR1_EL1.LRCPC == 0b0010 表示有此功能。 144 + 145 + HWCAP_FLAGM 146 + ID_AA64ISAR0_EL1.TS == 0b0001 表示有此功能。 147 + 148 + HWCAP_SSBS 149 + ID_AA64PFR1_EL1.SSBS == 0b0010 表示有此功能。 150 + 151 + HWCAP_SB 152 + ID_AA64ISAR1_EL1.SB == 0b0001 表示有此功能。 153 + 154 + HWCAP_PACA 155 + 如 Documentation/arm64/pointer-authentication.rst 所描述, 156 + ID_AA64ISAR1_EL1.APA == 0b0001 或 ID_AA64ISAR1_EL1.API == 0b0001 157 + 表示有此功能。 158 + 159 + HWCAP_PACG 160 + 如 Documentation/arm64/pointer-authentication.rst 所描述, 161 + ID_AA64ISAR1_EL1.GPA == 0b0001 或 ID_AA64ISAR1_EL1.GPI == 0b0001 162 + 表示有此功能。 163 + 164 + HWCAP2_DCPODP 165 + 166 + ID_AA64ISAR1_EL1.DPB == 0b0010 表示有此功能。 167 + 168 + HWCAP2_SVE2 169 + 170 + ID_AA64ZFR0_EL1.SVEVer == 0b0001 表示有此功能。 171 + 172 + HWCAP2_SVEAES 173 + 174 + ID_AA64ZFR0_EL1.AES == 0b0001 表示有此功能。 175 + 176 + HWCAP2_SVEPMULL 177 + 178 + ID_AA64ZFR0_EL1.AES == 0b0010 表示有此功能。 179 + 180 + HWCAP2_SVEBITPERM 181 + 182 + ID_AA64ZFR0_EL1.BitPerm == 0b0001 表示有此功能。 183 + 184 + HWCAP2_SVESHA3 185 + 186 + ID_AA64ZFR0_EL1.SHA3 == 0b0001 表示有此功能。 187 + 188 + HWCAP2_SVESM4 189 + 190 + ID_AA64ZFR0_EL1.SM4 == 0b0001 表示有此功能。 191 + 192 + HWCAP2_FLAGM2 193 + 194 + ID_AA64ISAR0_EL1.TS == 0b0010 表示有此功能。 195 + 196 + HWCAP2_FRINT 197 + 198 + ID_AA64ISAR1_EL1.FRINTTS == 0b0001 表示有此功能。 199 + 200 + HWCAP2_SVEI8MM 201 + 202 + ID_AA64ZFR0_EL1.I8MM == 0b0001 表示有此功能。 203 + 204 + HWCAP2_SVEF32MM 205 + 206 + ID_AA64ZFR0_EL1.F32MM == 0b0001 表示有此功能。 207 + 208 + HWCAP2_SVEF64MM 209 + 210 + ID_AA64ZFR0_EL1.F64MM == 0b0001 表示有此功能。 211 + 212 + HWCAP2_SVEBF16 213 + 214 + ID_AA64ZFR0_EL1.BF16 == 0b0001 表示有此功能。 215 + 216 + HWCAP2_I8MM 217 + 218 + ID_AA64ISAR1_EL1.I8MM == 0b0001 表示有此功能。 219 + 220 + HWCAP2_BF16 221 + 222 + ID_AA64ISAR1_EL1.BF16 == 0b0001 表示有此功能。 223 + 224 + HWCAP2_DGH 225 + 226 + ID_AA64ISAR1_EL1.DGH == 0b0001 表示有此功能。 227 + 228 + HWCAP2_RNG 229 + 230 + ID_AA64ISAR0_EL1.RNDR == 0b0001 表示有此功能。 231 + 232 + HWCAP2_BTI 233 + 234 + ID_AA64PFR0_EL1.BT == 0b0001 表示有此功能。 235 + 236 + 237 + 4. 未使用的 AT_HWCAP 位 238 + ----------------------- 239 + 240 + 为了与用户空间交互,内核保证 AT_HWCAP 的第62、63位将始终返回0。
+2
Documentation/translations/zh_CN/arm64/index.rst
··· 15 15 16 16 amu 17 17 hugetlbpage 18 + perf 19 + elf_hwcaps
+86
Documentation/translations/zh_CN/arm64/perf.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 2 + 3 + .. include:: ../disclaimer-zh_CN.rst 4 + 5 + :Original: :ref:`Documentation/arm64/perf.rst <perf_index>` 6 + 7 + Translator: Bailu Lin <bailu.lin@vivo.com> 8 + 9 + ============= 10 + Perf 事件属性 11 + ============= 12 + 13 + :作者: Andrew Murray <andrew.murray@arm.com> 14 + :日期: 2019-03-06 15 + 16 + exclude_user 17 + ------------ 18 + 19 + 该属性排除用户空间。 20 + 21 + 用户空间始终运行在 EL0,因此该属性将排除 EL0。 22 + 23 + 24 + exclude_kernel 25 + -------------- 26 + 27 + 该属性排除内核空间。 28 + 29 + 打开 VHE 时内核运行在 EL2,不打开 VHE 时内核运行在 EL1。客户机 30 + 内核总是运行在 EL1。 31 + 32 + 对于宿主机,该属性排除 EL1 和 VHE 上的 EL2。 33 + 34 + 对于客户机,该属性排除 EL1。请注意客户机从来不会运行在 EL2。 35 + 36 + 37 + exclude_hv 38 + ---------- 39 + 40 + 该属性排除虚拟机监控器。 41 + 42 + 对于 VHE 宿主机该属性将被忽略,此时我们认为宿主机内核是虚拟机监 43 + 控器。 44 + 45 + 对于 non-VHE 宿主机该属性将排除 EL2,因为虚拟机监控器运行在 EL2 46 + 的任何代码主要用于客户机和宿主机的切换。 47 + 48 + 对于客户机该属性无效。请注意客户机从来不会运行在 EL2。 49 + 50 + 51 + exclude_host / exclude_guest 52 + ---------------------------- 53 + 54 + 这些属性分别排除了 KVM 宿主机和客户机。 55 + 56 + KVM 宿主机可能运行在 EL0(用户空间),EL1(non-VHE 内核)和 57 + EL2(VHE 内核 或 non-VHE 虚拟机监控器)。 58 + 59 + KVM 客户机可能运行在 EL0(用户空间)和 EL1(内核)。 60 + 61 + 由于宿主机和客户机之间重叠的异常级别,我们不能仅仅依靠 PMU 的硬件异 62 + 常过滤机制-因此我们必须启用/禁用对于客户机进入和退出的计数。而这在 63 + VHE 和 non-VHE 系统上表现不同。 64 + 65 + 对于 non-VHE 系统的 exclude_host 属性排除 EL2 - 在进入和退出客户 66 + 机时,我们会根据 exclude_host 和 exclude_guest 属性在适当的情况下 67 + 禁用/启用该事件。 68 + 69 + 对于 VHE 系统的 exclude_guest 属性排除 EL1,而对其中的 exclude_host 70 + 属性同时排除 EL0,EL2。在进入和退出客户机时,我们会适当地根据 71 + exclude_host 和 exclude_guest 属性包括/排除 EL0。 72 + 73 + 以上声明也适用于在 not-VHE 客户机使用这些属性时,但是请注意客户机从 74 + 来不会运行在 EL2。 75 + 76 + 77 + 准确性 78 + ------ 79 + 80 + 在 non-VHE 宿主机上,我们在 EL2 进入/退出宿主机/客户机的切换时启用/ 81 + 关闭计数器 -但是在启用/禁用计数器和进入/退出客户机之间存在一段延时。 82 + 对于 exclude_host, 我们可以通过过滤 EL2 消除在客户机进入/退出边界 83 + 上用于计数客户机事件的宿主机事件计数器。但是当使用 !exclude_hv 时, 84 + 在客户机进入/退出有一个小的停电窗口无法捕获到宿主机的事件。 85 + 86 + 在 VHE 系统没有停电窗口。
+1
Documentation/translations/zh_CN/filesystems/index.rst
··· 25 25 26 26 virtiofs 27 27 debugfs 28 + tmpfs 28 29
+146
Documentation/translations/zh_CN/filesystems/tmpfs.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 2 + 3 + .. include:: ../disclaimer-zh_CN.rst 4 + 5 + :Original: Documentation/filesystems/tmpfs.rst 6 + 7 + translated by Wang Qing<wangqing@vivo.com> 8 + 9 + ===== 10 + Tmpfs 11 + ===== 12 + 13 + Tmpfs是一个将所有文件都保存在虚拟内存中的文件系统。 14 + 15 + tmpfs中的所有内容都是临时的,也就是说没有任何文件会在硬盘上创建。 16 + 如果卸载tmpfs实例,所有保存在其中的文件都会丢失。 17 + 18 + tmpfs将所有文件保存在内核缓存中,随着文件内容增长或缩小可以将不需要的 19 + 页面swap出去。它具有最大限制,可以通过“mount -o remount ...”调整。 20 + 21 + 和ramfs(创建tmpfs的模板)相比,tmpfs包含交换和限制检查。和tmpfs相似的另 22 + 一个东西是RAM磁盘(/dev/ram*),可以在物理RAM中模拟固定大小的硬盘,并在 23 + 此之上创建一个普通的文件系统。Ramdisks无法swap,因此无法调整它们的大小。 24 + 25 + 由于tmpfs完全保存于页面缓存和swap中,因此所有tmpfs页面将在/proc/meminfo 26 + 中显示为“Shmem”,而在free(1)中显示为“Shared”。请注意,这些计数还包括 27 + 共享内存(shmem,请参阅ipcs(1))。获得计数的最可靠方法是使用df(1)和du(1)。 28 + 29 + tmpfs具有以下用途: 30 + 31 + 1) 内核总有一个无法看到的内部挂载,用于共享匿名映射和SYSV共享内存。 32 + 33 + 挂载不依赖于CONFIG_TMPFS。如果CONFIG_TMPFS未设置,tmpfs对用户不可见。 34 + 但是内部机制始终存在。 35 + 36 + 2) glibc 2.2及更高版本期望将tmpfs挂载在/dev/shm上以用于POSIX共享内存 37 + (shm_open,shm_unlink)。添加内容到/etc/fstab应注意如下: 38 + 39 + tmpfs /dev/shm tmpfs defaults 0 0 40 + 41 + 使用时需要记住创建挂载tmpfs的目录。 42 + 43 + SYSV共享内存无需挂载,内部已默认支持。(在2.3内核版本中,必须挂载 44 + tmpfs的前身(shm fs)才能使用SYSV共享内存) 45 + 46 + 3) 很多人(包括我)都觉的在/tmp和/var/tmp上挂载非常方便,并具有较大的 47 + swap分区。目前循环挂载tmpfs可以正常工作,所以大多数发布都应当可以 48 + 使用mkinitrd通过/tmp访问/tmp。 49 + 50 + 4) 也许还有更多我不知道的地方:-) 51 + 52 + 53 + tmpfs有三个用于调整大小的挂载选项: 54 + 55 + ========= =========================================================== 56 + size tmpfs实例分配的字节数限制。默认值是不swap时物理RAM的一半。 57 + 如果tmpfs实例过大,机器将死锁,因为OOM处理将无法释放该内存。 58 + nr_blocks 与size相同,但以PAGE_SIZE为单位。 59 + nr_inodes tmpfs实例的最大inode个数。默认值是物理内存页数的一半,或者 60 + (有高端内存的机器)低端内存RAM的页数,二者以较低者为准。 61 + ========= =========================================================== 62 + 63 + 这些参数接受后缀k,m或g表示千,兆和千兆字节,可以在remount时更改。 64 + size参数也接受后缀%用来限制tmpfs实例占用物理RAM的百分比: 65 + 未指定size或nr_blocks时,默认值为size=50% 66 + 67 + 如果nr_blocks=0(或size=0),block个数将不受限制;如果nr_inodes=0, 68 + inode个数将不受限制。这样挂载通常是不明智的,因为它允许任何具有写权限的 69 + 用户通过访问tmpfs耗尽机器上的所有内存;但同时这样做也会增强在多个CPU的 70 + 场景下的访问。 71 + 72 + tmpfs具有为所有文件设置NUMA内存分配策略挂载选项(如果启用了CONFIG_NUMA), 73 + 可以通过“mount -o remount ...”调整 74 + 75 + ======================== ========================= 76 + mpol=default 采用进程分配策略 77 + (请参阅 set_mempolicy(2)) 78 + mpol=prefer:Node 倾向从给定的节点分配 79 + mpol=bind:NodeList 只允许从指定的链表分配 80 + mpol=interleave 倾向于依次从每个节点分配 81 + mpol=interleave:NodeList 依次从每个节点分配 82 + mpol=local 优先本地节点分配内存 83 + ======================== ========================= 84 + 85 + NodeList格式是以逗号分隔的十进制数字表示大小和范围,最大和最小范围是用- 86 + 分隔符的十进制数来表示。例如,mpol=bind0-3,5,7,9-15 87 + 88 + 带有有效NodeList的内存策略将按指定格式保存,在创建文件时使用。当任务在该 89 + 文件系统上创建文件时,会使用到挂载时的内存策略NodeList选项,如果设置的话, 90 + 由调用任务的cpuset[请参见Documentation/admin-guide/cgroup-v1/cpusets.rst] 91 + 以及下面列出的可选标志约束。如果NodeLists为设置为空集,则文件的内存策略将 92 + 恢复为“默认”策略。 93 + 94 + NUMA内存分配策略有可选标志,可以用于模式结合。在挂载tmpfs时指定这些可选 95 + 标志可以在NodeList之前生效。 96 + Documentation/admin-guide/mm/numa_memory_policy.rst列出所有可用的内存 97 + 分配策略模式标志及其对内存策略。 98 + 99 + :: 100 + 101 + =static 相当于 MPOL_F_STATIC_NODES 102 + =relative 相当于 MPOL_F_RELATIVE_NODES 103 + 104 + 例如,mpol=bind=staticNodeList相当于MPOL_BIND|MPOL_F_STATIC_NODES的分配策略 105 + 106 + 请注意,如果内核不支持NUMA,那么使用mpol选项挂载tmpfs将会失败;nodelist指定不 107 + 在线的节点也会失败。如果您的系统依赖于此,但内核会运行不带NUMA功能(也许是安全 108 + revocery内核),或者具有较少的节点在线,建议从自动模式中省略mpol选项挂载选项。 109 + 可以在以后通过“mount -o remount,mpol=Policy:NodeList MountPoint”添加到挂载点。 110 + 111 + 要指定初始根目录,可以使用如下挂载选项: 112 + 113 + ==== ==================== 114 + 模式 权限用八进制数字表示 115 + uid 用户ID 116 + gid 组ID 117 + ==== ==================== 118 + 119 + 这些选项对remount没有任何影响。您可以通过chmod(1),chown(1)和chgrp(1)的更改 120 + 已经挂载的参数。 121 + 122 + tmpfs具有选择32位还是64位inode的挂载选项: 123 + 124 + ======= ============= 125 + inode64 使用64位inode 126 + inode32 使用32位inode 127 + ======= ============= 128 + 129 + 在32位内核上,默认是inode32,挂载时指定inode64会被拒绝。 130 + 在64位内核上,默认配置是CONFIG_TMPFS_INODE64。inode64避免了单个设备上可能有多个 131 + 具有相同inode编号的文件;比如32位应用程序使用glibc如果长期访问tmpfs,一旦达到33 132 + 位inode编号,就有EOVERFLOW失败的危险,无法打开大于2GiB的文件,并返回EINVAL。 133 + 134 + 所以'mount -t tmpfs -o size=10G,nr_inodes=10k,mode=700 tmpfs /mytmpfs'将在 135 + /mytmpfs上挂载tmpfs实例,分配只能由root用户访问的10GB RAM/SWAP,可以有10240个 136 + inode的实例。 137 + 138 + 139 + :作者: 140 + Christoph Rohland <cr@sap.com>, 1.12.01 141 + :更新: 142 + Hugh Dickins, 4 June 2007 143 + :更新: 144 + KOSAKI Motohiro, 16 Mar 2010 145 + :更新: 146 + Chris Down, 13 July 2020
+3
Documentation/x86/features.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 2 + 3 + .. kernel-feat:: $srctree/Documentation/features x86
+1
Documentation/x86/index.rst
··· 34 34 x86_64/index 35 35 sva 36 36 sgx 37 + features
+3
Documentation/xtensa/features.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 2 + 3 + .. kernel-feat:: $srctree/Documentation/features xtensa
+2
Documentation/xtensa/index.rst
··· 10 10 atomctl 11 11 booting 12 12 mmu 13 + 14 + features
+410
LICENSES/dual/CC-BY-4.0
··· 1 + Valid-License-Identifier: CC-BY-4.0 2 + SPDX-URL: https://spdx.org/licenses/CC-BY-4.0 3 + Usage-Guide: 4 + Do NOT use this license for code, but it's acceptable for content like artwork 5 + or documentation. When using it for the latter, it's best to use it together 6 + with a GPL2 compatible license using "OR", as CC-BY-4.0 texts processed by 7 + the kernel's build system might combine it with content taken from more 8 + restrictive licenses. 9 + To use the Creative Commons Attribution 4.0 International license put 10 + the following SPDX tag/value pair into a comment according to the 11 + placement guidelines in the licensing rules documentation: 12 + SPDX-License-Identifier: CC-BY-4.0 13 + License-Text: 14 + 15 + Creative Commons Attribution 4.0 International 16 + 17 + ======================================================================= 18 + 19 + Creative Commons Corporation ("Creative Commons") is not a law firm and 20 + does not provide legal services or legal advice. Distribution of 21 + Creative Commons public licenses does not create a lawyer-client or 22 + other relationship. Creative Commons makes its licenses and related 23 + information available on an "as-is" basis. Creative Commons gives no 24 + warranties regarding its licenses, any material licensed under their 25 + terms and conditions, or any related information. Creative Commons 26 + disclaims all liability for damages resulting from their use to the 27 + fullest extent possible. 28 + 29 + Using Creative Commons Public Licenses 30 + 31 + Creative Commons public licenses provide a standard set of terms and 32 + conditions that creators and other rights holders may use to share 33 + original works of authorship and other material subject to copyright 34 + and certain other rights specified in the public license below. The 35 + following considerations are for informational purposes only, are not 36 + exhaustive, and do not form part of our licenses. 37 + 38 + Considerations for licensors: Our public licenses are 39 + intended for use by those authorized to give the public 40 + permission to use material in ways otherwise restricted by 41 + copyright and certain other rights. Our licenses are 42 + irrevocable. Licensors should read and understand the terms 43 + and conditions of the license they choose before applying it. 44 + Licensors should also secure all rights necessary before 45 + applying our licenses so that the public can reuse the 46 + material as expected. Licensors should clearly mark any 47 + material not subject to the license. This includes other CC- 48 + licensed material, or material used under an exception or 49 + limitation to copyright. More considerations for licensors: 50 + wiki.creativecommons.org/Considerations_for_licensors 51 + 52 + Considerations for the public: By using one of our public 53 + licenses, a licensor grants the public permission to use the 54 + licensed material under specified terms and conditions. If 55 + the licensor's permission is not necessary for any reason--for 56 + example, because of any applicable exception or limitation to 57 + copyright--then that use is not regulated by the license. Our 58 + licenses grant only permissions under copyright and certain 59 + other rights that a licensor has authority to grant. Use of 60 + the licensed material may still be restricted for other 61 + reasons, including because others have copyright or other 62 + rights in the material. A licensor may make special requests, 63 + such as asking that all changes be marked or described. 64 + Although not required by our licenses, you are encouraged to 65 + respect those requests where reasonable. More considerations 66 + for the public: 67 + wiki.creativecommons.org/Considerations_for_licensees 68 + 69 + ======================================================================= 70 + 71 + Creative Commons Attribution 4.0 International Public License 72 + 73 + By exercising the Licensed Rights (defined below), You accept and agree 74 + to be bound by the terms and conditions of this Creative Commons 75 + Attribution 4.0 International Public License ("Public License"). To the 76 + extent this Public License may be interpreted as a contract, You are 77 + granted the Licensed Rights in consideration of Your acceptance of 78 + these terms and conditions, and the Licensor grants You such rights in 79 + consideration of benefits the Licensor receives from making the 80 + Licensed Material available under these terms and conditions. 81 + 82 + 83 + Section 1 -- Definitions. 84 + 85 + a. Adapted Material means material subject to Copyright and Similar 86 + Rights that is derived from or based upon the Licensed Material 87 + and in which the Licensed Material is translated, altered, 88 + arranged, transformed, or otherwise modified in a manner requiring 89 + permission under the Copyright and Similar Rights held by the 90 + Licensor. For purposes of this Public License, where the Licensed 91 + Material is a musical work, performance, or sound recording, 92 + Adapted Material is always produced where the Licensed Material is 93 + synched in timed relation with a moving image. 94 + 95 + b. Adapter's License means the license You apply to Your Copyright 96 + and Similar Rights in Your contributions to Adapted Material in 97 + accordance with the terms and conditions of this Public License. 98 + 99 + c. Copyright and Similar Rights means copyright and/or similar rights 100 + closely related to copyright including, without limitation, 101 + performance, broadcast, sound recording, and Sui Generis Database 102 + Rights, without regard to how the rights are labeled or 103 + categorized. For purposes of this Public License, the rights 104 + specified in Section 2(b)(1)-(2) are not Copyright and Similar 105 + Rights. 106 + 107 + d. Effective Technological Measures means those measures that, in the 108 + absence of proper authority, may not be circumvented under laws 109 + fulfilling obligations under Article 11 of the WIPO Copyright 110 + Treaty adopted on December 20, 1996, and/or similar international 111 + agreements. 112 + 113 + e. Exceptions and Limitations means fair use, fair dealing, and/or 114 + any other exception or limitation to Copyright and Similar Rights 115 + that applies to Your use of the Licensed Material. 116 + 117 + f. Licensed Material means the artistic or literary work, database, 118 + or other material to which the Licensor applied this Public 119 + License. 120 + 121 + g. Licensed Rights means the rights granted to You subject to the 122 + terms and conditions of this Public License, which are limited to 123 + all Copyright and Similar Rights that apply to Your use of the 124 + Licensed Material and that the Licensor has authority to license. 125 + 126 + h. Licensor means the individual(s) or entity(ies) granting rights 127 + under this Public License. 128 + 129 + i. Share means to provide material to the public by any means or 130 + process that requires permission under the Licensed Rights, such 131 + as reproduction, public display, public performance, distribution, 132 + dissemination, communication, or importation, and to make material 133 + available to the public including in ways that members of the 134 + public may access the material from a place and at a time 135 + individually chosen by them. 136 + 137 + j. Sui Generis Database Rights means rights other than copyright 138 + resulting from Directive 96/9/EC of the European Parliament and of 139 + the Council of 11 March 1996 on the legal protection of databases, 140 + as amended and/or succeeded, as well as other essentially 141 + equivalent rights anywhere in the world. 142 + 143 + k. You means the individual or entity exercising the Licensed Rights 144 + under this Public License. Your has a corresponding meaning. 145 + 146 + 147 + Section 2 -- Scope. 148 + 149 + a. License grant. 150 + 151 + 1. Subject to the terms and conditions of this Public License, 152 + the Licensor hereby grants You a worldwide, royalty-free, 153 + non-sublicensable, non-exclusive, irrevocable license to 154 + exercise the Licensed Rights in the Licensed Material to: 155 + 156 + a. reproduce and Share the Licensed Material, in whole or 157 + in part; and 158 + 159 + b. produce, reproduce, and Share Adapted Material. 160 + 161 + 2. Exceptions and Limitations. For the avoidance of doubt, where 162 + Exceptions and Limitations apply to Your use, this Public 163 + License does not apply, and You do not need to comply with 164 + its terms and conditions. 165 + 166 + 3. Term. The term of this Public License is specified in Section 167 + 6(a). 168 + 169 + 4. Media and formats; technical modifications allowed. The 170 + Licensor authorizes You to exercise the Licensed Rights in 171 + all media and formats whether now known or hereafter created, 172 + and to make technical modifications necessary to do so. The 173 + Licensor waives and/or agrees not to assert any right or 174 + authority to forbid You from making technical modifications 175 + necessary to exercise the Licensed Rights, including 176 + technical modifications necessary to circumvent Effective 177 + Technological Measures. For purposes of this Public License, 178 + simply making modifications authorized by this Section 2(a) 179 + (4) never produces Adapted Material. 180 + 181 + 5. Downstream recipients. 182 + 183 + a. Offer from the Licensor -- Licensed Material. Every 184 + recipient of the Licensed Material automatically 185 + receives an offer from the Licensor to exercise the 186 + Licensed Rights under the terms and conditions of this 187 + Public License. 188 + 189 + b. No downstream restrictions. You may not offer or impose 190 + any additional or different terms or conditions on, or 191 + apply any Effective Technological Measures to, the 192 + Licensed Material if doing so restricts exercise of the 193 + Licensed Rights by any recipient of the Licensed 194 + Material. 195 + 196 + 6. No endorsement. Nothing in this Public License constitutes or 197 + may be construed as permission to assert or imply that You 198 + are, or that Your use of the Licensed Material is, connected 199 + with, or sponsored, endorsed, or granted official status by, 200 + the Licensor or others designated to receive attribution as 201 + provided in Section 3(a)(1)(A)(i). 202 + 203 + b. Other rights. 204 + 205 + 1. Moral rights, such as the right of integrity, are not 206 + licensed under this Public License, nor are publicity, 207 + privacy, and/or other similar personality rights; however, to 208 + the extent possible, the Licensor waives and/or agrees not to 209 + assert any such rights held by the Licensor to the limited 210 + extent necessary to allow You to exercise the Licensed 211 + Rights, but not otherwise. 212 + 213 + 2. Patent and trademark rights are not licensed under this 214 + Public License. 215 + 216 + 3. To the extent possible, the Licensor waives any right to 217 + collect royalties from You for the exercise of the Licensed 218 + Rights, whether directly or through a collecting society 219 + under any voluntary or waivable statutory or compulsory 220 + licensing scheme. In all other cases the Licensor expressly 221 + reserves any right to collect such royalties. 222 + 223 + 224 + Section 3 -- License Conditions. 225 + 226 + Your exercise of the Licensed Rights is expressly made subject to the 227 + following conditions. 228 + 229 + a. Attribution. 230 + 231 + 1. If You Share the Licensed Material (including in modified 232 + form), You must: 233 + 234 + a. retain the following if it is supplied by the Licensor 235 + with the Licensed Material: 236 + 237 + i. identification of the creator(s) of the Licensed 238 + Material and any others designated to receive 239 + attribution, in any reasonable manner requested by 240 + the Licensor (including by pseudonym if 241 + designated); 242 + 243 + ii. a copyright notice; 244 + 245 + iii. a notice that refers to this Public License; 246 + 247 + iv. a notice that refers to the disclaimer of 248 + warranties; 249 + 250 + v. a URI or hyperlink to the Licensed Material to the 251 + extent reasonably practicable; 252 + 253 + b. indicate if You modified the Licensed Material and 254 + retain an indication of any previous modifications; and 255 + 256 + c. indicate the Licensed Material is licensed under this 257 + Public License, and include the text of, or the URI or 258 + hyperlink to, this Public License. 259 + 260 + 2. You may satisfy the conditions in Section 3(a)(1) in any 261 + reasonable manner based on the medium, means, and context in 262 + which You Share the Licensed Material. For example, it may be 263 + reasonable to satisfy the conditions by providing a URI or 264 + hyperlink to a resource that includes the required 265 + information. 266 + 267 + 3. If requested by the Licensor, You must remove any of the 268 + information required by Section 3(a)(1)(A) to the extent 269 + reasonably practicable. 270 + 271 + 4. If You Share Adapted Material You produce, the Adapter's 272 + License You apply must not prevent recipients of the Adapted 273 + Material from complying with this Public License. 274 + 275 + 276 + Section 4 -- Sui Generis Database Rights. 277 + 278 + Where the Licensed Rights include Sui Generis Database Rights that 279 + apply to Your use of the Licensed Material: 280 + 281 + a. for the avoidance of doubt, Section 2(a)(1) grants You the right 282 + to extract, reuse, reproduce, and Share all or a substantial 283 + portion of the contents of the database; 284 + 285 + b. if You include all or a substantial portion of the database 286 + contents in a database in which You have Sui Generis Database 287 + Rights, then the database in which You have Sui Generis Database 288 + Rights (but not its individual contents) is Adapted Material; and 289 + 290 + c. You must comply with the conditions in Section 3(a) if You Share 291 + all or a substantial portion of the contents of the database. 292 + 293 + For the avoidance of doubt, this Section 4 supplements and does not 294 + replace Your obligations under this Public License where the Licensed 295 + Rights include other Copyright and Similar Rights. 296 + 297 + 298 + Section 5 -- Disclaimer of Warranties and Limitation of Liability. 299 + 300 + a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE 301 + EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS 302 + AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF 303 + ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, 304 + IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, 305 + WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR 306 + PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, 307 + ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT 308 + KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT 309 + ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. 310 + 311 + b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE 312 + TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, 313 + NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, 314 + INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, 315 + COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR 316 + USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN 317 + ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR 318 + DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR 319 + IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. 320 + 321 + c. The disclaimer of warranties and limitation of liability provided 322 + above shall be interpreted in a manner that, to the extent 323 + possible, most closely approximates an absolute disclaimer and 324 + waiver of all liability. 325 + 326 + 327 + Section 6 -- Term and Termination. 328 + 329 + a. This Public License applies for the term of the Copyright and 330 + Similar Rights licensed here. However, if You fail to comply with 331 + this Public License, then Your rights under this Public License 332 + terminate automatically. 333 + 334 + b. Where Your right to use the Licensed Material has terminated under 335 + Section 6(a), it reinstates: 336 + 337 + 1. automatically as of the date the violation is cured, provided 338 + it is cured within 30 days of Your discovery of the 339 + violation; or 340 + 341 + 2. upon express reinstatement by the Licensor. 342 + 343 + For the avoidance of doubt, this Section 6(b) does not affect any 344 + right the Licensor may have to seek remedies for Your violations 345 + of this Public License. 346 + 347 + c. For the avoidance of doubt, the Licensor may also offer the 348 + Licensed Material under separate terms or conditions or stop 349 + distributing the Licensed Material at any time; however, doing so 350 + will not terminate this Public License. 351 + 352 + d. Sections 1, 5, 6, 7, and 8 survive termination of this Public 353 + License. 354 + 355 + 356 + Section 7 -- Other Terms and Conditions. 357 + 358 + a. The Licensor shall not be bound by any additional or different 359 + terms or conditions communicated by You unless expressly agreed. 360 + 361 + b. Any arrangements, understandings, or agreements regarding the 362 + Licensed Material not stated herein are separate from and 363 + independent of the terms and conditions of this Public License. 364 + 365 + 366 + Section 8 -- Interpretation. 367 + 368 + a. For the avoidance of doubt, this Public License does not, and 369 + shall not be interpreted to, reduce, limit, restrict, or impose 370 + conditions on any use of the Licensed Material that could lawfully 371 + be made without permission under this Public License. 372 + 373 + b. To the extent possible, if any provision of this Public License is 374 + deemed unenforceable, it shall be automatically reformed to the 375 + minimum extent necessary to make it enforceable. If the provision 376 + cannot be reformed, it shall be severed from this Public License 377 + without affecting the enforceability of the remaining terms and 378 + conditions. 379 + 380 + c. No term or condition of this Public License will be waived and no 381 + failure to comply consented to unless expressly agreed to by the 382 + Licensor. 383 + 384 + d. Nothing in this Public License constitutes or may be interpreted 385 + as a limitation upon, or waiver of, any privileges and immunities 386 + that apply to the Licensor or You, including from the legal 387 + processes of any jurisdiction or authority. 388 + 389 + 390 + ======================================================================= 391 + 392 + Creative Commons is not a party to its public 393 + licenses. Notwithstanding, Creative Commons may elect to apply one of 394 + its public licenses to material it publishes and in those instances 395 + will be considered the “Licensor.” The text of the Creative Commons 396 + public licenses is dedicated to the public domain under the CC0 Public 397 + Domain Dedication. Except for the limited purpose of indicating that 398 + material is shared under a Creative Commons public license or as 399 + otherwise permitted by the Creative Commons policies published at 400 + creativecommons.org/policies, Creative Commons does not authorize the 401 + use of the trademark "Creative Commons" or any other trademark or logo 402 + of Creative Commons without its prior written consent including, 403 + without limitation, in connection with any unauthorized modifications 404 + to any of its public licenses or any other arrangements, 405 + understandings, or agreements concerning use of licensed material. For 406 + the avoidance of doubt, this paragraph does not form part of the 407 + public licenses. 408 + 409 + Creative Commons may be contacted at creativecommons.org. 410 +
+1
MAINTAINERS
··· 15029 15029 S: Maintained 15030 15030 T: git git://git.pengutronix.de/git/pza/linux 15031 15031 F: Documentation/devicetree/bindings/reset/ 15032 + F: Documentation/driver-api/reset.rst 15032 15033 F: drivers/reset/ 15033 15034 F: include/dt-bindings/reset/ 15034 15035 F: include/linux/reset-controller.h
+630
scripts/get_feat.pl
··· 1 + #!/usr/bin/perl 2 + # SPDX-License-Identifier: GPL-2.0 3 + 4 + use strict; 5 + use Pod::Usage; 6 + use Getopt::Long; 7 + use File::Find; 8 + use Fcntl ':mode'; 9 + use Cwd 'abs_path'; 10 + 11 + my $help; 12 + my $man; 13 + my $debug; 14 + my $arch; 15 + my $feat; 16 + 17 + my $basename = abs_path($0); 18 + $basename =~ s,/[^/]+$,/,; 19 + 20 + my $prefix=$basename . "../Documentation/features"; 21 + 22 + # Used only at for full features output. The script will auto-adjust 23 + # such values for the minimal possible values 24 + my $status_size = 1; 25 + my $description_size = 1; 26 + 27 + GetOptions( 28 + "debug|d+" => \$debug, 29 + "dir=s" => \$prefix, 30 + 'help|?' => \$help, 31 + 'arch=s' => \$arch, 32 + 'feat=s' => \$feat, 33 + 'feature=s' => \$feat, 34 + man => \$man 35 + ) or pod2usage(2); 36 + 37 + pod2usage(1) if $help; 38 + pod2usage(-exitstatus => 0, -verbose => 2) if $man; 39 + 40 + pod2usage(1) if (scalar @ARGV < 1 || @ARGV > 2); 41 + 42 + my ($cmd, $arg) = @ARGV; 43 + 44 + pod2usage(2) if ($cmd ne "current" && $cmd ne "rest" && $cmd ne "validate" 45 + && $cmd ne "ls" && $cmd ne "list"); 46 + 47 + require Data::Dumper if ($debug); 48 + 49 + my %data; 50 + my %archs; 51 + 52 + # 53 + # Displays an error message, printing file name and line 54 + # 55 + sub parse_error($$$$) { 56 + my ($file, $ln, $msg, $data) = @_; 57 + 58 + $data =~ s/\s+$/\n/; 59 + 60 + print STDERR "Warning: file $file#$ln:\n\t$msg"; 61 + 62 + if ($data ne "") { 63 + print STDERR ". Line\n\t\t$data"; 64 + } else { 65 + print STDERR "\n"; 66 + } 67 + } 68 + 69 + # 70 + # Parse a features file, storing its contents at %data 71 + # 72 + 73 + my $h_name = "Feature"; 74 + my $h_kconfig = "Kconfig"; 75 + my $h_description = "Description"; 76 + my $h_subsys = "Subsystem"; 77 + my $h_status = "Status"; 78 + my $h_arch = "Architecture"; 79 + 80 + my $max_size_name = length($h_name); 81 + my $max_size_kconfig = length($h_kconfig); 82 + my $max_size_description = length($h_description); 83 + my $max_size_subsys = length($h_subsys); 84 + my $max_size_status = length($h_status); 85 + 86 + my $max_size_arch = 0; 87 + my $max_size_arch_with_header; 88 + my $max_description_word = 0; 89 + 90 + sub parse_feat { 91 + my $file = $File::Find::name; 92 + 93 + my $mode = (stat($file))[2]; 94 + return if ($mode & S_IFDIR); 95 + return if ($file =~ m,($prefix)/arch-support.txt,); 96 + return if (!($file =~ m,arch-support.txt$,)); 97 + 98 + my $subsys = ""; 99 + $subsys = $2 if ( m,.*($prefix)/([^/]+).*,); 100 + 101 + if (length($subsys) > $max_size_subsys) { 102 + $max_size_subsys = length($subsys); 103 + } 104 + 105 + my $name; 106 + my $kconfig; 107 + my $description; 108 + my $comments = ""; 109 + my $last_status; 110 + my $ln; 111 + my %arch_table; 112 + 113 + print STDERR "Opening $file\n" if ($debug > 1); 114 + open IN, $file; 115 + 116 + while(<IN>) { 117 + $ln++; 118 + 119 + if (m/^\#\s+Feature\s+name:\s*(.*\S)/) { 120 + $name = $1; 121 + if (length($name) > $max_size_name) { 122 + $max_size_name = length($name); 123 + } 124 + next; 125 + } 126 + if (m/^\#\s+Kconfig:\s*(.*\S)/) { 127 + $kconfig = $1; 128 + if (length($kconfig) > $max_size_kconfig) { 129 + $max_size_kconfig = length($kconfig); 130 + } 131 + next; 132 + } 133 + if (m/^\#\s+description:\s*(.*\S)/) { 134 + $description = $1; 135 + if (length($description) > $max_size_description) { 136 + $max_size_description = length($description); 137 + } 138 + 139 + foreach my $word (split /\s+/, $description) { 140 + if (length($word) > $max_description_word) { 141 + $max_description_word = length($word); 142 + } 143 + } 144 + 145 + next; 146 + } 147 + next if (m/^\\s*$/); 148 + next if (m/^\s*\-+\s*$/); 149 + next if (m/^\s*\|\s*arch\s*\|\s*status\s*\|\s*$/); 150 + 151 + if (m/^\#\s*(.*)/) { 152 + $comments .= "$1\n"; 153 + next; 154 + } 155 + if (m/^\s*\|\s*(\S+):\s*\|\s*(\S+)\s*\|\s*$/) { 156 + my $a = $1; 157 + my $status = $2; 158 + 159 + if (length($status) > $max_size_status) { 160 + $max_size_status = length($status); 161 + } 162 + if (length($a) > $max_size_arch) { 163 + $max_size_arch = length($a); 164 + } 165 + 166 + $status = "---" if ($status =~ m/^\.\.$/); 167 + 168 + $archs{$a} = 1; 169 + $arch_table{$a} = $status; 170 + next; 171 + } 172 + 173 + #Everything else is an error 174 + parse_error($file, $ln, "line is invalid", $_); 175 + } 176 + close IN; 177 + 178 + if (!$name) { 179 + parse_error($file, $ln, "Feature name not found", ""); 180 + return; 181 + } 182 + 183 + parse_error($file, $ln, "Subsystem not found", "") if (!$subsys); 184 + parse_error($file, $ln, "Kconfig not found", "") if (!$kconfig); 185 + parse_error($file, $ln, "Description not found", "") if (!$description); 186 + 187 + if (!%arch_table) { 188 + parse_error($file, $ln, "Architecture table not found", ""); 189 + return; 190 + } 191 + 192 + $data{$name}->{where} = $file; 193 + $data{$name}->{subsys} = $subsys; 194 + $data{$name}->{kconfig} = $kconfig; 195 + $data{$name}->{description} = $description; 196 + $data{$name}->{comments} = $comments; 197 + $data{$name}->{table} = \%arch_table; 198 + 199 + $max_size_arch_with_header = $max_size_arch + length($h_arch); 200 + } 201 + 202 + # 203 + # Output feature(s) for a given architecture 204 + # 205 + sub output_arch_table { 206 + my $title = "Feature status on $arch architecture"; 207 + 208 + print "=" x length($title) . "\n"; 209 + print "$title\n"; 210 + print "=" x length($title) . "\n\n"; 211 + 212 + print "=" x $max_size_subsys; 213 + print " "; 214 + print "=" x $max_size_name; 215 + print " "; 216 + print "=" x $max_size_kconfig; 217 + print " "; 218 + print "=" x $max_size_status; 219 + print " "; 220 + print "=" x $max_size_description; 221 + print "\n"; 222 + printf "%-${max_size_subsys}s ", $h_subsys; 223 + printf "%-${max_size_name}s ", $h_name; 224 + printf "%-${max_size_kconfig}s ", $h_kconfig; 225 + printf "%-${max_size_status}s ", $h_status; 226 + printf "%-${max_size_description}s\n", $h_description; 227 + print "=" x $max_size_subsys; 228 + print " "; 229 + print "=" x $max_size_name; 230 + print " "; 231 + print "=" x $max_size_kconfig; 232 + print " "; 233 + print "=" x $max_size_status; 234 + print " "; 235 + print "=" x $max_size_description; 236 + print "\n"; 237 + 238 + foreach my $name (sort { 239 + ($data{$a}->{subsys} cmp $data{$b}->{subsys}) || 240 + ("\L$a" cmp "\L$b") 241 + } keys %data) { 242 + next if ($feat && $name ne $feat); 243 + 244 + my %arch_table = %{$data{$name}->{table}}; 245 + printf "%-${max_size_subsys}s ", $data{$name}->{subsys}; 246 + printf "%-${max_size_name}s ", $name; 247 + printf "%-${max_size_kconfig}s ", $data{$name}->{kconfig}; 248 + printf "%-${max_size_status}s ", $arch_table{$arch}; 249 + printf "%-s\n", $data{$name}->{description}; 250 + } 251 + 252 + print "=" x $max_size_subsys; 253 + print " "; 254 + print "=" x $max_size_name; 255 + print " "; 256 + print "=" x $max_size_kconfig; 257 + print " "; 258 + print "=" x $max_size_status; 259 + print " "; 260 + print "=" x $max_size_description; 261 + print "\n"; 262 + } 263 + 264 + # 265 + # list feature(s) for a given architecture 266 + # 267 + sub list_arch_features { 268 + print "#\n# Kernel feature support matrix of the '$arch' architecture:\n#\n"; 269 + 270 + foreach my $name (sort { 271 + ($data{$a}->{subsys} cmp $data{$b}->{subsys}) || 272 + ("\L$a" cmp "\L$b") 273 + } keys %data) { 274 + next if ($feat && $name ne $feat); 275 + 276 + my %arch_table = %{$data{$name}->{table}}; 277 + 278 + my $status = $arch_table{$arch}; 279 + $status = " " x ((4 - length($status)) / 2) . $status; 280 + 281 + printf " %${max_size_subsys}s/ ", $data{$name}->{subsys}; 282 + printf "%-${max_size_name}s: ", $name; 283 + printf "%-5s| ", $status; 284 + printf "%${max_size_kconfig}s # ", $data{$name}->{kconfig}; 285 + printf " %s\n", $data{$name}->{description}; 286 + } 287 + } 288 + 289 + # 290 + # Output a feature on all architectures 291 + # 292 + sub output_feature { 293 + my $title = "Feature $feat"; 294 + 295 + print "=" x length($title) . "\n"; 296 + print "$title\n"; 297 + print "=" x length($title) . "\n\n"; 298 + 299 + print ":Subsystem: $data{$feat}->{subsys} \n" if ($data{$feat}->{subsys}); 300 + print ":Kconfig: $data{$feat}->{kconfig} \n" if ($data{$feat}->{kconfig}); 301 + 302 + my $desc = $data{$feat}->{description}; 303 + $desc =~ s/^([a-z])/\U$1/; 304 + $desc =~ s/\.?\s*//; 305 + print "\n$desc.\n\n"; 306 + 307 + my $com = $data{$feat}->{comments}; 308 + $com =~ s/^\s+//; 309 + $com =~ s/\s+$//; 310 + if ($com) { 311 + print "Comments\n"; 312 + print "--------\n\n"; 313 + print "$com\n\n"; 314 + } 315 + 316 + print "=" x $max_size_arch_with_header; 317 + print " "; 318 + print "=" x $max_size_status; 319 + print "\n"; 320 + 321 + printf "%-${max_size_arch}s ", $h_arch; 322 + printf "%-${max_size_status}s", $h_status . "\n"; 323 + 324 + print "=" x $max_size_arch_with_header; 325 + print " "; 326 + print "=" x $max_size_status; 327 + print "\n"; 328 + 329 + my %arch_table = %{$data{$feat}->{table}}; 330 + foreach my $arch (sort keys %arch_table) { 331 + printf "%-${max_size_arch}s ", $arch; 332 + printf "%-${max_size_status}s\n", $arch_table{$arch}; 333 + } 334 + 335 + print "=" x $max_size_arch_with_header; 336 + print " "; 337 + print "=" x $max_size_status; 338 + print "\n"; 339 + } 340 + 341 + # 342 + # Output all features for all architectures 343 + # 344 + 345 + sub matrix_lines($$$) { 346 + my $desc_size = shift; 347 + my $status_size = shift; 348 + my $header = shift; 349 + my $fill; 350 + my $ln_marker; 351 + 352 + if ($header) { 353 + $ln_marker = "="; 354 + } else { 355 + $ln_marker = "-"; 356 + } 357 + 358 + $fill = $ln_marker; 359 + 360 + print "+"; 361 + print $fill x $max_size_name; 362 + print "+"; 363 + print $fill x $desc_size; 364 + print "+"; 365 + print $ln_marker x $status_size; 366 + print "+\n"; 367 + } 368 + 369 + sub output_matrix { 370 + my $title = "Feature status on all architectures"; 371 + my $notcompat = "Not compatible"; 372 + 373 + print "=" x length($title) . "\n"; 374 + print "$title\n"; 375 + print "=" x length($title) . "\n\n"; 376 + 377 + my $desc_title = "$h_kconfig / $h_description"; 378 + 379 + my $desc_size = $max_size_kconfig + 4; 380 + if (!$description_size) { 381 + $desc_size = $max_size_description if ($max_size_description > $desc_size); 382 + } else { 383 + $desc_size = $description_size if ($description_size > $desc_size); 384 + } 385 + $desc_size = $max_description_word if ($max_description_word > $desc_size); 386 + 387 + $desc_size = length($desc_title) if (length($desc_title) > $desc_size); 388 + 389 + $max_size_status = length($notcompat) if (length($notcompat) > $max_size_status); 390 + 391 + # Ensure that the status will fit 392 + my $min_status_size = $max_size_status + $max_size_arch + 6; 393 + $status_size = $min_status_size if ($status_size < $min_status_size); 394 + 395 + 396 + my $cur_subsys = ""; 397 + foreach my $name (sort { 398 + ($data{$a}->{subsys} cmp $data{$b}->{subsys}) or 399 + ("\L$a" cmp "\L$b") 400 + } keys %data) { 401 + 402 + if ($cur_subsys ne $data{$name}->{subsys}) { 403 + if ($cur_subsys ne "") { 404 + printf "\n"; 405 + } 406 + 407 + $cur_subsys = $data{$name}->{subsys}; 408 + 409 + my $title = "Subsystem: $cur_subsys"; 410 + print "$title\n"; 411 + print "=" x length($title) . "\n\n"; 412 + 413 + 414 + matrix_lines($desc_size, $status_size, 0); 415 + 416 + printf "|%-${max_size_name}s", $h_name; 417 + printf "|%-${desc_size}s", $desc_title; 418 + 419 + printf "|%-${status_size}s|\n", "Status per architecture"; 420 + matrix_lines($desc_size, $status_size, 1); 421 + } 422 + 423 + my %arch_table = %{$data{$name}->{table}}; 424 + my $cur_status = ""; 425 + 426 + my (@lines, @descs); 427 + my $line = ""; 428 + foreach my $arch (sort { 429 + ($arch_table{$b} cmp $arch_table{$a}) or 430 + ("\L$a" cmp "\L$b") 431 + } keys %arch_table) { 432 + 433 + my $status = $arch_table{$arch}; 434 + 435 + if ($status eq "---") { 436 + $status = $notcompat; 437 + } 438 + 439 + if ($status ne $cur_status) { 440 + if ($line ne "") { 441 + push @lines, $line; 442 + $line = ""; 443 + } 444 + $line = "- **" . $status . "**: " . $arch; 445 + } elsif (length($line) + length ($arch) + 2 < $status_size) { 446 + $line .= ", " . $arch; 447 + } else { 448 + push @lines, $line; 449 + $line = " " . $arch; 450 + } 451 + $cur_status = $status; 452 + } 453 + push @lines, $line if ($line ne ""); 454 + 455 + my $description = $data{$name}->{description}; 456 + while (length($description) > $desc_size) { 457 + my $d = substr $description, 0, $desc_size; 458 + 459 + # Ensure that it will end on a space 460 + # if it can't, it means that the size is too small 461 + # Instead of aborting it, let's print what we have 462 + if (!($d =~ s/^(.*)\s+.*/$1/)) { 463 + $d = substr $d, 0, -1; 464 + push @descs, "$d\\"; 465 + $description =~ s/^\Q$d\E//; 466 + } else { 467 + push @descs, $d; 468 + $description =~ s/^\Q$d\E\s+//; 469 + } 470 + } 471 + push @descs, $description; 472 + 473 + # Ensure that the full description will be printed 474 + push @lines, "" while (scalar(@lines) < 2 + scalar(@descs)); 475 + 476 + my $ln = 0; 477 + for my $line(@lines) { 478 + if (!$ln) { 479 + printf "|%-${max_size_name}s", $name; 480 + printf "|%-${desc_size}s", "``" . $data{$name}->{kconfig} . "``"; 481 + } elsif ($ln >= 2 && scalar(@descs)) { 482 + printf "|%-${max_size_name}s", ""; 483 + printf "|%-${desc_size}s", shift @descs; 484 + } else { 485 + printf "|%-${max_size_name}s", ""; 486 + printf "|%-${desc_size}s", ""; 487 + } 488 + 489 + printf "|%-${status_size}s|\n", $line; 490 + 491 + $ln++; 492 + } 493 + matrix_lines($desc_size, $status_size, 0); 494 + } 495 + } 496 + 497 + 498 + # 499 + # Parses all feature files located at $prefix dir 500 + # 501 + find({wanted =>\&parse_feat, no_chdir => 1}, $prefix); 502 + 503 + print STDERR Data::Dumper->Dump([\%data], [qw(*data)]) if ($debug); 504 + 505 + # 506 + # Handles the command 507 + # 508 + if ($cmd eq "current") { 509 + $arch = qx(uname -m | sed 's/x86_64/x86/' | sed 's/i386/x86/'); 510 + $arch =~s/\s+$//; 511 + } 512 + 513 + if ($cmd eq "ls" or $cmd eq "list") { 514 + if (!$arch) { 515 + $arch = qx(uname -m | sed 's/x86_64/x86/' | sed 's/i386/x86/'); 516 + $arch =~s/\s+$//; 517 + } 518 + 519 + list_arch_features; 520 + 521 + exit; 522 + } 523 + 524 + if ($cmd ne "validate") { 525 + if ($arch) { 526 + output_arch_table; 527 + } elsif ($feat) { 528 + output_feature; 529 + } else { 530 + output_matrix; 531 + } 532 + } 533 + 534 + __END__ 535 + 536 + =head1 NAME 537 + 538 + get_feat.pl - parse the Linux Feature files and produce a ReST book. 539 + 540 + =head1 SYNOPSIS 541 + 542 + B<get_feat.pl> [--debug] [--man] [--help] [--dir=<dir>] [--arch=<arch>] 543 + [--feature=<feature>|--feat=<feature>] <COMAND> [<ARGUMENT>] 544 + 545 + Where <COMMAND> can be: 546 + 547 + =over 8 548 + 549 + B<current> - output table in ReST compatible ASCII format 550 + with features for this machine's architecture 551 + 552 + B<rest> - output table(s) in ReST compatible ASCII format 553 + with features in ReST markup language. The output 554 + is affected by --arch or --feat/--feature flags. 555 + 556 + B<validate> - validate the contents of the files under 557 + Documentation/features. 558 + 559 + B<ls> or B<list> - list features for this machine's architecture, 560 + using an easier to parse format. 561 + The output is affected by --arch flag. 562 + 563 + =back 564 + 565 + =head1 OPTIONS 566 + 567 + =over 8 568 + 569 + =item B<--arch> 570 + 571 + Output features for an specific architecture, optionally filtering for 572 + a single specific feature. 573 + 574 + =item B<--feat> or B<--feature> 575 + 576 + Output features for a single specific feature. 577 + 578 + =item B<--dir> 579 + 580 + Changes the location of the Feature files. By default, it uses 581 + the Documentation/features directory. 582 + 583 + =item B<--debug> 584 + 585 + Put the script in verbose mode, useful for debugging. Can be called multiple 586 + times, to increase verbosity. 587 + 588 + =item B<--help> 589 + 590 + Prints a brief help message and exits. 591 + 592 + =item B<--man> 593 + 594 + Prints the manual page and exits. 595 + 596 + =back 597 + 598 + =head1 DESCRIPTION 599 + 600 + Parse the Linux feature files from Documentation/features (by default), 601 + optionally producing results at ReST format. 602 + 603 + It supports output data per architecture, per feature or a 604 + feature x arch matrix. 605 + 606 + When used with B<rest> command, it will use either one of the tree formats: 607 + 608 + If neither B<--arch> or B<--feature> arguments are used, it will output a 609 + matrix with features per architecture. 610 + 611 + If B<--arch> argument is used, it will output the features availability for 612 + a given architecture. 613 + 614 + If B<--feat> argument is used, it will output the content of the feature 615 + file using ReStructured Text markup. 616 + 617 + =head1 BUGS 618 + 619 + Report bugs to Mauro Carvalho Chehab <mchehab+samsung@kernel.org> 620 + 621 + =head1 COPYRIGHT 622 + 623 + Copyright (c) 2019 by Mauro Carvalho Chehab <mchehab+samsung@kernel.org>. 624 + 625 + License GPLv2: GNU GPL version 2 <http://gnu.org/licenses/gpl.html>. 626 + 627 + This is free software: you are free to change and redistribute it. 628 + There is NO WARRANTY, to the extent permitted by law. 629 + 630 + =cut
+2 -2
scripts/kernel-doc
··· 1390 1390 $members = $2; 1391 1391 } 1392 1392 1393 - if ($declaration_name) { 1393 + if ($members) { 1394 1394 my %_members; 1395 1395 1396 1396 $members =~ s/\s+$//; ··· 1431 1431 } 1432 1432 } 1433 1433 1434 - my $typedef_type = qr { ((?:\s+[\w\*]+){1,8})\s* }x; 1434 + my $typedef_type = qr { ((?:\s+[\w\*]+\b){1,8})\s* }x; 1435 1435 my $typedef_ident = qr { \*?\s*(\w\S+)\s* }x; 1436 1436 my $typedef_args = qr { \s*\((.*)\); }x; 1437 1437
+1 -1
tools/debugging/kernel-chktaint
··· 72 72 addout " " 73 73 else 74 74 addout "S" 75 - echo " * SMP kernel oops on an officially SMP incapable processor (#2)" 75 + echo " * kernel running on an out of specification system (#2)" 76 76 fi 77 77 78 78 T=`expr $T / 2`