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

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

Pull documentation updates from Jonathan Corbet:
"Another not-too-busy cycle for documentation, including:

- Some build-system changes to detect the variable fonts installed by
some distributions that can break the PDF build.

- Various updates and additions to the Spanish, Chinese, Italian, and
Japanese translations.

- Update the stable-kernel rules to match modern practice

... and the usual array of corrections, updates, and typo fixes"

* tag 'docs-6.10' of git://git.lwn.net/linux: (42 commits)
cgroup: Add documentation for missing zswap memory.stat
kernel-doc: Added "*" in $type_constants2 to fix 'make htmldocs' warning.
docs:core-api: fixed typos and grammar in printk-index page
Documentation: tracing: Fix spelling mistakes
docs/zh_CN/rust: Update the translation of quick-start to 6.9-rc4
docs/zh_CN/rust: Update the translation of general-information to 6.9-rc4
docs/zh_CN/rust: Update the translation of coding-guidelines to 6.9-rc4
docs/zh_CN/rust: Update the translation of arch-support to 6.9-rc4
docs: stable-kernel-rules: fix typo sent->send
docs/zh_CN: remove two inconsistent spaces
docs: scripts/check-variable-fonts.sh: Improve commands for detection
docs: stable-kernel-rules: create special tag to flag 'no backporting'
docs: stable-kernel-rules: explain use of stable@kernel.org (w/o @vger.)
docs: stable-kernel-rules: remove code-labels tags and a indention level
docs: stable-kernel-rules: call mainline by its name and change example
docs: stable-kernel-rules: reduce redundancy
docs, kprobes: Add riscv as supported architecture
Docs: typos/spelling
docs: kernel_include.py: Cope with docutils 0.21
docs: ja_JP/howto: Catch up update in v6.8
...

+2298 -273
+1
.mailmap
··· 133 133 Cai Huoqing <cai.huoqing@linux.dev> <caihuoqing@baidu.com> 134 134 Can Guo <quic_cang@quicinc.com> <cang@codeaurora.org> 135 135 Carl Huang <quic_cjhuang@quicinc.com> <cjhuang@codeaurora.org> 136 + Carlos Bilbao <carlos.bilbao.osdev@gmail.com> <carlos.bilbao@amd.com> 136 137 Changbin Du <changbin.du@intel.com> <changbin.du@gmail.com> 137 138 Changbin Du <changbin.du@intel.com> <changbin.du@intel.com> 138 139 Chao Yu <chao@kernel.org> <chao2.yu@samsung.com>
+6 -1
Documentation/Makefile
··· 28 28 PDFLATEX = xelatex 29 29 LATEXOPTS = -interaction=batchmode -no-shell-escape 30 30 31 + # For denylisting "variable font" files 32 + # Can be overridden by setting as an env variable 33 + FONTS_CONF_DENY_VF ?= $(HOME)/deny-vf 34 + 31 35 ifeq ($(findstring 1, $(KBUILD_VERBOSE)),) 32 36 SPHINXOPTS += "-q" 33 37 endif ··· 155 151 156 152 else # HAVE_PDFLATEX 157 153 154 + pdfdocs: DENY_VF = XDG_CONFIG_HOME=$(FONTS_CONF_DENY_VF) 158 155 pdfdocs: latexdocs 159 156 @$(srctree)/scripts/sphinx-pre-install --version-check 160 157 $(foreach var,$(SPHINXDIRS), \ 161 - $(MAKE) PDFLATEX="$(PDFLATEX)" LATEXOPTS="$(LATEXOPTS)" -C $(BUILDDIR)/$(var)/latex || exit; \ 158 + $(MAKE) PDFLATEX="$(PDFLATEX)" LATEXOPTS="$(LATEXOPTS)" $(DENY_VF) -C $(BUILDDIR)/$(var)/latex || sh $(srctree)/scripts/check-variable-fonts.sh || exit; \ 162 159 mkdir -p $(BUILDDIR)/$(var)/pdf; \ 163 160 mv $(subst .tex,.pdf,$(wildcard $(BUILDDIR)/$(var)/latex/*.tex)) $(BUILDDIR)/$(var)/pdf/; \ 164 161 )
+9
Documentation/admin-guide/cgroup-v2.rst
··· 1572 1572 pglazyfreed (npn) 1573 1573 Amount of reclaimed lazyfree pages 1574 1574 1575 + zswpin 1576 + Number of pages moved in to memory from zswap. 1577 + 1578 + zswpout 1579 + Number of pages moved out of memory to zswap. 1580 + 1581 + zswpwb 1582 + Number of pages written from zswap to swap. 1583 + 1575 1584 thp_fault_alloc (npn) 1576 1585 Number of transparent hugepages which were allocated to satisfy 1577 1586 a page fault. This counter is not present when CONFIG_TRANSPARENT_HUGEPAGE
+2 -2
Documentation/admin-guide/hw-vuln/core-scheduling.rst
··· 67 67 will be performed for all tasks in the task group of ``pid``. 68 68 69 69 arg5: 70 - userspace pointer to an unsigned long for storing the cookie returned by 71 - ``PR_SCHED_CORE_GET`` command. Should be 0 for all other commands. 70 + userspace pointer to an unsigned long long for storing the cookie returned 71 + by ``PR_SCHED_CORE_GET`` command. Should be 0 for all other commands. 72 72 73 73 In order for a process to push a cookie to, or pull a cookie from a process, it 74 74 is required to have the ptrace access mode: `PTRACE_MODE_READ_REALCREDS` to the
+1 -1
Documentation/admin-guide/hw-vuln/srso.rst
··· 135 135 disable the mitigation with spec_rstack_overflow=off. 136 136 137 137 Similarly, 'Mitigation: IBPB' is another full mitigation type employing 138 - an indrect branch prediction barrier after having applied the required 138 + an indirect branch prediction barrier after having applied the required 139 139 microcode patch for one's system. This mitigation comes also at 140 140 a performance cost. 141 141
+5 -7
Documentation/admin-guide/kernel-parameters.txt
··· 4173 4173 4174 4174 page_alloc.shuffle= 4175 4175 [KNL] Boolean flag to control whether the page allocator 4176 - should randomize its free lists. The randomization may 4177 - be automatically enabled if the kernel detects it is 4178 - running on a platform with a direct-mapped memory-side 4179 - cache, and this parameter can be used to 4180 - override/disable that behavior. The state of the flag 4181 - can be read from sysfs at: 4176 + should randomize its free lists. This parameter can be 4177 + used to enable/disable page randomization. The state of 4178 + the flag can be read from sysfs at: 4182 4179 /sys/module/page_alloc/parameters/shuffle. 4180 + This parameter is only available if CONFIG_SHUFFLE_PAGE_ALLOCATOR=y. 4183 4181 4184 4182 page_owner= [KNL,EARLY] Boot-time page_owner enabling option. 4185 4183 Storage of the information about who allocated ··· 7351 7353 This can be changed after boot by writing to the 7352 7354 matching /sys/module/workqueue/parameters file. All 7353 7355 workqueues with the "default" affinity scope will be 7354 - updated accordignly. 7356 + updated accordingly. 7355 7357 7356 7358 workqueue.debug_force_rr_cpu 7357 7359 Workqueue used to implicitly guarantee that work
+1 -1
Documentation/admin-guide/mm/ksm.rst
··· 308 308 ``advisor_target_scan_time`` parameter. This parameter sets the target time to 309 309 scan all the KSM candidate pages. The parameter ``advisor_target_scan_time`` 310 310 decides how aggressive the scan time advisor scans candidate pages. Lower 311 - values make the scan time advisor to scan more aggresively. This is the most 311 + values make the scan time advisor to scan more aggressively. This is the most 312 312 important parameter for the configuration of the scan time advisor. 313 313 314 314 The initial value and the maximum value can be changed with
+5 -5
Documentation/admin-guide/reporting-regressions.rst
··· 42 42 -------------------- 43 43 44 44 45 - What is a "regression" and what is the "no regressions rule"? 45 + What is a "regression" and what is the "no regressions" rule? 46 46 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 47 47 48 48 It's a regression if some application or practical use case running fine with 49 49 one Linux kernel works worse or not at all with a newer version compiled using a 50 - similar configuration. The "no regressions rule" forbids this to take place; if 50 + similar configuration. The "no regressions" rule forbids this to take place; if 51 51 it happens by accident, developers that caused it are expected to quickly fix 52 52 the issue. 53 53 ··· 173 173 ------------------------------------ 174 174 175 175 176 - What is the goal of the "no regressions rule"? 176 + What is the goal of the "no regressions" rule? 177 177 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 178 178 179 179 Users should feel safe when updating kernel versions and not have to worry ··· 199 199 turned out to be wrong when they assumed a particular situation was warranting 200 200 an exception. 201 201 202 - Who ensures the "no regressions" is actually followed? 203 - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 202 + Who ensures the "no regressions" rule is actually followed? 203 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 204 204 205 205 The subsystem maintainers should take care of that, which are watched and 206 206 supported by the tree maintainers -- e.g. Linus Torvalds for mainline and
+1 -1
Documentation/arch/m68k/buddha-driver.rst
··· 173 173 the timing will always be mode 0 8-bit compatible, no matter 174 174 what you have selected in the speed register: 175 175 176 - 781ns select, IOR/IOW after 4 clock cycles (=314ns) aktive. 176 + 781ns select, IOR/IOW after 4 clock cycles (=314ns) active. 177 177 178 178 All the timings with a very short select-signal (the 355ns 179 179 fast accesses) depend on the accelerator card used in the
+1 -1
Documentation/arch/sparc/oradax/dax-hv-api.txt
··· 41 41 submissions until they succeed; waiting for an outstanding CCB to complete is not necessary, and would 42 42 not be a guarantee that a future submission would succeed. 43 43 44 - The availablility of DAX coprocessor command service is indicated by the presence of the DAX virtual 44 + The availability of DAX coprocessor command service is indicated by the presence of the DAX virtual 45 45 device node in the guest MD (Section 8.24.17, “Database Analytics Accelerators (DAX) virtual-device 46 46 node”). 47 47
+1 -1
Documentation/arch/x86/xstate.rst
··· 138 138 Dynamic features in signal frames 139 139 --------------------------------- 140 140 141 - Dynamcally enabled features are not written to the signal frame upon signal 141 + Dynamically enabled features are not written to the signal frame upon signal 142 142 entry if the feature is in its initial configuration. This differs from 143 143 non-dynamic features which are always written regardless of their 144 144 configuration. Signal handlers can examine the XSAVE buffer's XSTATE_BV
+22 -2
Documentation/core-api/dma-api-howto.rst
··· 203 203 that performance is bad or that the device is not even detected, you can ask 204 204 them for the kernel messages to find out exactly why. 205 205 206 - The standard 64-bit addressing device would do something like this:: 206 + The 24-bit addressing device would do something like this:: 207 207 208 - if (dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64))) { 208 + if (dma_set_mask_and_coherent(dev, DMA_BIT_MASK(24))) { 209 209 dev_warn(dev, "mydev: No suitable DMA available\n"); 210 210 goto ignore_this_device; 211 211 } 212 + 213 + The standard 64-bit addressing device would do something like this:: 214 + 215 + dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64)) 216 + 217 + dma_set_mask_and_coherent() never return fail when DMA_BIT_MASK(64). Typical 218 + error code like:: 219 + 220 + /* Wrong code */ 221 + if (dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64))) 222 + dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32)) 223 + 224 + dma_set_mask_and_coherent() will never return failure when bigger than 32. 225 + So typical code like:: 226 + 227 + /* Recommended code */ 228 + if (support_64bit) 229 + dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64)); 230 + else 231 + dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32)); 212 232 213 233 If the device only supports 32-bit addressing for descriptors in the 214 234 coherent allocations, but supports full 64-bits for streaming mappings
+1 -1
Documentation/core-api/entry.rst
··· 18 18 Non-instrumentable code - noinstr 19 19 --------------------------------- 20 20 21 - Most instrumentation facilities depend on RCU, so intrumentation is prohibited 21 + Most instrumentation facilities depend on RCU, so instrumentation is prohibited 22 22 for entry code before RCU starts watching and exit code after RCU stops 23 23 watching. In addition, many architectures must save and restore register state, 24 24 which means that (for example) a breakpoint in the breakpoint entry code would
+2 -2
Documentation/core-api/printk-index.rst
··· 4 4 Printk Index 5 5 ============ 6 6 7 - There are many ways how to monitor the state of the system. One important 7 + There are many ways to monitor the state of the system. One important 8 8 source of information is the system log. It provides a lot of information, 9 9 including more or less important warnings and error messages. 10 10 ··· 101 101 102 102 Only few subsystem specific wrappers have been updated so far, 103 103 for example, dev_printk(). As a result, the printk formats from 104 - some subsystes can be missing in the printk index. 104 + some subsystems can be missing in the printk index. 105 105 106 106 107 107 Subsystem specific prefix
+1 -1
Documentation/doc-guide/parse-headers.rst
··· 61 61 *********** 62 62 63 63 64 - Convert a C header or source file (C_FILE), into a ReStructured Text 64 + Convert a C header or source file (C_FILE), into a reStructuredText 65 65 included via ..parsed-literal block with cross-references for the 66 66 documentation files that describe the API. It accepts an optional 67 67 EXCEPTIONS_FILE with describes what elements will be either ignored or
+1 -1
Documentation/driver-api/mtd/nand_ecc.rst
··· 462 462 Analysis 3 463 463 ========== 464 464 465 - Very weird. Guess it has to do with caching or instruction parallellism 465 + Very weird. Guess it has to do with caching or instruction parallelism 466 466 or so. I also tried on an eeePC (Celeron, clocked at 900 Mhz). Interesting 467 467 observation was that this one is only 30% slower (according to time) 468 468 executing the code as my 3Ghz D920 processor.
+1 -1
Documentation/driver-api/scsi.rst
··· 259 259 high-end systems. 260 260 261 261 The SAS transport class contains common code to deal with SAS HBAs, an 262 - aproximated representation of SAS topologies in the driver model, and 262 + approximated representation of SAS topologies in the driver model, and 263 263 various sysfs attributes to expose these topologies and management 264 264 interfaces to userspace. 265 265
+1 -1
Documentation/driver-api/usb/usb.rst
··· 422 422 423 423 USBDEVFS_GET_SPEED 424 424 Returns the speed of the device. The speed is returned as a 425 - nummerical value in accordance with enum usb_device_speed 425 + numerical value in accordance with enum usb_device_speed 426 426 427 427 File modification time is not updated by this request. 428 428
+1 -1
Documentation/driver-api/wbrf.rst
··· 68 68 can be enabled for the device. 69 69 2. Call `amd_wbrf_register_notifier` to register for notification 70 70 of frequency band change(add or remove) from other producers. 71 - 3. Call the `amd_wbrf_retrieve_freq_band` initally to retrieve 71 + 3. Call the `amd_wbrf_retrieve_freq_band` initially to retrieve 72 72 current active frequency bands considering some producers may broadcast 73 73 such information before the consumer is up. 74 74 4. On receiving a notification for frequency band change, run
+2 -2
Documentation/filesystems/directory-locking.rst
··· 44 44 * decide which of the source and target need to be locked. 45 45 The source needs to be locked if it's a non-directory, target - if it's 46 46 a non-directory or about to be removed. 47 - * take the locks that need to be taken (exlusive), in inode pointer order 47 + * take the locks that need to be taken (exclusive), in inode pointer order 48 48 if need to take both (that can happen only when both source and target 49 49 are non-directories - the source because it wouldn't need to be locked 50 50 otherwise and the target because mixing directory and non-directory is ··· 234 234 neither of the children is a descendent of another. 235 235 236 236 That concludes the proof, since the set of operations with the 237 - properties requiered for a minimal deadlock can not exist. 237 + properties required for a minimal deadlock can not exist. 238 238 239 239 Note that the check for having a common ancestor in cross-directory 240 240 rename is crucial - without it a deadlock would be possible. Indeed,
+2 -2
Documentation/filesystems/porting.rst
··· 858 858 859 859 **mandatory** 860 860 861 - [should've been added in 2016] stale comment in finish_open() nonwithstanding, 861 + [should've been added in 2016] stale comment in finish_open() notwithstanding, 862 862 failure exits in ->atomic_open() instances should *NOT* fput() the file, 863 863 no matter what. Everything is handled by the caller. 864 864 ··· 989 989 find the owning superblock of any additional devices. 990 990 991 991 In the old mechanism reusing or creating a superblock for a racing mount(2) and 992 - umount(2) relied on the file_system_type as the holder. This was severly 992 + umount(2) relied on the file_system_type as the holder. This was severely 993 993 underdocumented however: 994 994 995 995 (1) Any concurrent mounter that managed to grab an active reference on an
+1 -1
Documentation/index.rst
··· 107 107 108 108 There are several unsorted documents that don't seem to fit on other parts 109 109 of the documentation body, or may require some adjustments and/or conversion 110 - to ReStructured Text format, or are simply too old. 110 + to reStructuredText format, or are simply too old. 111 111 112 112 .. toctree:: 113 113 :maxdepth: 1
+1 -1
Documentation/mm/slub.rst
··· 80 80 81 81 Debugging options may require the minimum possible slab order to increase as 82 82 a result of storing the metadata (for example, caches with PAGE_SIZE object 83 - sizes). This has a higher liklihood of resulting in slab allocation errors 83 + sizes). This has a higher likelihood of resulting in slab allocation errors 84 84 in low memory situations or if there's high fragmentation of memory. To 85 85 switch off debugging for such caches by default, use:: 86 86
+1 -1
Documentation/process/handling-regressions.rst
··· 284 284 Check out Documentation/admin-guide/reporting-regressions.rst, it covers a lot 285 285 of other aspects you want might want to be aware of: 286 286 287 - * the purpose of the "no regressions rule" 287 + * the purpose of the "no regressions" rule 288 288 289 289 * what issues actually qualify as regression 290 290
+110 -124
Documentation/process/stable-kernel-rules.rst
··· 6 6 Rules on what kind of patches are accepted, and which ones are not, into the 7 7 "-stable" tree: 8 8 9 - - It or an equivalent fix must already exist in Linus' tree (upstream). 10 - - It must be obviously correct and tested. 11 - - It cannot be bigger than 100 lines, with context. 12 - - It must follow the 13 - :ref:`Documentation/process/submitting-patches.rst <submittingpatches>` 14 - rules. 15 - - It must either fix a real bug that bothers people or just add a device ID. 16 - To elaborate on the former: 9 + - It or an equivalent fix must already exist in Linux mainline (upstream). 10 + - It must be obviously correct and tested. 11 + - It cannot be bigger than 100 lines, with context. 12 + - It must follow the 13 + :ref:`Documentation/process/submitting-patches.rst <submittingpatches>` 14 + rules. 15 + - It must either fix a real bug that bothers people or just add a device ID. 16 + To elaborate on the former: 17 17 18 - - It fixes a problem like an oops, a hang, data corruption, a real security 19 - issue, a hardware quirk, a build error (but not for things marked 20 - CONFIG_BROKEN), or some "oh, that's not good" issue. 21 - - Serious issues as reported by a user of a distribution kernel may also 22 - be considered if they fix a notable performance or interactivity issue. 23 - As these fixes are not as obvious and have a higher risk of a subtle 24 - regression they should only be submitted by a distribution kernel 25 - maintainer and include an addendum linking to a bugzilla entry if it 26 - exists and additional information on the user-visible impact. 27 - - No "This could be a problem..." type of things like a "theoretical race 28 - condition", unless an explanation of how the bug can be exploited is also 29 - provided. 30 - - No "trivial" fixes without benefit for users (spelling changes, whitespace 31 - cleanups, etc). 18 + - It fixes a problem like an oops, a hang, data corruption, a real security 19 + issue, a hardware quirk, a build error (but not for things marked 20 + CONFIG_BROKEN), or some "oh, that's not good" issue. 21 + - Serious issues as reported by a user of a distribution kernel may also 22 + be considered if they fix a notable performance or interactivity issue. 23 + As these fixes are not as obvious and have a higher risk of a subtle 24 + regression they should only be submitted by a distribution kernel 25 + maintainer and include an addendum linking to a bugzilla entry if it 26 + exists and additional information on the user-visible impact. 27 + - No "This could be a problem..." type of things like a "theoretical race 28 + condition", unless an explanation of how the bug can be exploited is also 29 + provided. 30 + - No "trivial" fixes without benefit for users (spelling changes, whitespace 31 + cleanups, etc). 32 32 33 33 34 34 Procedure for submitting patches to the -stable tree ··· 42 42 43 43 There are three options to submit a change to -stable trees: 44 44 45 - 1. Add a 'stable tag' to the description of a patch you then submit for 46 - mainline inclusion. 47 - 2. Ask the stable team to pick up a patch already mainlined. 48 - 3. Submit a patch to the stable team that is equivalent to a change already 49 - mainlined. 45 + 1. Add a 'stable tag' to the description of a patch you then submit for 46 + mainline inclusion. 47 + 2. Ask the stable team to pick up a patch already mainlined. 48 + 3. Submit a patch to the stable team that is equivalent to a change already 49 + mainlined. 50 50 51 51 The sections below describe each of the options in more detail. 52 52 ··· 68 68 ******** 69 69 70 70 To have a patch you submit for mainline inclusion later automatically picked up 71 - for stable trees, add the tag 71 + for stable trees, add this tag in the sign-off area:: 72 72 73 - .. code-block:: none 73 + Cc: stable@vger.kernel.org 74 74 75 - Cc: stable@vger.kernel.org 75 + Use ``Cc: stable@kernel.org`` instead when fixing unpublished vulnerabilities: 76 + it reduces the chance of accidentally exposing the fix to the public by way of 77 + 'git send-email', as mails sent to that address are not delivered anywhere. 76 78 77 - in the sign-off area. Once the patch is mainlined it will be applied to the 78 - stable tree without anything else needing to be done by the author or 79 - subsystem maintainer. 79 + Once the patch is mainlined it will be applied to the stable tree without 80 + anything else needing to be done by the author or subsystem maintainer. 80 81 81 - To sent additional instructions to the stable team, use a shell-style inline 82 - comment: 82 + To send additional instructions to the stable team, use a shell-style inline 83 + comment to pass arbitrary or predefined notes: 83 84 84 - * To specify any additional patch prerequisites for cherry picking use the 85 - following format in the sign-off area: 85 + * Specify any additional patch prerequisites for cherry picking:: 86 86 87 - .. code-block:: none 87 + Cc: <stable@vger.kernel.org> # 3.3.x: a1f84a3: sched: Check for idle 88 + Cc: <stable@vger.kernel.org> # 3.3.x: 1b9508f: sched: Rate-limit newidle 89 + Cc: <stable@vger.kernel.org> # 3.3.x: fd21073: sched: Fix affinity logic 90 + Cc: <stable@vger.kernel.org> # 3.3.x 91 + Signed-off-by: Ingo Molnar <mingo@elte.hu> 88 92 89 - Cc: <stable@vger.kernel.org> # 3.3.x: a1f84a3: sched: Check for idle 90 - Cc: <stable@vger.kernel.org> # 3.3.x: 1b9508f: sched: Rate-limit newidle 91 - Cc: <stable@vger.kernel.org> # 3.3.x: fd21073: sched: Fix affinity logic 92 - Cc: <stable@vger.kernel.org> # 3.3.x 93 - Signed-off-by: Ingo Molnar <mingo@elte.hu> 93 + The tag sequence has the meaning of:: 94 94 95 - The tag sequence has the meaning of: 95 + git cherry-pick a1f84a3 96 + git cherry-pick 1b9508f 97 + git cherry-pick fd21073 98 + git cherry-pick <this commit> 96 99 97 - .. code-block:: none 100 + Note that for a patch series, you do not have to list as prerequisites the 101 + patches present in the series itself. For example, if you have the following 102 + patch series:: 98 103 99 - git cherry-pick a1f84a3 100 - git cherry-pick 1b9508f 101 - git cherry-pick fd21073 102 - git cherry-pick <this commit> 104 + patch1 105 + patch2 103 106 104 - Note that for a patch series, you do not have to list as prerequisites the 105 - patches present in the series itself. For example, if you have the following 106 - patch series: 107 + where patch2 depends on patch1, you do not have to list patch1 as 108 + prerequisite of patch2 if you have already marked patch1 for stable 109 + inclusion. 107 110 108 - .. code-block:: none 111 + * Point out kernel version prerequisites:: 109 112 110 - patch1 111 - patch2 113 + Cc: <stable@vger.kernel.org> # 3.3.x 112 114 113 - where patch2 depends on patch1, you do not have to list patch1 as 114 - prerequisite of patch2 if you have already marked patch1 for stable 115 - inclusion. 115 + The tag has the meaning of:: 116 116 117 - * For patches that may have kernel version prerequisites specify them using 118 - the following format in the sign-off area: 117 + git cherry-pick <this commit> 119 118 120 - .. code-block:: none 119 + For each "-stable" tree starting with the specified version. 121 120 122 - Cc: <stable@vger.kernel.org> # 3.3.x 121 + Note, such tagging is unnecessary if the stable team can derive the 122 + appropriate versions from Fixes: tags. 123 123 124 - The tag has the meaning of: 124 + * Delay pick up of patches:: 125 125 126 - .. code-block:: none 126 + Cc: <stable@vger.kernel.org> # after -rc3 127 127 128 - git cherry-pick <this commit> 128 + * Point out known problems:: 129 129 130 - For each "-stable" tree starting with the specified version. 130 + Cc: <stable@vger.kernel.org> # see patch description, needs adjustments for <= 6.3 131 131 132 - Note, such tagging is unnecessary if the stable team can derive the 133 - appropriate versions from Fixes: tags. 132 + There furthermore is a variant of the stable tag you can use to make the stable 133 + team's backporting tools (e.g AUTOSEL or scripts that look for commits 134 + containing a 'Fixes:' tag) ignore a change:: 134 135 135 - * To delay pick up of patches, use the following format: 136 - 137 - .. code-block:: none 138 - 139 - Cc: <stable@vger.kernel.org> # after 4 weeks in mainline 140 - 141 - * For any other requests, just add a note to the stable tag. This for example 142 - can be used to point out known problems: 143 - 144 - .. code-block:: none 145 - 146 - Cc: <stable@vger.kernel.org> # see patch description, needs adjustments for <= 6.3 136 + Cc: <stable+noautosel@kernel.org> # reason goes here, and must be present 147 137 148 138 .. _option_2: 149 139 ··· 153 163 Send the patch, after verifying that it follows the above rules, to 154 164 stable@vger.kernel.org and mention the kernel versions you wish it to be applied 155 165 to. When doing so, you must note the upstream commit ID in the changelog of your 156 - submission with a separate line above the commit text, like this: 166 + submission with a separate line above the commit text, like this:: 157 167 158 - .. code-block:: none 168 + commit <sha1> upstream. 159 169 160 - commit <sha1> upstream. 170 + Or alternatively:: 161 171 162 - or alternatively: 163 - 164 - .. code-block:: none 165 - 166 - [ Upstream commit <sha1> ] 172 + [ Upstream commit <sha1> ] 167 173 168 174 If the submitted patch deviates from the original upstream patch (for example 169 175 because it had to be adjusted for the older API), this must be very clearly ··· 180 194 Review cycle 181 195 ------------ 182 196 183 - - When the -stable maintainers decide for a review cycle, the patches will be 184 - sent to the review committee, and the maintainer of the affected area of 185 - the patch (unless the submitter is the maintainer of the area) and CC: to 186 - the linux-kernel mailing list. 187 - - The review committee has 48 hours in which to ACK or NAK the patch. 188 - - If the patch is rejected by a member of the committee, or linux-kernel 189 - members object to the patch, bringing up issues that the maintainers and 190 - members did not realize, the patch will be dropped from the queue. 191 - - The ACKed patches will be posted again as part of release candidate (-rc) 192 - to be tested by developers and testers. 193 - - Usually only one -rc release is made, however if there are any outstanding 194 - issues, some patches may be modified or dropped or additional patches may 195 - be queued. Additional -rc releases are then released and tested until no 196 - issues are found. 197 - - Responding to the -rc releases can be done on the mailing list by sending 198 - a "Tested-by:" email with any testing information desired. The "Tested-by:" 199 - tags will be collected and added to the release commit. 200 - - At the end of the review cycle, the new -stable release will be released 201 - containing all the queued and tested patches. 202 - - Security patches will be accepted into the -stable tree directly from the 203 - security kernel team, and not go through the normal review cycle. 204 - Contact the kernel security team for more details on this procedure. 197 + - When the -stable maintainers decide for a review cycle, the patches will be 198 + sent to the review committee, and the maintainer of the affected area of 199 + the patch (unless the submitter is the maintainer of the area) and CC: to 200 + the linux-kernel mailing list. 201 + - The review committee has 48 hours in which to ACK or NAK the patch. 202 + - If the patch is rejected by a member of the committee, or linux-kernel 203 + members object to the patch, bringing up issues that the maintainers and 204 + members did not realize, the patch will be dropped from the queue. 205 + - The ACKed patches will be posted again as part of release candidate (-rc) 206 + to be tested by developers and testers. 207 + - Usually only one -rc release is made, however if there are any outstanding 208 + issues, some patches may be modified or dropped or additional patches may 209 + be queued. Additional -rc releases are then released and tested until no 210 + issues are found. 211 + - Responding to the -rc releases can be done on the mailing list by sending 212 + a "Tested-by:" email with any testing information desired. The "Tested-by:" 213 + tags will be collected and added to the release commit. 214 + - At the end of the review cycle, the new -stable release will be released 215 + containing all the queued and tested patches. 216 + - Security patches will be accepted into the -stable tree directly from the 217 + security kernel team, and not go through the normal review cycle. 218 + Contact the kernel security team for more details on this procedure. 205 219 206 220 207 221 Trees 208 222 ----- 209 223 210 - - The queues of patches, for both completed versions and in progress 211 - versions can be found at: 224 + - The queues of patches, for both completed versions and in progress 225 + versions can be found at: 212 226 213 - https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git 227 + https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git 214 228 215 - - The finalized and tagged releases of all stable kernels can be found 216 - in separate branches per version at: 229 + - The finalized and tagged releases of all stable kernels can be found 230 + in separate branches per version at: 217 231 218 - https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git 232 + https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git 219 233 220 - - The release candidate of all stable kernel versions can be found at: 234 + - The release candidate of all stable kernel versions can be found at: 221 235 222 - https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/ 236 + https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/ 223 237 224 - .. warning:: 225 - The -stable-rc tree is a snapshot in time of the stable-queue tree and 226 - will change frequently, hence will be rebased often. It should only be 227 - used for testing purposes (e.g. to be consumed by CI systems). 238 + .. warning:: 239 + The -stable-rc tree is a snapshot in time of the stable-queue tree and 240 + will change frequently, hence will be rebased often. It should only be 241 + used for testing purposes (e.g. to be consumed by CI systems). 228 242 229 243 230 244 Review committee 231 245 ---------------- 232 246 233 - - This is made up of a number of kernel developers who have volunteered for 234 - this task, and a few that haven't. 247 + - This is made up of a number of kernel developers who have volunteered for 248 + this task, and a few that haven't.
+1 -1
Documentation/security/SCTP.rst
··· 81 81 destination addresses. 82 82 83 83 SCTP_SENDMSG_CONNECT - Initiate a connection that is generated by a 84 - sendmsg(2) or sctp_sendmsg(3) on a new asociation. 84 + sendmsg(2) or sctp_sendmsg(3) on a new association. 85 85 86 86 SCTP_PRIMARY_ADDR - Set local primary address. 87 87
+1 -1
Documentation/security/snp-tdx-threat-model.rst
··· 4 4 5 5 .. contents:: :local: 6 6 7 - By: Elena Reshetova <elena.reshetova@intel.com> and Carlos Bilbao <carlos.bilbao@amd.com> 7 + By: Elena Reshetova <elena.reshetova@intel.com> and Carlos Bilbao <carlos.bilbao.osdev@gmail.com> 8 8 9 9 Motivation 10 10 ==========
-1
Documentation/sphinx/kernel_include.py
··· 97 97 # HINT: this is the only line I had to change / commented out: 98 98 #path = utils.relative_path(None, path) 99 99 100 - path = nodes.reprunicode(path) 101 100 encoding = self.options.get( 102 101 'encoding', self.state.document.settings.input_encoding) 103 102 e_handler=self.state.document.settings.input_encoding_error_handler
+5 -4
Documentation/sphinx/kerneldoc-preamble.sty
··· 215 215 due to the lack of suitable font families and/or the texlive-xecjk 216 216 package. 217 217 218 - If you want them, please install ``Noto Sans CJK'' font families 219 - along with the texlive-xecjk package by following instructions from 218 + If you want them, please install non-variable ``Noto Sans CJK'' 219 + font families along with the texlive-xecjk package by following 220 + instructions from 220 221 \sphinxcode{./scripts/sphinx-pre-install}. 221 - Having optional ``Noto Serif CJK'' font families will improve 222 - the looks of those translations. 222 + Having optional non-variable ``Noto Serif CJK'' font families will 223 + improve the looks of those translations. 223 224 \end{sphinxadmonition}} 224 225 \newcommand{\kerneldocEndSC}{} 225 226 \newcommand{\kerneldocBeginTC}[1]{}
+2 -2
Documentation/trace/fprobetrace.rst
··· 74 74 -------------------------- 75 75 Function arguments can be accessed at exit probe using $arg<N> fetcharg. This 76 76 is useful to record the function parameter and return value at once, and 77 - trace the difference of structure fields (for debuging a function whether it 77 + trace the difference of structure fields (for debugging a function whether it 78 78 correctly updates the given data structure or not) 79 79 See the :ref:`sample<fprobetrace_exit_args_sample>` below for how it works. 80 80 ··· 248 248 cat-143 [007] ...1. 1945.720616: vfs_open__entry: (vfs_open+0x4/0x40) mode=0x1 inode=0x0 249 249 cat-143 [007] ...1. 1945.728263: vfs_open__exit: (do_open+0x274/0x3d0 <- vfs_open) mode=0xa800d inode=0xffff888004ada8d8 250 250 251 - You can see the `file::f_mode` and `file::f_inode` are upated in `vfs_open()`. 251 + You can see the `file::f_mode` and `file::f_inode` are updated in `vfs_open()`.
+1 -1
Documentation/trace/ftrace.rst
··· 1968 1968 One common case that people are interested in tracing is the 1969 1969 time it takes for a task that is woken to actually wake up. 1970 1970 Now for non Real-Time tasks, this can be arbitrary. But tracing 1971 - it none the less can be interesting. 1971 + it nonetheless can be interesting. 1972 1972 1973 1973 Without function tracing:: 1974 1974
+1
Documentation/trace/kprobes.rst
··· 322 322 - s390 323 323 - parisc 324 324 - loongarch 325 + - riscv 325 326 326 327 Configuring Kprobes 327 328 ===================
+1 -1
Documentation/trace/kprobetrace.rst
··· 74 74 ------------------------------- 75 75 Function arguments can be accessed at kretprobe using $arg<N> fetcharg. This 76 76 is useful to record the function parameter and return value at once, and 77 - trace the difference of structure fields (for debuging a function whether it 77 + trace the difference of structure fields (for debugging a function whether it 78 78 correctly updates the given data structure or not). 79 79 See the :ref:`sample<fprobetrace_exit_args_sample>` in fprobe event for how 80 80 it works.
+1 -1
Documentation/trace/tracepoints.rst
··· 27 27 28 28 You can put tracepoints at important locations in the code. They are 29 29 lightweight hooks that can pass an arbitrary number of parameters, 30 - which prototypes are described in a tracepoint declaration placed in a 30 + whose prototypes are described in a tracepoint declaration placed in a 31 31 header file. 32 32 33 33 They can be used for tracing and performance accounting.
Documentation/translations/it_IT/admin-guide/security-bugs.rst Documentation/translations/it_IT/process/security-bugs.rst
+5 -5
Documentation/translations/it_IT/doc-guide/kernel-doc.rst
··· 180 180 se provate a formattare bene il vostro testo come nel seguente esempio:: 181 181 182 182 * Return: 183 - * 0 - OK 184 - * -EINVAL - invalid argument 185 - * -ENOMEM - out of memory 183 + * %0 - OK 184 + * %-EINVAL - invalid argument 185 + * %-ENOMEM - out of memory 186 186 187 187 le righe verranno unite e il risultato sarà:: 188 188 ··· 192 192 utilizzare una lista ReST, ad esempio:: 193 193 194 194 * Return: 195 - * * 0 - OK to runtime suspend the device 196 - * * -EBUSY - Device should not be runtime suspended 195 + * * %0 - OK to runtime suspend the device 196 + * * %-EBUSY - Device should not be runtime suspended 197 197 198 198 #) Se il vostro testo ha delle righe che iniziano con una frase seguita dai 199 199 due punti, allora ognuna di queste frasi verrà considerata come il nome
+1 -1
Documentation/translations/it_IT/index.rst
··· 132 132 133 133 Ci sono documenti che sono difficili da inserire nell'attuale organizzazione 134 134 della documentazione; altri hanno bisogno di essere migliorati e/o convertiti 135 - nel formato *ReStructured Text*; altri sono semplicamente troppo vecchi. 135 + nel formato *reStructuredText*; altri sono semplicamente troppo vecchi.
+6 -3
Documentation/translations/it_IT/process/2.Process.rst
··· 462 462 di far domande. Molti sviluppatori possono divenire impazienti con le 463 463 persone che chiaramente non hanno svolto i propri compiti a casa. 464 464 465 - - Evitate il *top-posting* (cioè la pratica di mettere la vostra risposta sopra 466 - alla frase alla quale state rispondendo). Ciò renderebbe la vostra risposta 467 - difficile da leggere e genera scarsa impressione. 465 + - Rispondete sotto alla porzione di righe citate, così da dare un contesto alle 466 + vostre risposte, e quindi renderle più leggibili (in altre parole, evitate di 467 + rispondere in cima, ovvero prima del testo citato). Per maggiori dettagli 468 + leggete :ref:`Documentation/translations/it_IT/process/submitting-patches.rst 469 + <it_interleaved_replies>`. 470 + 468 471 469 472 - Chiedete nella lista di discussione corretta. Linux-kernel può essere un 470 473 punto di incontro generale, ma non è il miglior posto dove trovare
+4
Documentation/translations/it_IT/process/4.Coding.rst
··· 72 72 :ref:`Documentation/translations/it_IT/process/clang-format.rst <clangformat>` 73 73 per maggiori dettagli 74 74 75 + Se utilizzate un programma compatibile con EditorConfig, allora alcune 76 + configurazioni basilari come l'indentazione e la fine delle righe verranno 77 + applicate automaticamente. Per maggiori informazioni consultate la pagina: 78 + https://editorconfig.org/ 75 79 76 80 Livelli di astrazione 77 81 *********************
+19
Documentation/translations/it_IT/process/7.AdvancedTopics.rst
··· 160 160 e verificherà che vi siate ricordati di pubblicare quelle patch su un 161 161 server pubblico. 162 162 163 + .. _development_advancedtopics_reviews_it: 164 + 163 165 Revisionare le patch 164 166 -------------------- 165 167 ··· 182 180 il *lock* in questo percorso?" funziona sempre molto meglio che 183 181 "qui la sincronizzazione è sbagliata". 184 182 183 + In caso di disaccordi, può essere utile chiedere una terza opinione. Se dopo 184 + pochi scambi la discussione raggiunge un punto morto, allora chiedete ai 185 + manutentori o altri revisori di partecipare esprimendo la loro opinione. Spesso 186 + vige un silenzio assenso per cui gli altri revisori non intervengono se non gli 187 + viene richiesto esplicitamente. L'opinione di più persone avrà sicuramente un 188 + peso maggiore. 189 + 185 190 Diversi sviluppatori revisioneranno il codice con diversi punti di vista. 186 191 Alcuni potrebbero concentrarsi principalmente sullo stile del codice e se 187 192 alcune linee hanno degli spazio bianchi di troppo. Altri si chiederanno ··· 198 189 in altri contesti, documentazione, effetti negativi sulle prestazioni, cambi 199 190 all'ABI dello spazio utente, eccetera. Qualunque tipo di revisione è ben 200 191 accetta e di valore, se porta ad avere un codice migliore nel kernel. 192 + 193 + Non esistono requisiti particolarmente stringenti per l'uso di etichette come 194 + ``Reviewd-by``. Tuttavia, perché la revisione sia efficace ci si aspetta un 195 + qualche tipo di messaggio che dica "ho verificato A, B e C nel codice che è 196 + appena stato inviato e mi sembra tutto in ordine". Inoltre, questo permette ai 197 + manutentori di prendere conoscenza circa una revisione avvenuta per davvero. 198 + 199 + Per finire, la revisione delle patch può diventare un processo negativo, troppo 200 + focalizzato sulla ricerca dei problemi. Provate a fare qualche complimento di 201 + tanto in tanto, specialmente con i nuovi arrivati.
+24 -12
Documentation/translations/it_IT/process/changes.rst
··· 34 34 ====================== ================= ======================================== 35 35 GNU C 5.1 gcc --version 36 36 Clang/LLVM (optional) 11.0.0 clang --version 37 + Rust (opzionale) 1.74.1 rustc --version 38 + bindgen (opzionale) 0.65.1 bindgen --version 37 39 GNU make 3.81 make --version 38 40 bash 4.2 bash --version 39 41 binutils 2.25 ld -v 40 42 flex 2.5.35 flex --version 41 43 bison 2.0 bison --version 42 44 pahole 1.16 pahole --version 43 - util-linux 2.10o fdformat --version 45 + util-linux 2.10o mount --version 44 46 kmod 13 depmod -V 45 47 e2fsprogs 1.41.4 e2fsck -V 46 48 jfsutils 1.1.3 fsck.jfs -V ··· 61 59 iptables 1.4.2 iptables -V 62 60 openssl & libcrypto 1.0.0 openssl version 63 61 bc 1.06.95 bc --version 64 - Sphinx\ [#f1]_ 1.7 sphinx-build --version 62 + Sphinx\ [#f1]_ 2.4.4 sphinx-build --version 65 63 cpio any cpio --version 64 + GNU tar 1.28 tar --version 65 + gtags (opzionale) 6.6.5 gtags --version 66 66 ====================== ================= ======================================== 67 67 68 68 .. [#f1] Sphinx è necessario solo per produrre la documentazione del Kernel ··· 155 151 kernel 3.7 e successivi. Vi serviranno anche i pacchetti di sviluppo di 156 152 openssl per compilare il kernel 4.3 o successivi. 157 153 154 + Tar 155 + --- 156 + 157 + GNU Tar è necessario per accedere ai file d'intestazione del kernel usando sysfs 158 + (CONFIG_IKHEADERS) 159 + 160 + gtags / GNU GLOBAL (opzionale) 161 + ------------------------------ 162 + 163 + Il programma GNU GLOBAL versione 6.6.5, o successiva, è necessario quando si 164 + vuole eseguire ``make gtags`` e generare i relativi indici. Internamente si fa 165 + uso del parametro gtags ``-C (--directory)`` che compare in questa versione. 158 166 159 167 Strumenti di sistema 160 168 ******************** ··· 450 434 JFSutils 451 435 -------- 452 436 453 - - <http://jfs.sourceforge.net/> 437 + - <https://jfs.sourceforge.net/> 454 438 455 439 Reiserfsprogs 456 440 ------------- ··· 471 455 Quota-tools 472 456 ----------- 473 457 474 - - <http://sourceforge.net/projects/linuxquota/> 458 + - <https://sourceforge.net/projects/linuxquota/> 475 459 476 460 477 461 Microcodice Intel P6 ··· 492 476 mcelog 493 477 ------ 494 478 495 - - <http://www.mcelog.org/> 479 + - <https://www.mcelog.org/> 496 480 497 481 cpio 498 482 ---- ··· 513 497 NFS-utils 514 498 --------- 515 499 516 - - <http://sourceforge.net/project/showfiles.php?group_id=14> 500 + - <https://sourceforge.net/project/showfiles.php?group_id=14> 501 + - <https://nfs.sourceforge.net/> 517 502 518 503 Iptables 519 504 -------- ··· 529 512 OProfile 530 513 -------- 531 514 532 - - <http://oprofile.sf.net/download/> 533 - 534 - NFS-Utils 535 - --------- 536 - 537 - - <http://nfs.sourceforge.net/> 515 + - <https://oprofile.sf.net/download/> 538 516 539 517 Documentazione del kernel 540 518 *************************
+9 -3
Documentation/translations/it_IT/process/coding-style.rst
··· 214 214 215 215 e 216 216 217 - .. code-block:: none 217 + .. code-block:: c 218 218 219 219 if (condition) 220 220 do_this(); ··· 652 652 sensati. Per fare quest'ultima cosa, potete appiccicare il codice che 653 653 segue nel vostro file .emacs: 654 654 655 - .. code-block:: none 655 + .. code-block:: elisp 656 656 657 657 (defun c-lineup-arglist-tabs-only (ignored) 658 658 "Line up argument lists by tabs, not spaces" ··· 728 728 Per maggiori dettagli, consultate il file 729 729 :ref:`Documentation/translations/it_IT/process/clang-format.rst <it_clangformat>`. 730 730 731 + Se utilizzate un programma compatibile con EditorConfig, allora alcune 732 + configurazioni basilari come l'indentazione e la fine delle righe verranno 733 + applicate automaticamente. Per maggiori informazioni consultate la pagina: 734 + https://editorconfig.org/ 731 735 732 736 10) File di configurazione Kconfig 733 737 ---------------------------------- ··· 902 898 dispositivi e ai driver, e che siano etichettati correttamente: dev_err(), 903 899 dev_warn(), dev_info(), e così via. Per messaggi che non sono associati ad 904 900 alcun dispositivo, <linux/printk.h> definisce pr_info(), pr_warn(), pr_err(), 905 - eccetera. 901 + eccetera. Quando tutto funziona correttamente, non dovrebbero esserci stampe, 902 + per cui preferite dev_dbg/pr_debug a meno che non sia qualcosa di sbagliato 903 + da segnalare. 906 904 907 905 Tirar fuori un buon messaggio di debug può essere una vera sfida; e quando 908 906 l'avete può essere d'enorme aiuto per risolvere problemi da remoto.
+1 -1
Documentation/translations/it_IT/process/deprecated.rst
··· 86 86 Se questo tipo di allocatore non è disponibile, allora dovrebbero essere usate 87 87 le funzioni del tipo *saturate-on-overflow*:: 88 88 89 - bar = vmalloc(array_size(count, size)); 89 + bar = dma_alloc_coherent(dev, array_size(count, size), &dma, GFP_KERNEL); 90 90 91 91 Un altro tipico caso da evitare è quello di calcolare la dimensione di una 92 92 struttura seguita da un vettore di altre strutture, come nel seguente caso::
+3 -3
Documentation/translations/it_IT/process/howto.rst
··· 85 85 Quando un cambiamento del kernel genera anche un cambiamento nell'interfaccia 86 86 con lo spazio utente, è raccomandabile che inviate una notifica o una 87 87 correzione alle pagine *man* spiegando tale modifica agli amministratori di 88 - queste pagine all'indirizzo mtk.manpages@gmail.com, aggiungendo 89 - in CC la lista linux-api@vger.kernel.org. 88 + queste pagine all'indirizzo alx@kernel.org, aggiungendo in CC la 89 + lista linux-api@vger.kernel.org. 90 90 91 91 Di seguito una lista di file che sono presenti nei sorgente del kernel e che 92 92 è richiesto che voi leggiate: ··· 144 144 dello sviluppo di Linux ed è molto importante per le persone che arrivano 145 145 da esperienze con altri Sistemi Operativi. 146 146 147 - :ref:`Documentation/translations/it_IT/admin-guide/security-bugs.rst <it_securitybugs>` 147 + :ref:`Documentation/translations/it_IT/process/security-bugs.rst <it_securitybugs>` 148 148 Se ritenete di aver trovato un problema di sicurezza nel kernel Linux, 149 149 seguite i passaggi scritti in questo documento per notificarlo agli 150 150 sviluppatori del kernel, ed aiutare la risoluzione del problema.
+57 -11
Documentation/translations/it_IT/process/index.rst
··· 21 21 22 22 Di seguito le guide che ogni sviluppatore dovrebbe leggere. 23 23 24 + Introduzione al funzionamento dello sviluppo del kernel 25 + ------------------------------------------------------- 26 + 27 + Innanzitutto, leggete questi documenti che vi aiuteranno ad entrare nella 28 + comunità del kernel. 29 + 24 30 .. toctree:: 25 31 :maxdepth: 1 26 32 27 33 howto 28 - code-of-conduct 29 34 development-process 30 35 submitting-patches 36 + submit-checklist 37 + 38 + Strumenti e guide tecniche per gli sviluppatori del kernel 39 + ---------------------------------------------------------- 40 + 41 + Quella che segue è una raccolta di documenti che uno sviluppatore del kernel 42 + Linux dovrebbe conoscere. 43 + 44 + .. toctree:: 45 + :maxdepth: 1 46 + 47 + changes 31 48 programming-language 32 49 coding-style 33 50 maintainer-pgp-guide 34 51 email-clients 52 + applying-patches 53 + adding-syscalls 54 + volatile-considered-harmful 55 + botching-up-ioctls 56 + 57 + Politiche e dichiarazioni degli sviluppatori 58 + -------------------------------------------- 59 + 60 + Quelle che seguono rappresentano le regole che cerchiamo di seguire all'interno 61 + della comunità del kernel (e oltre). 62 + 63 + .. toctree:: 64 + :maxdepth: 1 65 + 66 + code-of-conduct 35 67 kernel-enforcement-statement 36 68 kernel-driver-statement 69 + stable-api-nonsense 70 + stable-kernel-rules 71 + management-style 72 + 73 + Gestire i bachi 74 + --------------- 75 + 76 + I bachi sono parte della nostra vita; dunque è importante che vengano trattati 77 + con riguardo. I documenti che seguono descrivono le nostre politiche riguardo al 78 + trattamento di alcune classi particolari di bachi: le regressioni e i problemi 79 + di sicurezza. 80 + 81 + Informazioni per i manutentori 82 + ------------------------------ 83 + 84 + Come trovare le persone che accetteranno le vostre modifiche. 85 + 86 + .. toctree:: 87 + :maxdepth: 1 88 + 89 + maintainers 90 + 91 + Altri documenti 92 + --------------- 37 93 38 94 Poi ci sono altre guide sulla comunità che sono di interesse per molti 39 95 degli sviluppatori: ··· 97 41 .. toctree:: 98 42 :maxdepth: 1 99 43 100 - changes 101 - stable-api-nonsense 102 - management-style 103 - stable-kernel-rules 104 - submit-checklist 105 44 kernel-docs 106 - maintainers 107 45 108 46 Ed infine, qui ci sono alcune guide più tecniche che son state messe qua solo 109 47 perché non si è trovato un posto migliore. ··· 105 55 .. toctree:: 106 56 :maxdepth: 1 107 57 108 - applying-patches 109 - adding-syscalls 110 58 magic-number 111 - volatile-considered-harmful 112 - botching-up-ioctls 113 59 clang-format 114 60 ../riscv/patch-acceptance 115 61
+1 -1
Documentation/translations/it_IT/process/stable-kernel-rules.rst
··· 44 44 .. note:: 45 45 Una patch di sicurezza non dovrebbe essere gestita (solamente) dal processo 46 46 di revisione -stable, ma dovrebbe seguire le procedure descritte in 47 - :ref:`Documentation/translations/it_IT/admin-guide/security-bugs.rst <it_securitybugs>`. 47 + :ref:`Documentation/translations/it_IT/process/security-bugs.rst <it_securitybugs>`. 48 48 49 49 Per tutte le altre sottomissioni, scegliere una delle seguenti procedure 50 50 ------------------------------------------------------------------------
+27
Documentation/translations/it_IT/process/submitting-patches.rst
··· 349 349 le raccomandazioni sui programmi di posta elettronica e l'etichetta da usare 350 350 sulle liste di discussione. 351 351 352 + .. _it_interleaved_replies: 353 + 354 + Rispondere alle email in riga e riducendo la citazioni 355 + ------------------------------------------------------ 356 + 357 + Nelle discussioni riguardo allo sviluppo del kernel viene fortemente scoraggiato 358 + l'uso di risposte in cima ai messaggi di posta elettronica. Rispondere in riga 359 + rende le conversazioni molto più scorrevoli. Maggiori dettagli possono essere 360 + trovati qui: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style 361 + 362 + Come spesso citato nelle liste di discussione:: 363 + 364 + R: http://en.wikipedia.org/wiki/Top_post 365 + D: Dove posso trovare informazioni riguardo alle "risposte in cima"? 366 + R: Perché incasina il normale ordine con cui si legge un testo. 367 + D: Perché è così terribile rispondere in cima? 368 + R: Risposte in cima. 369 + Q: Qual è la cosa più fastidiosa nei messaggi di posta elettronica? 370 + 371 + Allo stesso modo, per favore eliminate tutte le citazioni non necessarie per la 372 + vostra risposta. Questo permette di trovare più facilmente le risposte, e 373 + permette di risparmiare tempo e spazio. Per maggiori dettagli: 374 + http://daringfireball.net/2007/07/on_top :: 375 + 376 + R: No. 377 + D: Dovrei includere un blocco di citazione dopo la mia risposta? 378 + 352 379 .. _it_resend_reminders: 353 380 354 381 Non scoraggiatevi - o impazientitevi
+1 -1
Documentation/translations/ja_JP/process/howto.rst
··· 110 110 新しいドキュメントファイルも追加することを勧めます。 111 111 カーネルの変更が、カーネルがユーザ空間に公開しているインターフェイスの 112 112 変更を引き起こす場合、その変更を説明するマニュアルページのパッチや情報 113 - をマニュアルページのメンテナ mtk.manpages@gmail.com に送り、CC を 113 + をマニュアルページのメンテナ alx@kernel.org に送り、CC を 114 114 linux-api@vger.kernel.org に送ることを勧めます。 115 115 116 116 以下はカーネルソースツリーに含まれている読んでおくべきファイルの一覧で
+1 -1
Documentation/translations/sp_SP/index.rst
··· 7 7 8 8 \kerneldocCJKoff 9 9 10 - :maintainer: Carlos Bilbao <carlos.bilbao@amd.com> 10 + :maintainer: Carlos Bilbao <carlos.bilbao.osdev@gmail.com> 11 11 12 12 .. _sp_disclaimer: 13 13
+2 -2
Documentation/translations/sp_SP/memory-barriers.txt
··· 1 1 NOTE: 2 2 This is a version of Documentation/memory-barriers.txt translated into 3 - Spanish by Carlos Bilbao <carlos.bilbao@amd.com>. If you find any 3 + Spanish by Carlos Bilbao <carlos.bilbao.osdev@gmail.com>. If you find any 4 4 difference between this document and the original file or a problem with 5 5 the translation, please contact the maintainer of this file. Please also 6 6 note that the purpose of this file is to be easier to read for non English ··· 18 18 Will Deacon <will.deacon@arm.com> 19 19 Peter Zijlstra <peterz@infradead.org> 20 20 21 - Traducido por: Carlos Bilbao <carlos.bilbao@amd.com> 21 + Traducido por: Carlos Bilbao <carlos.bilbao.osdev@gmail.com> 22 22 Nota: Si tiene alguna duda sobre la exactitud del contenido de esta 23 23 traducción, la única referencia válida es la documentación oficial en 24 24 inglés.
+302
Documentation/translations/sp_SP/process/1.Intro.rst
··· 1 + .. include:: ../disclaimer-sp.rst 2 + 3 + :Original: Documentation/process/1.Intro.rst 4 + :Translator: Avadhut Naik <avadhut.naik@amd.com> 5 + 6 + .. _sp_development_process_intro: 7 + 8 + Introducción 9 + ============ 10 + 11 + Resumen ejecutivo 12 + ----------------- 13 + 14 + El resto de esta sección cubre el alcance del proceso de desarrollo del 15 + kernel y los tipos de frustraciones que los desarrolladores y sus 16 + empleadores pueden encontrar allí. Hay muchas razones por las que el 17 + código del kernel debe fusionarse con el kernel oficial (“mainline”), 18 + incluyendo la disponibilidad automática para los usuarios, el apoyo de la 19 + comunidad en muchas formas, y la capacidad de influir en la dirección del 20 + desarrollo del kernel. El código contribuido al kernel de Linux debe 21 + estar disponible bajo una licencia compatible con GPL. 22 + 23 + :ref:`sp_development_process` introduce el proceso de desarrollo, el ciclo 24 + de lanzamiento del kernel y la mecánica de la "ventana de combinación" 25 + (merge window). Se cubren las distintas fases en el desarrollo del parche, 26 + la revisión y, el ciclo de fusión. Hay algunas discusiones sobre 27 + herramientas y listas de correo. Se anima a los desarrolladores que deseen 28 + comenzar con el desarrollo del kernel a encontrar y corregir errores como 29 + ejercicio inicial. 30 + 31 + :ref:`sp_development_early_stage` cubre la planificación de proyectos en 32 + etapas tempranas, con énfasis en involucrar a la comunidad de desarrollo 33 + lo antes posible. 34 + 35 + :ref:`sp_development_coding` trata sobre el proceso de codificación. Se 36 + discuten varios escollos encontrados por otros desarrolladores. Se cubren 37 + algunos requisitos para los parches, y hay una introducción a algunas de 38 + las herramientas que pueden ayudar a garantizar que los parches del kernel 39 + sean correctos. 40 + 41 + :ref:`sp_development_posting` trata sobre el proceso de enviar parches para 42 + su revisión. Para ser tomados en serio por la comunidad de desarrollo, 43 + los parches deben estar correctamente formateados y descritos, y deben 44 + enviarse al lugar correcto. Seguir los consejos de esta sección debería 45 + ayudar a garantizar la mejor recepción posible para su trabajo. 46 + 47 + :ref:`sp_development_followthrough` cubre lo que sucede después de publicar 48 + parches; el trabajo está lejos de terminar en ese momento. Trabajar con 49 + revisores es una parte crucial del proceso de desarrollo; esta sección 50 + ofrece varios consejos sobre cómo evitar problemas en esta importante 51 + etapa. Se advierte a los desarrolladores que no asuman que el trabajo está 52 + terminado cuando un parche se fusiona en mainline. 53 + 54 + :ref:`sp_development_advancedtopics` introduce un par de temas “avanzados”: 55 + la administración de parches con git y la revisión de parches publicados 56 + por otros. 57 + 58 + :ref:`sp_development_conclusion` concluye el documento con punteros a las 59 + fuentes para obtener más información sobre el desarrollo del kernel. 60 + 61 + De qué trata este documento 62 + --------------------------- 63 + 64 + El kernel de Linux, con más de 8 millones de líneas de código y más de 65 + 1000 colaboradores en cada versión, en uno de los proyectos de software 66 + libre más grandes y activos que existen. Desde sus humildes comienzos en 67 + 1991, este kernel ha evolucionado hasta convertirse en el mejor componente 68 + del sistema operativo que se ejecuta en reproductores de música digital 69 + de bolsillo, PC de escritorio, las supercomputadoras más grandes que 70 + existen y todo tipo de sistemas intermedios. Es una solución robusta, 71 + eficiente, y escalable para casi cualquier situación. 72 + 73 + Con el crecimiento de Linux, ha llegado un aumento en el número de 74 + desarrolladores (y empresas) que desean participar en su desarrollo. Los 75 + vendedores de hardware quieren asegurarse de que Linux sea compatible con 76 + sus productos, lo que hace que esos productos sean atractivos para los 77 + usuarios de Linux. Los vendedores de sistemas embebidos, que utilizan 78 + Linux como componente de un producto integrado, quieren que Linux sea lo 79 + más capaz y adecuado posible para tarea en cuestión. Los distribuidores 80 + y otros vendedores de software que basan sus productos en Linux tienen un 81 + claro interés en las capacidades, el rendimiento, y la fiabilidad del 82 + kernel de Linux. Y los usuarios finales, también, a menudo desearán 83 + cambiar Linux para que se adapte mejor a sus necesidades. 84 + 85 + Una de las características más convincentes de Linux es que es accesible 86 + a estos desarrolladores; cualquier persona con las habilidades necesarias 87 + puede mejorar Linux e influir en la dirección de su desarrollo. Los 88 + productos propietarios no pueden ofrecer este tipo de apertura, que es una 89 + característica del proceso de software libre. Pero, en todo caso, el 90 + kernel es aún más libre que la mayoría de los otros proyectos de software 91 + libre. Un ciclo típico de desarrollo de kernel de tres meses puede 92 + involucrar a más de 1000 desarrolladores que trabajan para más de 100 93 + empresas diferentes (o sin pertenecer a ninguna empresa). 94 + 95 + Trabajar con la comunidad de desarrollo del kernel no es especialmente 96 + difícil. Pero, a pesar de eso, muchos colaboradores potenciales han 97 + experimentado dificultades al tratar de hacer el trabajo del kernel. La 98 + comunidad del kernel ha desarrollado sus propias formas distintivas de 99 + operar, lo que le permite funcionar de manera fluida (y producir un 100 + producto de alta calidad) en un entorno donde miles de líneas de código 101 + se cambian todos los días. Por lo tanto, no es sorprendente que el 102 + proceso de desarrollo del kernel de Linux difiera mucho de los métodos de 103 + desarrollo propietarios. 104 + 105 + El proceso de desarrollo del kernel puede parecer extraño e intimidante 106 + para los nuevos desarrolladores, pero hay buenas razones y una sólida 107 + experiencia detrás de él. Un desarrollador que no entienda las formas de 108 + la comunidad del kernel (o, peor aún, que intente burlarse o eludirlas) 109 + tendrá una experiencia frustrante por delante. La comunidad de 110 + desarrollo, si bien es servicial para aquellos que están tratando de 111 + aprender, tiene poco tiempo para aquellos que no escuchan o que no se 112 + preocupan por el proceso de desarrollo. 113 + 114 + Se espera que quienes lean este documento puedan evitar esa experiencia 115 + frustrante. Hay mucho material aquí, pero el esfuerzo que implica leerlo 116 + será recompensado en poco tiempo. La comunidad de desarrollo siempre 117 + necesita desarrolladores que ayudan a mejorar el kernel; el siguiente 118 + texto debería ayudarle – o a quienes trabajan para usted, a unirse a 119 + nuestra comunidad. 120 + 121 + Créditos 122 + -------- 123 + 124 + Este documento fue escrito por Jonathan Corbet, corbet@lwn.net. Ha sido 125 + mejorado por los comentarios de Johannes Berg, James Berry, Alex Chiang, 126 + Roland Dreier, Randy Dunlap, Jake Edge, Jiri Kosina, Matt Mackall, Arthur 127 + Marsh, Amanda McPherson, Andrew Morton, Andrew Price, Tsugikazu Shibata y 128 + Jochen Voß. 129 + Este trabajo fue respaldado por la Fundación Linux; gracias especialmente 130 + a Amanda McPherson, quien reconoció el valor de este esfuerzo e hizo que 131 + todo sucediera. 132 + 133 + Importancia de integrar el código en el mainline 134 + ------------------------------------------------ 135 + 136 + Algunas empresas y desarrolladores ocasionalmente se preguntan por qué 137 + deberían molestarse en aprender cómo trabajar con la comunidad del 138 + kernel y obtener su código en el kernel mainline (el “mainline” es el 139 + kernel mantenido por Linus Torvalds y utilizado como base por los 140 + distribuidores de Linux. A corto plazo, contribuir con código puede 141 + parecer un gasto evitable; parece más fácil mantener el código separado 142 + y dar soporte a los usuarios directamente. La verdad del asunto es que 143 + mantener el código separado (“fuera del árbol”) es pan para hoy y hambre 144 + para mañana. 145 + 146 + Para ilustrar los costos del código fuera-del-árbol, aquí hay algunos 147 + aspectos relevantes del proceso de desarrollo del kernel. La mayoría de 148 + estos se discutirán con mayor detalle más adelante en este documento. 149 + Considerar: 150 + 151 + - El código que se ha fusionado con el kernel mainline está disponible 152 + para todos los usuarios de Linux. Estará presente automáticamente en 153 + todas las distribuciones que lo habiliten. No hay necesidad de discos 154 + de controladores, descargas, o las molestias de admitir múltiples 155 + versiones de múltiples distribuciones; todo simplemente funciona, para 156 + el desarrollador y para el usuario. La incorporación al mainline 157 + resuelve un gran número de problemas de distribución y soporte. 158 + 159 + - Mientras los desarrolladores del kernel se esfuerzan por mantener una 160 + interfaz estable para el espacio de usuario, la API interna de kernel 161 + está en constante cambio. La falta de una interfaz interna estable es 162 + una decisión deliberada de diseño; permite realizar mejoras 163 + fundamentales en cualquier momento y da como resultado un código de 164 + mayor calidad. Pero uno resultado de esa política es que cualquier 165 + código fuera-del-árbol requiere un mantenimiento constante si va a 166 + funcionar con los nuevos kernels. Mantener el código fuera-del-árbol 167 + requiere una cantidad significativa de trabajo sólo para que ese código 168 + siga funcionando. 169 + 170 + En su lugar, el código en el mainline no requiere este trabajo como 171 + resultado de una regla simple que requiere que cualquier desarrollador 172 + que realice un cambio en la API también corrija cualquier código que 173 + se rompa como resultado de ese cambio. Así que, el código fusionado en 174 + el mainline tiene costos de mantenimiento significativamente más bajos. 175 + 176 + - Más allá de eso, el código que está en el kernel a menudo será 177 + mejorado por otros desarrolladores. Resultados sorprendentes pueden 178 + provenir de capacitar a su comunidad de usuarios y clientes para mejorar 179 + su producto. 180 + 181 + - El código del kernel se somete a revisión, tanto antes como después 182 + de fusionarse con el mainline. No importa cuán fuertes sean las 183 + habilidades del desarrollador original, este proceso de revisión 184 + invariablemente encuentra formas en las que se puede mejorar el código. 185 + A menudo la revisión encuentra errores graves y problemas de seguridad. 186 + Esto es especialmente cierto para el código que se ha desarrollado en 187 + un entorno cerrado; dicho código se beneficia fuertemente de la 188 + revisión por desarrolladores externos. El código fuera-del-árbol es 189 + de menor calidad. 190 + 191 + - La participación en el proceso de desarrollo es su manera de influir en 192 + la dirección del desarrollo del kernel. Los usuarios que se quejan 193 + desde el sofa son escuchados, pero los desarrolladores activos tienen 194 + una voz más fuerte – y la capacidad de implementar cambios que hacen 195 + que el kernel funcione mejor para sus necesidades. 196 + 197 + - Cuando el código se mantiene por separado, siempre existe la posibilidad 198 + de que un tercero contribuya a una implementación diferente de una 199 + característica similar. Si eso sucede, conseguir que su código 200 + fusionado será mucho más difícil – hasta el punto de la imposibilidad. 201 + Entonces se enfrentará a las desagradables alternativas de (1) mantener 202 + una característica no estándar fuera del árbol indefinidamente, o 203 + (2) abandonar su código y migrar sus usuarios a la versión en el árbol. 204 + 205 + - La contribución del código es la acción fundamental que hace que todo 206 + el proceso funcione. Al contribuir con su código, puede agregar nuevas 207 + funcionalidades al kernel y proporcionar capacidades y ejemplos que son 208 + útiles para otros desarrolladores del kernel. Si ha desarrollado código 209 + para Linux (o está pensando en hacerlo), claramente tiene un interés 210 + en el éxito continuo de esta plataforma; contribuir con código es una 211 + de las mejores maneras de ayudar a garantizar ese éxito. 212 + 213 + Todo el razonamiento anterior se aplica a cualquier código de kernel 214 + fuera-del-árbol, incluido el código que se distribuye en forma propietaria 215 + y únicamente en binario. Sin embargo, hay factores adicionales que deben 216 + tenerse en cuenta antes de considerar cualquier tipo de distribución de 217 + código de kernel únicamente en binario. Estos incluyen: 218 + 219 + - Las cuestiones legales en torno a la distribución de módulos 220 + propietarios del kernel son, en el mejor de los casos, confusas; 221 + bastantes titulares de derechos de autor del kernel creen que la 222 + mayoría de los módulos binarios son productos derivados del kernel y 223 + que, como resultado, su distribución es una violación de la licencia 224 + Pública General de GNU (sobre la que se dirá más adelante). El autor 225 + de este texto no es abogado, y nada en este documento puede considerarse 226 + asesoramiento legal. Solo los tribunales pueden determinar el verdadero 227 + estatus legal de los módulos de código cerrado. Pero la incertidumbre 228 + que acecha a esos módulos está ahí a pesar de todo. 229 + 230 + - Los módulos binarios aumentan enormemente la dificultad de depurar 231 + problemas del kernel, hasta el punto de que la mayoría de los 232 + desarrolladores del kernel ni siquiera lo intentarán. Por lo tanto, 233 + la distribución de módulos únicamente en binario hará que sea más 234 + difícil para sus usuarios obtener soporte de la comunidad. 235 + 236 + - El soporte también es más difícil para los distribuidores de módulos 237 + únicamente en binario, que deben proporcionar una versión del módulo 238 + para cada distribución y cada versión del kernel que deseen apoyar. 239 + Podría requerir docenas de compilaciones de un solo módulo para 240 + proporcionar una cobertura razonablemente completa, y sus usuarios 241 + tendrán que actualizar su módulo por separado cada vez que 242 + actualicen su kernel. 243 + 244 + - Todo lo que se dijo anteriormente sobre la revisión de código se aplica 245 + doblemente al código cerrado. Dado que este código no está disponible 246 + en absoluto, no puede haber sido revisado por la comunidad y, sin duda, 247 + tendrá serios problemas. 248 + 249 + Los fabricantes de sistemas embebidos, en particular, pueden verse 250 + tentados a ignorar gran parte de lo que se ha dicho en esta sección 251 + creyendo que están enviando un producto autónomo que utiliza una 252 + versión de kernel congelada y no requiere más desarrollo después de su 253 + lanzamiento. Este argumento desaprovecha el valor de la revisión 254 + generalizad del código y el valor de permitir que sus usuarios agreguen 255 + capacidades a su producto. Pero estos productos también tienen una vida 256 + comercial limitada, después de la cual se debe lanzar una nueva versión. 257 + En ese punto, los vendedores cuyo código esté en el mainline y bien 258 + mantenido estarán en una posición mucho mejor para preparar el nuevo 259 + producto rápidamente para el mercado. 260 + 261 + Licencias 262 + --------- 263 + 264 + El código se contribuye al kernel de Linux bajo varias licencias, pero 265 + todo el código debe ser compatible con la versión 2 de la Licencia 266 + Pública General de GNU (GPLv2), que cubre la distribución del kernel. En 267 + la práctica, esto significa que todas las contribuciones de código están 268 + cubiertas ya sea por la GPLv2 (con, opcionalmente, un lenguaje que permite 269 + la distribución en versiones posteriores de la GPL) o por la licencia BSD 270 + de tres cláusulas. Cualquier contribución que no esté cubierta por una 271 + licencia compatible no será aceptada en el kernel. 272 + 273 + No se requieren (ni se solicitan) cesiones de derechos de autor para el 274 + código aportado al kernel. Todo el código fusionado en el kernel 275 + mainline conserva su propiedad original; como resultado, el kernel ahora 276 + tiene miles de propietarios. 277 + 278 + Una implicación de esta estructura de propiedad es que cualquier intento 279 + de cambiar la licencia del kernel está condenado a un fracaso casi seguro. 280 + Hay pocos escenarios prácticos en los que se pueda obtener el acuerdo de 281 + todos los titulares de derechos de autor (o eliminar su código del 282 + kernel). Así que, en particular, no hay perspectivas de una migración a 283 + la versión 3 de la GPL en un futuro previsible. 284 + 285 + Es imperativo que todo el código aportado al kernel sea legítimamente 286 + software libre. Por esa razón, no se aceptará código de colaboradores 287 + anónimos (o seudónimos). Todos los colaboradores están obligados a 288 + “firmar” su código, indicando que el código puede ser distribuido con 289 + el kernel bajo la GPL. El código que no ha sido licenciado como software 290 + libre por su propietario, o que corre el riesgo de crear problemas 291 + relacionadas con los derechos de autor para el kernel (como el código que 292 + se deriva de esfuerzos de ingeniería inversa que carecen de las garantías 293 + adecuadas) no puede ser contribuido. 294 + 295 + Las preguntas sobre cuestiones relacionadas con los derechos de autor son 296 + comunes en las listas de correo de desarrollo de Linux. Normalmente, estas 297 + preguntas no recibirán escasez de respuestas, pero se debe tener en cuenta 298 + que las personas que responden a esas preguntas no son abogados y no 299 + pueden proporcionar consejo legal. Si tiene preguntas legales relacionadas 300 + con el código fuente de Linux, no hay sustituto para hablar con un abogado 301 + que entienda este campo. Confiar en las respuestas obtenidas en listas 302 + técnicas de correo es un asunto arriesgado.
+542
Documentation/translations/sp_SP/process/2.Process.rst
··· 1 + .. include:: ../disclaimer-sp.rst 2 + 3 + :Original: Documentation/process/2.Process.rst 4 + :Translator: Avadhut Naik <avadhut.naik@amd.com> 5 + 6 + .. _sp_development_process: 7 + 8 + Cómo funciona el proceso de desarrollo 9 + ====================================== 10 + 11 + El desarrollo del kernel de Linux a principios de la década de 1990 fue 12 + un asunto relajado, con un número relativamente pequeño de usuarios y 13 + desarrolladores involucrados. Con una base de usuarios en los millones y 14 + alrededor de 2,000 desarrolladores involucrados durante un año, el kernel 15 + ha tenido que adaptar varios procesos para mantener el desarrollo sin 16 + problemas. Se requiere una comprensión solida de cómo funciona el proceso 17 + para ser una parte efectiva del mismo. 18 + 19 + El panorama general 20 + ------------------- 21 + 22 + Los desarrolladores del kernel utilizan un proceso de lanzamiento basado 23 + en el tiempo de manera flexible, con uno nuevo lanzamiento principal del 24 + kernel ocurriendo cada dos o tres meses. El historial reciente de 25 + lanzamientos se ve así: 26 + 27 + ====== ================== 28 + 5.0 Marzo 3, 2019 29 + 5.1 Mayo 5, 2019 30 + 5.2 Julio 7, 2019 31 + 5.3 Septiembre 15, 2019 32 + 5.4 Noviembre 24, 2019 33 + 5.5 Enero 6, 2020 34 + ====== ================== 35 + 36 + Cada lanzamiento 5.x es un lanzamiento principal del kernel con nuevas 37 + características, cambios internos en la API y más. Un lanzamiento típico 38 + puede contener alrededor de 13,000 conjuntos de cambios incluyendo en 39 + varias centenas de miles de líneas de código. 5.x es la vanguardia del 40 + desarrollo del kernel de Linux; el kernel utiliza un modelo de desarrollo 41 + continuo que está integrando continuamente cambios importantes. 42 + 43 + Se sigue una disciplina relativamente sencilla con respecto a la fusión 44 + de parches para cada lanzamiento. Al comienzo de cada ciclo de desarrollo, 45 + se dice que la "merge window" (ventana de fusión) está abierta. En ese 46 + momento, el código que se considera lo suficientemente estable (y que es 47 + aceptado por la comunidad de desarrollo) se fusiona en el kernel mainline. 48 + La mayor parte de los cambios para un nuevo ciclo de desarrollo (y todos 49 + los cambios principales) se fusionarán durante este tiempo, a un ritmo 50 + cercano a los 1,000 cambios (“parches” o “conjuntos de cambios”) por 51 + día. 52 + 53 + (Aparte, vale la pena señalar que los cambios integrados durante la 54 + ventana de fusión no surgen de la nada; han sido recolectados, probados 55 + y montados con anticipación. Como funciona ese proceso se describirá en 56 + detalle más adelante). 57 + 58 + La ventana de fusión dura aproximadamente dos semanas. Al final de este 59 + tiempo, Linux Torvalds declarará que la ventana está cerrada y publicará 60 + el primero de los kernels “rc”. Para el kernel destinado a ser 5.6, por 61 + ejemplo, el lanzamiento al final de la ventana de fusión se llamará 62 + 5.6-rc1. El lanzamiento -rc1 señala que el tiempo para fusionar nuevas 63 + características ha pasado y que el tiempo para estabilizar el siguiente 64 + kernel ha comenzado. 65 + 66 + Durante las próximas seis a diez semanas, solo los parches que solucionen 67 + problemas deben enviarse al mainline. En ocasiones, se permitirá un cambio 68 + más significativo, pero tales ocasiones son raras; los desarrolladores que 69 + intentan fusionar nuevas características fuera de la ventana de fusión 70 + suelen recibir una recepción poco amistosa. Como regla general, si se 71 + pierde la ventana de fusión de una característica determinada, lo mejor 72 + que puede hacer es esperar al siguiente ciclo de desarrollo. (Se hace una 73 + excepción ocasional para los drivers de hardware que no se admitía 74 + anteriormente; si no afectan a ningún código en árbol, no pueden causar 75 + regresiones y debería ser seguro agregarlos en cualquier momento). 76 + 77 + A medida que las correcciones se abren paso en el mainline, la tasa de 78 + parches se ralentizará con el tiempo. Linus lanza nuevos kernels -rc 79 + aproximadamente una vez a la semana; una serie normal llegará a algún 80 + punto entre -rc6 y -rc9 antes de que se considere que el kernel es 81 + suficientemente estable y realice el lanzamiento final. En ese momento, 82 + todo el proceso vuelve a empezar. 83 + 84 + Como ejemplo, así fue el ciclo de desarrollo de 5.4 (todas las fechas son 85 + de 2019): 86 + 87 + ============== ======================================= 88 + Septiembre 15 5.3 lanzamiento estable 89 + Septiembre 30 5.4-rc1, la ventana de fusion se cierra 90 + Octubre 6 5.4-rc2 91 + Octubre 13 5.4-rc3 92 + Octubre 20 5.4-rc4 93 + Octubre 27 5.4-rc5 94 + Noviembre 3 5.4-rc6 95 + Noviembre 10 5.4-rc7 96 + Noviembre 17 5.4-rc8 97 + Noviembre 24 5.4 lanzamiento estable 98 + ============== ======================================= 99 + 100 + ¿Cómo deciden los desarrolladores cuándo cerrar el ciclo de desarrollo 101 + y crear el lanzamiento estable? La métrica más significativa utilizada 102 + es la lista de regresiones de lanzamientos anteriores. Ningunos errores 103 + son bienvenidos, pero aquellos que rompen sistemas que funcionaron en el 104 + pasado se consideran especialmente graves. Por esta razón, los parches 105 + que causan regresiones se ven con malos ojos y es bastante probable que 106 + se reviertan durante el periodo de estabilización. 107 + 108 + El objetivo de los desarrolladores es corregir todas las regresiones 109 + conocidas antes de que se realice el lanzamiento estable. En el mundo 110 + real, este tipo de perfección es difícil de lograr; hay demasiados 111 + variables en un proyecto de este tamaño. Llega un punto en el que 112 + retrasar el lanzamiento final solo empeora el problema; la pila de cambios 113 + que esperan la siguiente ventana de fusión crecerá, creando aún más 114 + regresiones la próxima vez. Por lo tanto, la mayoría de los kernels 5.x 115 + se lanzan con un punado de regresiones conocidas, aunque, con suerte, 116 + ninguna de ellas es seria. 117 + 118 + Una vez que se realiza un lanzamiento estable, su mantenimiento continuo 119 + se transfiere al “equipo estable”, actualmente encabezado por Greg 120 + Kroah-Hartman. El equipo estable lanzará actualizaciones ocasionales al 121 + lanzamiento estable utilizando el esquema de numeración 5.x.y. Para ser 122 + considerado para un lanzamiento de actualización, un parche debe 123 + (1) corregir un error significativo y (2) ya estar fusionado en el 124 + mainline para el siguiente kernel de desarrollo. Por lo general, los 125 + kernels recibirán actualizaciones estables durante un poco más de un 126 + ciclo de desarrollo después de su lanzamiento inicial. Así, por ejemplo, 127 + la historia del kernel 5.2 se veía así (todas las fechas en 2019): 128 + 129 + ============== =============================== 130 + Julio 7 5.2 lanzamiento estable 131 + Julio 14 5.2.1 132 + Julio 21 5.2.2 133 + Julio 26 5.2.3 134 + Julio 28 5.2.4 135 + Julio 31 5.2.5 136 + ... ... 137 + Octubre 11 5.2.21 138 + ============== =============================== 139 + 140 + 5.2.21 fue la última actualización estable del lanzamiento 5.2. 141 + 142 + Algunos kernels se designan como kernels “a largo plazo”; recibirán 143 + soporte durante un periodo más largo. Consulte el siguiente enlace para 144 + obtener la lista de versiones activas del kernel a largo plazos y sus 145 + maintainers: 146 + 147 + https://www.kernel.org/category/releases.html 148 + 149 + La selección de un kernel para soporte a largo plazo es puramente una 150 + cuestión de que un maintainer tenga la necesidad y el tiempo para 151 + mantener ese lanzamiento. No hay planes conocidos para ofrecer soporte a 152 + largo plazo para ningún lanzamiento especifico próximo. 153 + 154 + Ciclo de vida de un parche 155 + -------------------------- 156 + 157 + Los parches no van directamente desde el teclado del desarrollador al 158 + kernel mainline. Hay, en cambio, un proceso algo complicado (aunque algo 159 + informal) diseñado para garantizar que cada parche sea revisado en cuanto 160 + a calidad y que cada parche implemente un cambio que es deseable tener en 161 + el mainline. Este proceso puede ocurrir rápidamente para correcciones 162 + menores, o, en el caso de cambios grandes y controvertidos, continuar 163 + durante años. Gran parte de la frustración de los desarrolladores proviene 164 + de la falta de compresión de este proceso o de sus intentos de eludirlo. 165 + 166 + Con la esperanza de reducir esa frustración, este documento describirá 167 + cómo un parche entra en el kernel. Lo que sigue a continuación es una 168 + introducción que describe el proceso de una manera tanto idealizada. Un 169 + tratamiento mucho más detallado vendrá en secciones posteriores. 170 + 171 + Las etapas por las que pasa un parche son, generalmente: 172 + 173 + - Diseño. Aquí es donde se establecen los requisitos reales para el 174 + parche – y la forma en que se cumplirán esos requisitos. El trabajo 175 + de diseño a menudo se realiza sin involucrar a la comunidad, pero es 176 + mejor hacer este trabajo de manera abierta si es posible; puede ahorrar 177 + mucho tiempo rediseñando las cosas más tarde. 178 + 179 + - Revisión inicial. Los parches se publican en la lista de correo 180 + relevante y los desarrolladores en esa lista responden con cualquier 181 + comentario que puedan tener. Este proceso debería revelar cualquier 182 + problema importante con un parche si todo va bien. 183 + 184 + - Revisión más amplia. Cuando el parche se acerca a estar listo para su 185 + inclusión en el mainline, debe ser aceptado por un maintainer del 186 + subsistema relevante – aunque esta aceptación no es una garantía de 187 + que el parche llegara hasta el mainline. El parche aparecerá en el 188 + árbol de subsistemas del maintainer y en los árboles -next (descritos 189 + a continuación). Cuando el proceso funciona, este paso conduce a una 190 + revisión exhaustiva del parche y al descubrimiento de cualquier 191 + problema resultante de la integración de este parche con el trabajo 192 + realizado por otros. 193 + 194 + - Tenga en cuenta que la mayoría de los maintainers también tienen 195 + trabajos diurnos, por lo que fusionar su parche no puede ser su máxima 196 + prioridad. Si su parche está recibiendo comentarios sobre los cambios 197 + que se necesitan, debería realizar esos cambios o justificar por qué 198 + no deberían realizarse. Si su parche no tiene quejas de revisión, pero 199 + no está siendo fusionado por el maintainer apropiado del subsistema o 200 + del driver, debe ser persistente en la actualización del parche 201 + al kernel actual para que se aplique limpiamente y seguir enviándolo 202 + para su revisión y fusión. 203 + 204 + - Fusión en el mainline. Eventualmente, un parche exitoso se fusionará 205 + en el repositorio mainline administrado por Linux Torvalds. Mas 206 + comentarios y/o problemas pueden surgir en este momento; es importante 207 + que el desarrollador responda a estos y solucione cualquier problema 208 + que surja. 209 + 210 + - Lanzamiento estable. El número de usuarios potencialmente afectados por 211 + el parche es ahora grande, por lo que, una vez más, pueden surgir 212 + nuevos problemas. 213 + 214 + - Mantenimiento a largo plazo. Si bien un desarrollador puede olvidarse 215 + del código después de fusionarlo, ese comportamiento tiende a dejar 216 + una impresión negativa en la comunidad de desarrollo. Fusionar el 217 + código elimina parte de la carga de mantenimiento; otros solucionarán 218 + los problemas causados por los cambios en la API. Sin embargo, el 219 + desarrollador original debe seguir asumiendo la responsabilidad del 220 + código si quiere seguir siendo útil a largo plazo. 221 + 222 + Uno de los peores errores cometidos por los desarrolladores del kernel 223 + (o sus empleadores) es tratar de reducir el proceso a un solo paso de 224 + “fusión en el mainline”. Este enfoque conduce invariablemente a la 225 + frustración de todos los involucrados. 226 + 227 + Cómo se integran los parches en el kernel 228 + ----------------------------------------- 229 + 230 + Hay exactamente una persona que puede fusionar parches en el repositorio 231 + mainline del kernel: Linus Torvalds. Pero, por ejemplo, de los más de 232 + 9,500 parches que se incluyeron en el kernel 2.6.38, solo 112 (alrededor 233 + del 1.3%) fueron elegidos directamente por Linus mismo. El proyecto del 234 + kernel ha crecido mucho desde hace tiempo a un tamaño en el que ningún 235 + desarrollador individual podría inspeccionar y seleccionar todos los 236 + parches sin ayuda. La forma que los desarrolladores del kernel han 237 + abordado este crecimiento es a través del uso de un sistema jerárquico 238 + alrededor de una cadena de confianza. 239 + 240 + La base de código del kernel se descompone lógicamente en un conjunto de 241 + subsistemas: redes, soporte de arquitectura especifica, gestión de 242 + memoria, dispositivos de video, etc. La mayoría de los subsistemas tienen 243 + un maintainer designado, un desarrollador que tiene la responsabilidad 244 + general del código dentro de ese subsistema. Estos maintainers de 245 + subsistemas son los guardianes (en cierto modo) de la parte del kernel que 246 + gestionan; son los que (usualmente) aceptarán un parche para incluirlo en 247 + el kernel mainline. 248 + 249 + Cada uno de los maintainers del subsistema administra su propia versión 250 + del árbol de fuentes del kernel, generalmente (pero, ciertamente no 251 + siempre) usando la herramienta de administración de código fuente de git. 252 + Herramientas como git (y herramientas relacionadas como quilt o mercurial) 253 + permiten a los maintainers realizar un seguimiento de una lista de 254 + parches, incluida la información de autoría y otros metadatos. En 255 + cualquier momento, el maintainer puede identificar qué parches de su 256 + repositorio no se encuentran en el mainline. 257 + 258 + Cuando se abre la ventana de fusión, los maintainers de nivel superior 259 + le pedirán a Linus que “extraiga” los parches que han seleccionado para 260 + fusionar de sus repositorios. Si Linus está de acuerdo, el flujo de 261 + parches fluirá hacia su repositorio, convirtiéndose en parte del kernel 262 + mainline. La cantidad de atención que Linus presta a los parches 263 + específicos recibidos en una operación de extracción varia. Está claro 264 + que, a veces, examina bastante de cerca. Pero, como regla general, Linus 265 + confía en que los maintainers del subsistema no envíen parches 266 + defectuosos al upstream. 267 + 268 + Los maintainers de subsistemas, a su vez, pueden extraer parches de otros 269 + maintainers. Por ejemplo, el árbol de red se construye a partir de 270 + parches que se acumulan primero en arboles dedicados a drivers de 271 + dispositivos de red, redes inalámbricas, etc. Esta cadena de repositorios 272 + puede ser arbitrariamente larga, aunque rara vez supera los dos o tres 273 + enlaces. Dado que cada maintainer de la cadena confía en los que 274 + administran árboles de nivel inferior, este proceso se conoce como la 275 + “cadena de confianza”. 276 + 277 + Claramente, en un sistema como este, lograr que los parches se integren 278 + en el kernel depende de encontrar el maintainer adecuado. Enviar parches 279 + directamente a Linus no es normalmente la forma correcta de hacerlo. 280 + 281 + Árboles siguientes (next) 282 + ------------------------- 283 + 284 + La cadena de árboles de subsistemas guía el flujo de parches en el 285 + kernel, pero también plantea una pregunta interesante: ¿Qué pasa si 286 + alguien quiere ver todos los parches que se están preparando para la 287 + próxima ventana de fusión? Los desarrolladores estarán interesados en 288 + saber que otros cambios están pendientes para ver si hay algún conflicto 289 + del que preocuparse; un parche que cambia un prototipo de función del 290 + núcleo del kernel, por ejemplo, entrará en conflicto con cualquier otro 291 + parche que utilice la forma anterior de esa función. Los revisores y 292 + probadores quieren tener acceso a los cambios en su forma integrada antes 293 + de que todos esos cambios se integren en el kernel mainline. Uno podría 294 + extraer cambios de todos los árboles de subsistemas interesantes, pero 295 + eso sería un trabajo tedioso y propenso a errores. 296 + 297 + La respuesta viene en forma de árboles -next, donde los árboles de 298 + subsistemas se recopilan para pruebas y revisiones. El más antiguo de 299 + estos árboles, mantenido por Andrew Morton, se llama “-mm” (por gestión 300 + de la memoria, que es como comenzó). El árbol “-mm” integra parches 301 + de una larga lista de árboles de subsistemas; también tiene algunos 302 + parches destinados a ayudar con la depuración. 303 + 304 + Más allá de eso, -mm contiene una colección significativa de parches 305 + que han sido seleccionados directamente por Andrew. Estos parches pueden 306 + haber sido publicados en una lista de correo o aplicarse a una parte del 307 + kernel para la que no hay un árbol de subsistemas designado. Como 308 + resultado, -mm funciona como una especie de árbol de subsistemas de 309 + último recurso; si no hay otro camino obvio para un parche en el mainline, 310 + es probable que termine en -mm. Los parches misceláneos que se acumulan 311 + en -mm eventualmente se enviarán a un árbol de subsistema apropiado o se 312 + enviarán directamente a Linus. En un ciclo de desarrollo típico, 313 + aproximadamente el 5-10% de los parches que van al mainline llegan allí 314 + a través de -mm. 315 + 316 + El parche -mm actual está disponible en el directorio “mmotm” (-mm 317 + del momento) en: 318 + 319 + https://www.ozlabs.org/~akpm/mmotm/ 320 + 321 + Sin embargo, es probable que el uso del árbol MMOTM sea una experiencia 322 + frustrante; existe una posibilidad definitiva de que ni siquiera se 323 + compile. 324 + 325 + El árbol principal para la fusión de parches del siguiente ciclo es 326 + linux-next, mantenido por Stephen Rothwell. El árbol linux-next es, por 327 + diseño, una instantánea de cómo se espera que se vea el mainline después 328 + de que se cierre la siguiente ventana de fusión. Los árboles linux-next 329 + se anuncian en las listas de correo linux-kernel y linux-next cuando se 330 + ensamblan; Se pueden descargar desde: 331 + 332 + https://www.kernel.org/pub/linux/kernel/next/ 333 + 334 + Linux-next se ha convertido en una parte integral del proceso de 335 + desarrollo del kernel; todos los parches fusionados durante una ventana 336 + de fusión determinada deberían haber encontrado su camino en linux-next 337 + en algún momento antes de que se abra la ventana de fusión. 338 + 339 + Árboles de staging 340 + ------------------ 341 + 342 + El árbol de fuentes del kernel contiene el directorio drivers/staging/, 343 + donde residen muchos subdirectorios para drivers o sistemas de archivos 344 + que están en proceso de ser agregados al árbol del kernel. Permanecen 345 + en drivers/staging mientras aún necesitan más trabajo; una vez 346 + completados, se pueden mover al kernel propiamente dicho. Esta es una 347 + forma de realizar un seguimiento de los drivers drivers que no están a la 348 + altura de la codificación o los estándares de calidad del kernel de 349 + Linux, pero que las personas pueden querer usarlos y realizar un 350 + seguimiento del desarrollo. 351 + 352 + Greg Kroah-Hartman mantiene actualmente el árbol de staging. Los drivers 353 + que aun necesitan trabajo se le envían, y cada driver tiene su propio 354 + subdirectorio en drivers/staging/. Junto con los archivos de origen del 355 + driver, también debe haber un archivo TODO en el directorio. El archivo 356 + TODO enumera el trabajo pendiente que el driver necesita para ser aceptado 357 + en el kernel propiamente dicho, así como una lista de personas a las que 358 + Cc’d para cualquier parche para el driver. Las reglas actuales exigen 359 + que los drivers que contribuyen a staging deben, como mínimo, compilarse 360 + correctamente. 361 + 362 + El staging puede ser una forma relativamente fácil de conseguir nuevos 363 + drivers en el mainline donde, con suerte, llamarán la atención de otros 364 + desarrolladores y mejorarán rápidamente. Sin embargo, la entrada en el 365 + staging no es el final de la historia; el código que no está viendo 366 + progreso regular eventualmente será eliminado. Los distribuidores también 367 + tienden a ser relativamente reacios a habilitar los drivers de staging. 368 + Por lo tanto, el staging es, en el mejor de los casos, una parada en el 369 + camino para hacia convertirse en un apropiado driver del mainline. 370 + 371 + Herramientas 372 + ------------ 373 + 374 + Como se puede ver en el texto anterior, el proceso de desarrollo del 375 + kernel depende en gran medida de la capacidad de dirigir colecciones de 376 + parches en varias direcciones. Todo ello no funcionaría tan bien como lo 377 + hace sin herramientas apropiadamente potentes. Los tutoriales sobre cómo 378 + usar estas herramientas están mucho más allá del alcance de este 379 + documento, pero hay espacio para algunos consejos. 380 + 381 + Con mucho, el sistema de gestión de código fuente dominante utilizado 382 + por la comunidad del kernel es git. Git es uno de los varios sistemas de 383 + control de versiones distribuidos que se están desarrollando en la 384 + comunidad de software libre. Está bien ajustado para el desarrollo de 385 + kernel, ya que funciona bastante bien cuando se trata de grandes 386 + repositorios y grandes cantidades de parches. También tiene la reputación 387 + de ser difícil de aprender y usar, aunque ha mejorado con el tiempo. 388 + Algún tipo de familiaridad con git es casi un requisito para los 389 + desarrolladores del kernel; incluso si no lo usan para su propio 390 + trabajo, necesitarán git para mantenerse al día con lo que otros 391 + desarrolladores (y el mainline) están haciendo. 392 + 393 + Git ahora está empaquetado por casi todas las distribuciones de Linux. 394 + Hay una página de inicio en: 395 + 396 + https://git-scm.com/ 397 + 398 + Esa página tiene punteros a documentación y tutoriales. 399 + 400 + Entre los desarrolladores de kernel que no usan git, la opción más 401 + popular es casi con certeza Mercurial: 402 + 403 + https://www.selenic.com/mercurial/ 404 + 405 + Mercurial comparte muchas características con git, pero proporciona una 406 + interfaz que muchos encuentran más fácil de usar. 407 + 408 + Otra herramienta que vale la pena conocer es Quilt: 409 + 410 + https://savannah.nongnu.org/projects/quilt/ 411 + 412 + Quilt es un sistema de gestión de parches, en lugar de un sistema de 413 + gestión de código fuente. No rastrea el historial a lo largo del tiempo; 414 + en cambio, está orientado al seguimiento de un conjunto especifico de 415 + cambios en relación con una base de código en evolución. Algunos de los 416 + principales maintainers de subsistemas utilizan Quilt para gestionar los 417 + parches destinados a ir upstream. Para la gestión de ciertos tipos de 418 + árboles (por ejemplo, -mm) Quilt es la mejor herramienta para el trabajo. 419 + 420 + Listas de correo 421 + ---------------- 422 + 423 + Una gran parte del trabajo de desarrollo del kernel de Linux se realiza a 424 + través de listas de correo. Es difícil ser un miembro plenamente funcional 425 + de la comunidad sin unirse al menos a una lista en algún parte. Pero las 426 + listas de correo de Linux también representan un peligro potencial para 427 + los desarrolladores, que corren el riesgo de quedar enterrados bajo una 428 + carga de correo electrónico, incumplir las convenciones utilizadas en las 429 + listas de Linux, o ambas cosas. 430 + 431 + La mayoría de las listas de correo del kernel se ejecutan en 432 + vger.kernel.org; la lista principal se puede encontrar en: 433 + 434 + http://vger.kernel.org/vger-lists.html 435 + 436 + Sim embargo, hay listas alojadas en otros lugares; varios de ellos se 437 + encuentran en redhat.com/mailman/listinfo. 438 + 439 + La lista de correo principal para el desarrollo del kernel es, por 440 + supuesto, linux-kernel. Esta lista es un lugar intimidante; el volumen 441 + puede alcanzar 500 mensajes por día, la cantidad de ruido es alta, la 442 + conversación puede ser muy técnica y los participantes no siempre se 443 + preocupan por mostrar un alto grado de cortesía. Pero no hay otro lugar 444 + donde la comunidad de desarrollo del kernel se reúna como un todo; los 445 + desarrolladores que eviten esta lista se perderán información importante. 446 + 447 + Hay algunos consejos que pueden ayudar a sobrevivir en el kernel de Linux: 448 + 449 + - Haga que la lista se entregue en una carpeta separada, en lugar de su 450 + buzón principal. Uno debe ser capaz de ignorar el flujo durante 451 + periodos prolongados. 452 + 453 + - No trate de seguir cada conversación, nadie lo hace. Es importante 454 + filtrar tanto por el tema de interés (aunque tenga en cuenta que las 455 + conversaciones prolongadas pueden alejarse del asunto original sin 456 + cambiar la línea de asunto del correo electrónico) por las personas 457 + que participan. 458 + 459 + - No alimente a los trolls. Si alguien está tratando de provocar una 460 + respuesta de enojo, ignórelos. 461 + 462 + - Al responder al correo electrónico del kernel de Linux (o al de otras 463 + listas) conserve el encabezado Cc: para todos los involucrados. En 464 + ausencia de una razón solida (como una solicitud explícita), nunca debe 465 + eliminar destinarios. Asegúrese siempre de que la persona a la que está 466 + respondiendo esté en la lista Cc:. Esta convención también hace que no 467 + sea necesario solicitar explícitamente que se le copie en las respuestas 468 + a sus publicaciones. 469 + 470 + - Busque en los archivos de la lista (y en la red en su conjunto) antes 471 + de hacer preguntas. Algunos desarrolladores pueden impacientarse con 472 + las personas que claramente no han hecho sus deberes. 473 + 474 + - Utilice respuestas intercaladas (“en línea”), lo que hace que su 475 + respuesta sea más fácil de leer. (Es decir, evite top-posting – la 476 + práctica de poner su respuesta encima del texto citado al que está 477 + respondiendo.) Para obtener más información, consulte 478 + :ref:`Documentation/translations/sp_SP/process/submitting-patches.rst <sp_interleaved_replies>`. 479 + 480 + - Pregunte en la lista de correo correcta. linux-kernel puede ser el 481 + punto de encuentro general, pero no es el mejor lugar para encontrar 482 + desarrolladores de todos los subsistemas. 483 + 484 + El último punto, encontrar la lista de correo correcta, es una fuente 485 + común de errores para desarrolladores principiantes. Alguien que haga 486 + una pregunta relacionada con las redes en linux-kernel seguramente 487 + recibirá una surgencia educada para preguntar en la lista de netdev en su 488 + lugar, ya que esa es la lista frecuentada por la mayoría de los 489 + desarrolladores de redes. Existen otras listas para los subsistemas SCSI, 490 + video4linux, IDE, sistema de archivos, etc. El mejor lugar para buscar 491 + listas de correo es en el archivo MAINTAINERS incluido con el código 492 + fuente del kernel. 493 + 494 + Comenzar con el desarrollo del kernel 495 + ------------------------------------- 496 + 497 + Las preguntas sobre como comenzar con el proceso de desarrollo del kernel 498 + son comunes, tanto de individuos como de empresas. Igualmente comunes son 499 + los pasos en falso que hacen que el comienzo de la relación sea más 500 + difícil de lo que tiene que ser. 501 + 502 + Las empresas a menudo buscan contratar desarrolladores conocidos para 503 + iniciar un grupo de desarrollo. De hecho, esta puede ser una técnica 504 + efectiva. Pero también tiende a ser caro y no hace mucho para crecer el 505 + grupo de desarrolladores de kernel experimentados. Es posible poner al 506 + día a los desarrolladores internos en el desarrollo de kernel de Linux, 507 + dada la inversión de algún tiempo. Tomarse este tiempo puede dotar a un 508 + empleador de un grupo de desarrolladores que comprendan tanto el kernel 509 + como la empresa, y que también puedan ayudar a educar a otros. A medio 510 + plazo, este es a menudo el enfoque más rentable. 511 + 512 + Los desarrolladores individuales, a menudo, comprensiblemente, no tienen 513 + un lugar para empezar. Comenzar con un proyecto grande puede ser 514 + intimidante; a menudo uno quiere probar las aguas con algo más pequeño 515 + primero. Este es el punto en el que algunos desarrolladores se lanzan a 516 + la creación de parches para corregir errores ortográficos o problemas 517 + menores de estilo de codificación. Desafortunadamente, dicho parches 518 + crean un nivel de ruido que distrae a la comunidad de desarrollo en su 519 + conjunto, por lo que, cada vez más, se los mira con desprecio. Los nuevos 520 + desarrolladores que deseen presentarse a la comunidad no recibirán la 521 + recepción que desean por estos medios. 522 + 523 + Andrew Morton da este consejo (traducido) para los aspirantes a 524 + desarrolladores de kernel. 525 + 526 + :: 527 + 528 + El proyecto #1 para los principiantes en el kernel seguramente debería 529 + ser “asegúrese de que el kernel funcione perfectamente en todo momento 530 + en todas las máquinas que pueda conseguir”. Por lo general, la forma 531 + de hacer esto es trabajar con otros para arreglar las cosas (¡esto 532 + puede requerir persistencia!), pero eso está bien, es parte del 533 + desarrollo del kernel. 534 + 535 + (https://lwn.net/Articles/283982/) 536 + 537 + En ausencia de problemas obvios que solucionar, se aconseja a los 538 + desarrolladores que consulten las listas actuales de regresiones y errores 539 + abiertos en general. Nunca faltan problemas que necesitan solución; al 540 + abordar estos problemas, los desarrolladores ganarán experiencia con el 541 + proceso mientras, al mismo tiempo, se ganarán el respeto del resto de la 542 + comunidad de desarrollo.
+11
Documentation/translations/sp_SP/process/3.Early-stage.rst
··· 1 + .. include:: ../disclaimer-sp.rst 2 + 3 + :Original: Documentation/process/3.Early-stage.rst 4 + 5 + .. _sp_development_early_stage: 6 + 7 + Planificación en etapa inicial 8 + ============================== 9 + 10 + .. warning:: 11 + TODO aún no traducido
+11
Documentation/translations/sp_SP/process/4.Coding.rst
··· 1 + .. include:: ../disclaimer-sp.rst 2 + 3 + :Original: Documentation/process/4.Coding.rst 4 + 5 + .. _sp_development_coding: 6 + 7 + Conseguir el código correcto 8 + ============================ 9 + 10 + .. warning:: 11 + TODO aún no traducido
+11
Documentation/translations/sp_SP/process/5.Posting.rst
··· 1 + .. include:: ../disclaimer-sp.rst 2 + 3 + :Original: Documentation/process/5.Posting.rst 4 + 5 + .. _sp_development_posting: 6 + 7 + Publicar parches 8 + ================ 9 + 10 + .. warning:: 11 + TODO aún no traducido
+11
Documentation/translations/sp_SP/process/6.Followthrough.rst
··· 1 + .. include:: ../disclaimer-sp.rst 2 + 3 + :Original: Documentation/process/6.Followthrough.rst 4 + 5 + .. _sp_development_followthrough: 6 + 7 + Seguimiento 8 + =========== 9 + 10 + .. warning:: 11 + TODO aún no traducido
+11
Documentation/translations/sp_SP/process/7.AdvancedTopics.rst
··· 1 + .. include:: ../disclaimer-sp.rst 2 + 3 + :Original: Documentation/process/7.AdvancedTopics.rst 4 + 5 + .. _sp_development_advancedtopics: 6 + 7 + Temas avanzados 8 + =============== 9 + 10 + .. warning:: 11 + TODO aún no traducido
+11
Documentation/translations/sp_SP/process/8.Conclusion.rst
··· 1 + .. include:: ../disclaimer-sp.rst 2 + 3 + :Original: Documentation/process/8.Conclusion.rst 4 + 5 + .. _sp_development_conclusion: 6 + 7 + Para más información 8 + ==================== 9 + 10 + .. warning:: 11 + TODO aún no traducido
+1 -1
Documentation/translations/sp_SP/process/code-of-conduct.rst
··· 1 1 .. include:: ../disclaimer-sp.rst 2 2 3 3 :Original: :ref:`Documentation/process/code-of-conduct.rst <code_of_conduct>` 4 - :Translator: Contributor Covenant and Carlos Bilbao <carlos.bilbao@amd.com> 4 + :Translator: Contributor Covenant and Carlos Bilbao <carlos.bilbao.osdev@gmail.com> 5 5 6 6 .. _sp_code_of_conduct: 7 7
+1 -1
Documentation/translations/sp_SP/process/coding-style.rst
··· 1 1 .. include:: ../disclaimer-sp.rst 2 2 3 3 :Original: :ref:`Documentation/process/coding-style.rst <submittingpatches>` 4 - :Translator: Carlos Bilbao <carlos.bilbao@amd.com> 4 + :Translator: Carlos Bilbao <carlos.bilbao.osdev@gmail.com> 5 5 6 6 .. _sp_codingstyle: 7 7
+27
Documentation/translations/sp_SP/process/development-process.rst
··· 1 + .. include:: ../disclaimer-sp.rst 2 + 3 + :Original: Documentation/process/development-process.rst 4 + :Translator: Avadhut Naik <avadhut.naik@amd.com> 5 + 6 + .. _sp_development_process_main: 7 + 8 + Guía del proceso de desarrollo del kernel 9 + ========================================= 10 + 11 + El propósito de este documento es ayudar a los desarrolladores (y sus 12 + gerentes) a trabajar con la comunidad de desarrollo con un mínimo de 13 + frustración. Es un intento de documentar cómo funciona esta comunidad 14 + de una manera accesible para aquellos que no están familiarizados 15 + íntimamente con el desarrollo del kernel de Linux (o, de hecho, el 16 + desarrollo de software libre en general). Si bien hay algo de material 17 + técnico aquí, este es en gran medida una discusión orientada al proceso 18 + que no requiere un conocimiento profundo de la programación del kernel 19 + para entenderla. 20 + 21 + .. toctree:: 22 + :caption: Contenido 23 + :numbered: 24 + :maxdepth: 2 25 + 26 + 1.Intro 27 + 2.Process
+1 -1
Documentation/translations/sp_SP/process/email-clients.rst
··· 1 1 .. include:: ../disclaimer-sp.rst 2 2 3 3 :Original: :ref:`Documentation/process/email-clients.rst <email_clients>` 4 - :Translator: Carlos Bilbao <carlos.bilbao@amd.com> 4 + :Translator: Carlos Bilbao <carlos.bilbao.osdev@gmail.com> 5 5 6 6 .. _sp_email_clients: 7 7
+1 -1
Documentation/translations/sp_SP/process/howto.rst
··· 1 1 .. include:: ../disclaimer-sp.rst 2 2 3 3 :Original: :ref:`Documentation/process/howto.rst <process_howto>` 4 - :Translator: Carlos Bilbao <carlos.bilbao@amd.com> 4 + :Translator: Carlos Bilbao <carlos.bilbao.osdev@gmail.com> 5 5 6 6 .. _sp_process_howto: 7 7
+1
Documentation/translations/sp_SP/process/index.rst
··· 28 28 management-style 29 29 submit-checklist 30 30 howto 31 + development-process
+1 -1
Documentation/translations/sp_SP/process/kernel-docs.rst
··· 1 1 .. include:: ../disclaimer-sp.rst 2 2 3 3 :Original: :ref:`Documentation/process/kernel-docs.rst <kernel_docs>` 4 - :Translator: Carlos Bilbao <carlos.bilbao@amd.com> 4 + :Translator: Carlos Bilbao <carlos.bilbao.osdev@gmail.com> 5 5 6 6 .. _sp_kernel_docs: 7 7
+1 -1
Documentation/translations/sp_SP/process/kernel-enforcement-statement.rst
··· 1 1 .. include:: ../disclaimer-sp.rst 2 2 3 3 :Original: :ref:`Documentation/process/kernel-enforcement-statement.rst <process_statement_kernel>` 4 - :Translator: Carlos Bilbao <carlos.bilbao@amd.com> 4 + :Translator: Carlos Bilbao <carlos.bilbao.osdev@gmail.com> 5 5 6 6 .. _sp_process_statement_kernel: 7 7
+1 -1
Documentation/translations/sp_SP/process/magic-number.rst
··· 1 1 .. include:: ../disclaimer-sp.rst 2 2 3 3 :Original: :ref:`Documentation/process/magic-number.rst <magicnumbers>` 4 - :Translator: Carlos Bilbao <carlos.bilbao@amd.com> 4 + :Translator: Carlos Bilbao <carlos.bilbao.osdev@gmail.com> 5 5 6 6 .. _sp_magicnumbers: 7 7
+1 -1
Documentation/translations/sp_SP/process/programming-language.rst
··· 1 1 .. include:: ../disclaimer-sp.rst 2 2 3 3 :Original: :ref:`Documentation/process/programming-language.rst <programming_language>` 4 - :Translator: Carlos Bilbao <carlos.bilbao@amd.com> 4 + :Translator: Carlos Bilbao <carlos.bilbao.osdev@gmail.com> 5 5 6 6 .. _sp_programming_language: 7 7
+29 -1
Documentation/translations/sp_SP/process/submitting-patches.rst
··· 1 1 .. include:: ../disclaimer-sp.rst 2 2 3 3 :Original: :ref:`Documentation/process/submitting-patches.rst <submittingpatches>` 4 - :Translator: Carlos Bilbao <carlos.bilbao@amd.com> 4 + :Translator: Carlos Bilbao <carlos.bilbao.osdev@gmail.com> 5 5 6 6 .. _sp_submittingpatches: 7 7 ··· 355 355 Consulte Documentation/process/email-clients.rst para obtener 356 356 recomendaciones sobre clientes de correo electrónico y normas de etiqueta 357 357 en la lista de correo. 358 + 359 + .. _sp_interleaved_replies: 360 + 361 + Uso de respuestas intercaladas recortadas en las discusiones por correo electrónico 362 + ----------------------------------------------------------------------------------- 363 + 364 + Se desaconseja encarecidamente la publicación en la parte superior de las 365 + discusiones sobre el desarrollo del kernel de Linux. Las respuestas 366 + intercaladas (o "en línea") hacen que las conversaciones sean mucho más 367 + fáciles de seguir. Para obtener más detalles, consulte: 368 + https://en.wikipedia.org/wiki/Posting_style#Interleaved_style 369 + 370 + Como se cita frecuentemente en la lista de correo:: 371 + 372 + A: http://en.wikipedia.org/wiki/Top_post 373 + Q: ¿Dónde puedo encontrar información sobre esto que se llama top-posting? 374 + A: Porque desordena el orden en el que la gente normalmente lee el texto. 375 + Q: ¿Por qué es tan malo el top-posting? 376 + A: Top-posting. 377 + Q: ¿Qué es lo más molesto del correo electrónico? 378 + 379 + Del mismo modo, por favor, recorte todas las citas innecesarias que no 380 + sean relevantes para su respuesta. Esto hace que las respuestas sean más 381 + fáciles de encontrar y ahorra tiempo y espacio. Para obtener más 382 + información, consulte: http://daringfireball.net/2007/07/on_top :: 383 + 384 + A: No. 385 + Q: ¿Debo incluir citas después de mi respuesta? 358 386 359 387 .. _sp_resend_reminders: 360 388
+3 -3
Documentation/translations/zh_CN/dev-tools/index.rst
··· 22 22 sparse 23 23 gcov 24 24 kasan 25 + kcov 26 + ubsan 27 + kmemleak 25 28 gdb-kernel-debugging 26 29 27 30 Todolist: 28 31 29 32 - coccinelle 30 - - kcov 31 - - ubsan 32 - - kmemleak 33 33 - kcsan 34 34 - kfence 35 35 - kgdb
+359
Documentation/translations/zh_CN/dev-tools/kcov.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 2 + 3 + .. include:: ../disclaimer-zh_CN.rst 4 + 5 + :Original: Documentation/dev-tools/kcov.rst 6 + :Translator: 刘浩阳 Haoyang Liu <tttturtleruss@hust.edu.cn> 7 + 8 + KCOV: 用于模糊测试的代码覆盖率 9 + ============================== 10 + 11 + KCOV 以一种适用于覆盖率引导的模糊测试的形式收集和暴露内核代码覆盖率信息。 12 + 一个正在运行的内核的覆盖率数据可以通过 ``kcov`` 调试文件导出。覆盖率的收集是基 13 + 于任务启用的,因此 KCOV 可以精确捕获单个系统调用的覆盖率。 14 + 15 + 要注意的是 KCOV 不是为了收集尽可能多的覆盖率数据。而是为了收集相对稳定的覆盖率 16 + ,这是系统调用输入的函数。为了完成这个目标,它不收集软硬中断的覆盖率(除非移除 17 + 覆盖率收集被启用,见下文)以及内核中固有的不确定部分的覆盖率(如调度器,锁定) 18 + 19 + 除了收集代码覆盖率,KCOV 还收集操作数比较的覆盖率。见 "操作数比较收集" 一节 20 + 查看详细信息。 21 + 22 + 除了从系统调用处理器收集覆盖率数据,KCOV 还从后台内核或软中断任务中执行的内核 23 + 被标注的部分收集覆盖率。见 "远程覆盖率收集" 一节查看详细信息。 24 + 25 + 先决条件 26 + -------- 27 + 28 + KCOV 依赖编译器插桩,要求 GCC 6.1.0 及更高版本或者内核支持的任意版本的 Clang。 29 + 30 + 收集操作数比较的覆盖率需要 GCC 8+ 或者 Clang。 31 + 32 + 为了启用 KCOV,需要使用如下参数配置内核:: 33 + 34 + CONFIG_KCOV=y 35 + 36 + 为了启用操作数比较覆盖率的收集,使用如下参数:: 37 + 38 + CONFIG_KCOV_ENABLE_COMPARISONS=y 39 + 40 + 覆盖率数据只会在调试文件系统被挂载后才可以获取:: 41 + 42 + mount -t debugfs none /sys/kernel/debug 43 + 44 + 覆盖率收集 45 + ---------- 46 + 47 + 下面的程序演示了如何使用 KCOV 在一个测试程序中收集单个系统调用的覆盖率: 48 + 49 + .. code-block:: c 50 + 51 + #include <stdio.h> 52 + #include <stddef.h> 53 + #include <stdint.h> 54 + #include <stdlib.h> 55 + #include <sys/types.h> 56 + #include <sys/stat.h> 57 + #include <sys/ioctl.h> 58 + #include <sys/mman.h> 59 + #include <unistd.h> 60 + #include <fcntl.h> 61 + #include <linux/types.h> 62 + 63 + #define KCOV_INIT_TRACE _IOR('c', 1, unsigned long) 64 + #define KCOV_ENABLE _IO('c', 100) 65 + #define KCOV_DISABLE _IO('c', 101) 66 + #define COVER_SIZE (64<<10) 67 + 68 + #define KCOV_TRACE_PC 0 69 + #define KCOV_TRACE_CMP 1 70 + 71 + int main(int argc, char **argv) 72 + { 73 + int fd; 74 + unsigned long *cover, n, i; 75 + 76 + /* 单个文件描述符允许 77 + * 在单线程上收集覆盖率。 78 + */ 79 + fd = open("/sys/kernel/debug/kcov", O_RDWR); 80 + if (fd == -1) 81 + perror("open"), exit(1); 82 + /* 设置跟踪模式和跟踪大小。 */ 83 + if (ioctl(fd, KCOV_INIT_TRACE, COVER_SIZE)) 84 + perror("ioctl"), exit(1); 85 + /* 映射内核空间和用户空间共享的缓冲区。 */ 86 + cover = (unsigned long*)mmap(NULL, COVER_SIZE * sizeof(unsigned long), 87 + PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); 88 + if ((void*)cover == MAP_FAILED) 89 + perror("mmap"), exit(1); 90 + /* 在当前线程中启用覆盖率收集。 */ 91 + if (ioctl(fd, KCOV_ENABLE, KCOV_TRACE_PC)) 92 + perror("ioctl"), exit(1); 93 + /* 在调用 ioctl() 之后重置覆盖率。 */ 94 + __atomic_store_n(&cover[0], 0, __ATOMIC_RELAXED); 95 + /* 调用目标系统调用。 */ 96 + read(-1, NULL, 0); 97 + /* 读取收集到的 PC 的数目。 */ 98 + n = __atomic_load_n(&cover[0], __ATOMIC_RELAXED); 99 + for (i = 0; i < n; i++) 100 + printf("0x%lx\n", cover[i + 1]); 101 + /* 在当前线程上禁用覆盖率收集。在这之后 102 + * 可以在其他线程上收集覆盖率 103 + */ 104 + if (ioctl(fd, KCOV_DISABLE, 0)) 105 + perror("ioctl"), exit(1); 106 + /* 释放资源 */ 107 + if (munmap(cover, COVER_SIZE * sizeof(unsigned long))) 108 + perror("munmap"), exit(1); 109 + if (close(fd)) 110 + perror("close"), exit(1); 111 + return 0; 112 + } 113 + 114 + 在使用 ``addr2line`` 传输后,程序输出应该如下所示:: 115 + 116 + SyS_read 117 + fs/read_write.c:562 118 + __fdget_pos 119 + fs/file.c:774 120 + __fget_light 121 + fs/file.c:746 122 + __fget_light 123 + fs/file.c:750 124 + __fget_light 125 + fs/file.c:760 126 + __fdget_pos 127 + fs/file.c:784 128 + SyS_read 129 + fs/read_write.c:562 130 + 131 + 如果一个程序需要从多个线程收集覆盖率(独立地)。那么每个线程都需要单独打开 132 + ``/sys/kernel/debug/kcov``。 133 + 134 + 接口的细粒度允许高效的创建测试进程。即,一个父进程打开了 135 + ``/sys/kernel/debug/kcov``,启用了追踪模式,映射了覆盖率缓冲区,然后在一个循 136 + 环中创建了子进程。这个子进程只需要启用覆盖率收集即可(当一个线程退出时将自动禁 137 + 用覆盖率收集)。 138 + 139 + 操作数比较收集 140 + -------------- 141 + 142 + 操作数比较收集和覆盖率收集类似: 143 + 144 + .. code-block:: c 145 + 146 + /* 包含和上文一样的头文件和宏定义。 */ 147 + 148 + /* 每次记录的 64 位字的数量。 */ 149 + #define KCOV_WORDS_PER_CMP 4 150 + 151 + /* 152 + * 收集的比较种类的格式。 153 + * 154 + * 0 比特表示是否是一个编译时常量。 155 + * 1 & 2 比特包含参数大小的 log2 值,最大 8 字节。 156 + */ 157 + 158 + #define KCOV_CMP_CONST (1 << 0) 159 + #define KCOV_CMP_SIZE(n) ((n) << 1) 160 + #define KCOV_CMP_MASK KCOV_CMP_SIZE(3) 161 + 162 + int main(int argc, char **argv) 163 + { 164 + int fd; 165 + uint64_t *cover, type, arg1, arg2, is_const, size; 166 + unsigned long n, i; 167 + 168 + fd = open("/sys/kernel/debug/kcov", O_RDWR); 169 + if (fd == -1) 170 + perror("open"), exit(1); 171 + if (ioctl(fd, KCOV_INIT_TRACE, COVER_SIZE)) 172 + perror("ioctl"), exit(1); 173 + /* 174 + * 注意缓冲区指针的类型是 uint64_t*,因为所有的 175 + * 比较操作数都被提升为 uint64_t 类型。 176 + */ 177 + cover = (uint64_t *)mmap(NULL, COVER_SIZE * sizeof(unsigned long), 178 + PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); 179 + if ((void*)cover == MAP_FAILED) 180 + perror("mmap"), exit(1); 181 + /* 注意这里是 KCOV_TRACE_CMP 而不是 KCOV_TRACE_PC。 */ 182 + if (ioctl(fd, KCOV_ENABLE, KCOV_TRACE_CMP)) 183 + perror("ioctl"), exit(1); 184 + __atomic_store_n(&cover[0], 0, __ATOMIC_RELAXED); 185 + read(-1, NULL, 0); 186 + /* 读取收集到的比较操作数的数量。 */ 187 + n = __atomic_load_n(&cover[0], __ATOMIC_RELAXED); 188 + for (i = 0; i < n; i++) { 189 + uint64_t ip; 190 + 191 + type = cover[i * KCOV_WORDS_PER_CMP + 1]; 192 + /* arg1 和 arg2 - 比较的两个操作数。 */ 193 + arg1 = cover[i * KCOV_WORDS_PER_CMP + 2]; 194 + arg2 = cover[i * KCOV_WORDS_PER_CMP + 3]; 195 + /* ip - 调用者的地址。 */ 196 + ip = cover[i * KCOV_WORDS_PER_CMP + 4]; 197 + /* 操作数的大小。 */ 198 + size = 1 << ((type & KCOV_CMP_MASK) >> 1); 199 + /* is_const - 当操作数是一个编译时常量时为真。*/ 200 + is_const = type & KCOV_CMP_CONST; 201 + printf("ip: 0x%lx type: 0x%lx, arg1: 0x%lx, arg2: 0x%lx, " 202 + "size: %lu, %s\n", 203 + ip, type, arg1, arg2, size, 204 + is_const ? "const" : "non-const"); 205 + } 206 + if (ioctl(fd, KCOV_DISABLE, 0)) 207 + perror("ioctl"), exit(1); 208 + /* 释放资源。 */ 209 + if (munmap(cover, COVER_SIZE * sizeof(unsigned long))) 210 + perror("munmap"), exit(1); 211 + if (close(fd)) 212 + perror("close"), exit(1); 213 + return 0; 214 + } 215 + 216 + 注意 KCOV 的模式(代码覆盖率收集或操作数比较收集)是互斥的。 217 + 218 + 远程覆盖率收集 219 + -------------- 220 + 221 + 除了从用户空间进程发布的系统调用句柄收集覆盖率数据以外,KCOV 也可以从部分在其 222 + 他上下文中执行的内核中收集覆盖率 - 称为“远程”覆盖率。 223 + 224 + 使用 KCOV 收集远程覆盖率要求: 225 + 226 + 1. 修改内核源码并使用 ``kcov_remote_start`` 和 ``kcov_remote_stop`` 来标注要收集 227 + 覆盖率的代码片段。 228 + 229 + 2. 在用户空间的收集覆盖率的进程应使用 ``KCOV_REMOTE_ENABLE`` 而不是 ``KCOV_ENABLE``。 230 + 231 + ``kcov_remote_start`` 和 ``kcov_remote_stop`` 的标注以及 ``KCOV_REMOTE_ENABLE`` 232 + ioctl 都接受可以识别特定覆盖率收集片段的句柄。句柄的使用方式取决于匹配代码片段执 233 + 行的上下文。 234 + 235 + KCOV 支持在如下上下文中收集远程覆盖率: 236 + 237 + 1. 全局内核后台任务。这些任务是内核启动时创建的数量有限的实例(如,每一个 238 + USB HCD 产生一个 USB ``hub_event`` 工作器)。 239 + 240 + 2. 局部内核后台任务。这些任务通常是由于用户空间进程与某些内核接口进行交互时产 241 + 生的,并且通常在进程退出时会被停止(如,vhost 工作器)。 242 + 243 + 3. 软中断。 244 + 245 + 对于 #1 和 #3,必须选择一个独特的全局句柄并将其传递给对应的 246 + ``kcov_remote_start`` 调用。一个用户空间进程必须将该句柄存储在 247 + ``kcov_remote_arg`` 结构体的 ``handle`` 数组字段中并将其传递给 248 + ``KCOV_REMOTE_ENABLE``。这会将使用的 KCOV 设备附加到由此句柄引用的代码片段。多个全局 249 + 句柄标识的不同代码片段可以一次性传递。 250 + 251 + 对于 #2,用户空间进程必须通过 ``kcov_remote_arg`` 结构体的 ``common_handle`` 字段 252 + 传递一个非零句柄。这个通用句柄将会被保存在当前 ``task_struct`` 结构体的 253 + ``kcov_handle`` 字段中并且需要通过自定义内核代码的修改来传递给新创建的本地任务 254 + 。这些任务需要在 ``kcov_remote_start`` 和 ``kcov_remote_stop`` 标注中依次使用传递过来的 255 + 句柄。 256 + 257 + KCOV 对全局句柄和通用句柄均遵循一个预定义的格式。每一个句柄都是一个 ``u64`` 整形 258 + 。当前,只有最高位和低四位字节被使用。第 4-7 字节是保留位并且值必须为 0。 259 + 260 + 对于全局句柄,最高位的字节表示该句柄属于的子系统的标识。比如,KCOV 使用 ``1`` 261 + 表示 USB 子系统类型。全局句柄的低 4 字节表示子系统中任务实例的标识。比如,每一 262 + 个 ``hub_event`` 工作器使用 USB 总线号作为任务实例的标识。 263 + 264 + 对于通用句柄,使用一个保留值 ``0`` 作为子系统标识,因为这些句柄不属于一个特定 265 + 的子系统。通用句柄的低 4 字节用于识别有用户进程生成的所有本地句柄的集合实例, 266 + 该进程将通用句柄传递给 ``KCOV_REMOTE_ENABLE``。 267 + 268 + 实际上,如果只从系统中的单个用户空间进程收集覆盖率,那么可以使用任意值作为通用 269 + 句柄的实例标识。然而,如果通用句柄被多个用户空间进程使用,每个进程必须使用唯一 270 + 的实例标识。一个选择是使用进程标识作为通用句柄实例的标识。 271 + 272 + 下面的程序演示了如何使用 KCOV 从一个由进程产生的本地任务和处理 USB 总线的全局 273 + 任务 #1 收集覆盖率: 274 + 275 + .. code-block:: c 276 + 277 + /* 包含和上文一样的头文件和宏定义。 */ 278 + 279 + struct kcov_remote_arg { 280 + __u32 trace_mode; 281 + __u32 area_size; 282 + __u32 num_handles; 283 + __aligned_u64 common_handle; 284 + __aligned_u64 handles[0]; 285 + }; 286 + 287 + #define KCOV_INIT_TRACE _IOR('c', 1, unsigned long) 288 + #define KCOV_DISABLE _IO('c', 101) 289 + #define KCOV_REMOTE_ENABLE _IOW('c', 102, struct kcov_remote_arg) 290 + 291 + #define COVER_SIZE (64 << 10) 292 + 293 + #define KCOV_TRACE_PC 0 294 + 295 + #define KCOV_SUBSYSTEM_COMMON (0x00ull << 56) 296 + #define KCOV_SUBSYSTEM_USB (0x01ull << 56) 297 + 298 + #define KCOV_SUBSYSTEM_MASK (0xffull << 56) 299 + #define KCOV_INSTANCE_MASK (0xffffffffull) 300 + 301 + static inline __u64 kcov_remote_handle(__u64 subsys, __u64 inst) 302 + { 303 + if (subsys & ~KCOV_SUBSYSTEM_MASK || inst & ~KCOV_INSTANCE_MASK) 304 + return 0; 305 + return subsys | inst; 306 + } 307 + 308 + #define KCOV_COMMON_ID 0x42 309 + #define KCOV_USB_BUS_NUM 1 310 + 311 + int main(int argc, char **argv) 312 + { 313 + int fd; 314 + unsigned long *cover, n, i; 315 + struct kcov_remote_arg *arg; 316 + 317 + fd = open("/sys/kernel/debug/kcov", O_RDWR); 318 + if (fd == -1) 319 + perror("open"), exit(1); 320 + if (ioctl(fd, KCOV_INIT_TRACE, COVER_SIZE)) 321 + perror("ioctl"), exit(1); 322 + cover = (unsigned long*)mmap(NULL, COVER_SIZE * sizeof(unsigned long), 323 + PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); 324 + if ((void*)cover == MAP_FAILED) 325 + perror("mmap"), exit(1); 326 + 327 + /* 通过通用句柄和 USB 总线 #1 启用代码覆盖率收集。 */ 328 + arg = calloc(1, sizeof(*arg) + sizeof(uint64_t)); 329 + if (!arg) 330 + perror("calloc"), exit(1); 331 + arg->trace_mode = KCOV_TRACE_PC; 332 + arg->area_size = COVER_SIZE; 333 + arg->num_handles = 1; 334 + arg->common_handle = kcov_remote_handle(KCOV_SUBSYSTEM_COMMON, 335 + KCOV_COMMON_ID); 336 + arg->handles[0] = kcov_remote_handle(KCOV_SUBSYSTEM_USB, 337 + KCOV_USB_BUS_NUM); 338 + if (ioctl(fd, KCOV_REMOTE_ENABLE, arg)) 339 + perror("ioctl"), free(arg), exit(1); 340 + free(arg); 341 + 342 + /* 343 + * 在这里用户需要触发执行一个内核代码段 344 + * 该代码段要么使用通用句柄标识 345 + * 要么触发了一些 USB 总线 #1 上的一些活动。 346 + */ 347 + sleep(2); 348 + 349 + n = __atomic_load_n(&cover[0], __ATOMIC_RELAXED); 350 + for (i = 0; i < n; i++) 351 + printf("0x%lx\n", cover[i + 1]); 352 + if (ioctl(fd, KCOV_DISABLE, 0)) 353 + perror("ioctl"), exit(1); 354 + if (munmap(cover, COVER_SIZE * sizeof(unsigned long))) 355 + perror("munmap"), exit(1); 356 + if (close(fd)) 357 + perror("close"), exit(1); 358 + return 0; 359 + }
+229
Documentation/translations/zh_CN/dev-tools/kmemleak.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 2 + 3 + .. include:: ../disclaimer-zh_CN.rst 4 + 5 + :Original: Documentation/dev-tools/kmemleak.rst 6 + :Translator: 刘浩阳 Haoyang Liu <tttturtleruss@hust.edu.cn> 7 + 8 + 内核内存泄露检测器 9 + ================== 10 + 11 + Kmemleak 提供了一个类似 `可追踪的垃圾收集器 <https://en.wikipedia.org/wiki/Tra 12 + cing_garbage_collection>`_ 的方法来检测可能的内核内存泄漏,不同的是孤立对象不会 13 + 被释放,而是仅通过 /sys/kernel/debug/kmemleak 报告。Valgrind 工具 14 + (``memcheck --leak-check``)使用了一种相似的方法来检测用户空间应用中的内存泄 15 + 露。 16 + 17 + 用法 18 + ---- 19 + 20 + "Kernel hacking" 中的 CONFIG_DEBUG_KMEMLEAK 必须被启用。一个内核线程每10分钟 21 + (默认情况下)扫描一次内存,并且打印出新发现的未被引用的对象个数。 22 + 如果 ``debugfs`` 没有挂载,则执行:: 23 + 24 + # mount -t debugfs nodev /sys/kernel/debug/ 25 + 26 + 显示所有扫描出的可能的内存泄漏的细节信息:: 27 + 28 + # cat /sys/kernel/debug/kmemleak 29 + 30 + 启动一次中等程度的内存扫描:: 31 + 32 + # echo scan > /sys/kernel/debug/kmemleak 33 + 34 + 清空当前所有可能的内存泄露列表:: 35 + 36 + # echo clear > /sys/kernel/debug/kmemleak 37 + 38 + 当再次读取 ``/sys/kernel/debug/kmemleak`` 文件时,将会输出自上次扫描以来检测到的 39 + 新的内存泄露。 40 + 41 + 注意,孤立目标是通过被分配时间来排序的,列表开始的对象可能会导致后续的对象都被 42 + 识别为孤立对象。 43 + 44 + 可以通过写入 ``/sys/kernel/debug/kmemleak`` 文件在运行时修改内存扫描参数。下面是 45 + 支持的参数: 46 + 47 + 48 + * off 49 + 禁用 kmemleak(不可逆) 50 + * stack=on 51 + 开启任务栈扫描(默认) 52 + * stack=off 53 + 禁用任务栈扫描 54 + * scan=on 55 + 开启自动内存扫描线程(默认) 56 + * scan=off 57 + 关闭自动内存扫描线程 58 + * scan=<secs>; 59 + 设定自动内存扫描间隔,以秒为单位(默认值为 600,设置为 0 表示停 60 + 止自动扫描) 61 + * scan 62 + 触发一次内存扫描 63 + * clear 64 + 通过标记所有当前已报告的未被引用对象为灰,从而清空当前可能的内存泄露列 65 + 表;如果 kmemleak 被禁用,则释放所有 kmemleak 对象,。 66 + * dump=<addr> 67 + 输出存储在 <addr> 中的对象信息 68 + 69 + 可以通过在内核命令行中传递 ``kmemleak=off`` 参数从而在启动时禁用 Kmemleak。 70 + 71 + 在 kmemleak 初始化之前就可能会有内存分配或释放,这些操作被存储在一个早期日志缓 72 + 冲区中。缓冲区的大小通过 CONFIG_DEBUG_KMEMLEAK_MEM_POOL_SIZE 选项配置。 73 + 74 + 如果 CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF 被启用,则 kmemleak 默认被禁用。在内核命 75 + 令行中传递 ``kmemleak=on`` 参数来开启这个功能。 76 + 77 + 如果出现 "Error while writing to stdout" 或 "write_loop: Invalid argument" 这样 78 + 的错误,请确认 kmemleak 被正确启用。 79 + 80 + 基础算法 81 + -------- 82 + 83 + 通过 :c:func:`kmalloc`, :c:func:`vmalloc`, :c:func:`kmem_cache_alloc` 以及同类 84 + 函数均被跟踪,指针,包括一些额外的信息如大小和栈追踪等,都被存储在红黑树中。 85 + 对应的释放函数调用也被追踪,并从 kmemleak 数据结构中移除相应指针。 86 + 87 + 对于一个已分配的内存块,如果通过扫描内存(包括保存寄存器)没有发现任何指针指向 88 + 它的起始地址或者其中的任何位置,则认为这块内存是孤立的。这意味着内核无法将该内 89 + 存块的地址传递给一个释放内存函数,这块内存便被认为泄露了。 90 + 91 + 扫描算法步骤: 92 + 93 + 1. 标记所有对象为白色(最后剩下的白色对象被认为是孤立的) 94 + 2. 从数据节和栈开始扫描内存,检测每个值是否是红黑树中存储的地址。如果一个指向 95 + 白色对象的指针被检测到,则将该对象标记为灰色。 96 + 3. 扫描灰色对象引用的其他对象(有些白色对象可能会变为灰色并被添加到灰名单末尾 97 + )直到灰名单为空。 98 + 4. 剩余的白色对象就被认为是孤立的并通过 /sys/kernel/debug/kmemleak 报告。 99 + 100 + 有些指向已分配的内存块的指针存储在内核内部的数据结构中,它们不能被检测为孤立。 101 + 为了避免这种情况,kmemleak 也存储了指向需要被查找的内存块范围内的任意地址的地址 102 + 数量,如此一来这些内存便不会被认为泄露。一个例子是 __vmalloc()。 103 + 104 + 用 kmemleak 测试特定部分 105 + ------------------------ 106 + 107 + 在初始化启动阶段 /sys/kernel/debug/kmemleak 的输出可能会很多,这也可能是你在开发 108 + 时编写的漏洞百出的代码导致的。为了解决这种情况你可以使用 'clear' 命令来清除 109 + /sys/kernel/debug/kmemleak 输出的所有的未引用对象。在执行 'clear' 后执行 'scan' 110 + 可以发现新的未引用对象,这将会有利你测试代码的特定部分。 111 + 112 + 为了用一个空的 kmemleak 测试一个特定部分,执行:: 113 + 114 + # echo clear > /sys/kernel/debug/kmemleak 115 + ... 测试你的内核或者模块 ... 116 + # echo scan > /sys/kernel/debug/kmemleak 117 + 118 + 然后像平常一样获得报告:: 119 + 120 + # cat /sys/kernel/debug/kmemleak 121 + 122 + 释放 kmemleak 内核对象 123 + ---------------------- 124 + 125 + 为了允许访问先前发现的内存泄露,当用户禁用或发生致命错误导致 kmemleak 126 + 被禁用时,内核中的 kmemleak 对象不会被释放。这些对象可能会占用很大 127 + 一部分物理内存。 128 + 129 + 在这种情况下,你可以用如下命令回收这些内存:: 130 + 131 + # echo clear > /sys/kernel/debug/kmemleak 132 + 133 + Kmemleak API 134 + ------------ 135 + 136 + 在 include/linux/kmemleak.h 头文件中查看函数原型: 137 + 138 + - ``kmemleak_init`` - 初始化 kmemleak 139 + - ``kmemleak_alloc`` - 通知一个内存块的分配 140 + - ``kmemleak_alloc_percpu`` - 通知一个 percpu 类型的内存分配 141 + - ``kmemleak_vmalloc`` - 通知一个使用 vmalloc() 的内存分配 142 + - ``kmemleak_free`` - 通知一个内存块的释放 143 + - ``kmemleak_free_part`` - 通知一个部分的内存释放 144 + - ``kmemleak_free_percpu`` - 通知一个 percpu 类型的内存释放 145 + - ``kmemleak_update_trace`` - 更新分配对象过程的栈追踪 146 + - ``kmemleak_not_leak`` - 标记一个对象内存为未泄露的 147 + - ``kmemleak_ignore`` - 不要扫描或报告某个对象未泄露的 148 + - ``kmemleak_scan_area`` - 在内存块中添加扫描区域 149 + - ``kmemleak_no_scan`` - 不扫描某个内存块 150 + - ``kmemleak_erase`` - 在指针变量中移除某个旧的值 151 + - ``kmemleak_alloc_recursive`` - 和 kmemleak_alloc 效果相同但会检查是否有递归的 152 + 内存分配 153 + - ``kmemleak_free_recursive`` - 和 kmemleak_free 效果相同但会检查是否有递归的 154 + 内存释放 155 + 156 + 下列函数使用一个物理地址作为对象指针并且只在地址有一个 lowmem 映射时做出相应的 157 + 行为: 158 + 159 + - ``kmemleak_alloc_phys`` 160 + - ``kmemleak_free_part_phys`` 161 + - ``kmemleak_ignore_phys`` 162 + 163 + 解决假阳性/假阴性 164 + ----------------- 165 + 166 + 假阴性是指由于在内存扫描中有值指向该对象导致 kmemleak 没有报告的实际存在的内存 167 + 泄露(孤立对象)。为了减少假阴性的出现次数,kmemleak 提供了 kmemleak_ignore, 168 + kmemleak_scan_area,kmemleak_no_scan 和 kmemleak_erase 函数(见上)。 169 + 任务栈也会增加假阴性的数量并且默认不开启对它们的扫描。 170 + 171 + 假阳性是对象被误报为内存泄露(孤立对象)。对于已知未泄露的对象,kmemleak 172 + 提供了 kmemleak_not_leak 函数。同时 kmemleak_ignore 可以用于标记已知不包含任何 173 + 其他指针的内存块,标记后该内存块不会再被扫描。 174 + 175 + 一些被报告的泄露仅仅是暂时的,尤其是在 SMP(对称多处理)系统中,因为其指针 176 + 暂存在 CPU 寄存器或栈中。Kmemleak 定义了 MSECS_MIN_AGE(默认值为 1000) 177 + 来表示一个被报告为内存泄露的对象的最小存活时间。 178 + 179 + 限制和缺点 180 + ---------- 181 + 182 + 主要的缺点是内存分配和释放的性能下降。为了避免其他的损失,只有当 183 + /sys/kernel/debug/kmemleak 文件被读取时才会进行内存扫描。无论如何,这个工具是出于 184 + 调试的目标,性能表现可能不是最重要的。 185 + 186 + 为了保持算法简单,kmemleak 寻找指向某个内存块范围中的任何值。这可能会引发假阴性 187 + 现象的出现。但是,最后一个真正的内存泄露也会变得明显。 188 + 189 + 非指针值的数据是假阴性的另一个来源。在将来的版本中,kmemleak 仅仅会扫 190 + 描已分配结构体中的指针成员。这个特性会解决上述很多的假阴性情况。 191 + 192 + Kmemleak 会报告假阳性。这可能发生在某些被分配的内存块不需要被释放的情况下 193 + (某些 init_call 函数中),指针的计算是通过其他方法而不是常规的 container_of 宏 194 + 或是指针被存储在 kmemleak 没有扫描的地方。 195 + 196 + 页分配和 ioremap 不会被追踪。 197 + 198 + 使用 kmemleak-test 测试 199 + ----------------------- 200 + 201 + 为了检测是否成功启用了 kmemleak,你可以使用一个故意制造内存泄露的模块 202 + kmemleak-test。设置 CONFIG_SAMPLE_KMEMLEAK 为模块(不能作为内建模块使用) 203 + 并且启动启用了 kmemleak 的内核。加载模块并执行一次扫描:: 204 + 205 + # modprobe kmemleak-test 206 + # echo scan > /sys/kernel/debug/kmemleak 207 + 208 + 注意你可能无法立刻或在第一次扫描后得到结果。当 kmemleak 得到结果,将会输出日 209 + 志 ``kmemleak: <count of leaks> new suspected memory leaks`` 。然后通过读取文件 210 + 获取信息:: 211 + 212 + # cat /sys/kernel/debug/kmemleak 213 + unreferenced object 0xffff89862ca702e8 (size 32): 214 + comm "modprobe", pid 2088, jiffies 4294680594 (age 375.486s) 215 + hex dump (first 32 bytes): 216 + 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk 217 + 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b a5 kkkkkkkkkkkkkkk. 218 + backtrace: 219 + [<00000000e0a73ec7>] 0xffffffffc01d2036 220 + [<000000000c5d2a46>] do_one_initcall+0x41/0x1df 221 + [<0000000046db7e0a>] do_init_module+0x55/0x200 222 + [<00000000542b9814>] load_module+0x203c/0x2480 223 + [<00000000c2850256>] __do_sys_finit_module+0xba/0xe0 224 + [<000000006564e7ef>] do_syscall_64+0x43/0x110 225 + [<000000007c873fa6>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 226 + ... 227 + 228 + 用 ``rmmod kmemleak_test`` 移除模块时也会触发 229 + kmemleak 的结果输出。
+91
Documentation/translations/zh_CN/dev-tools/ubsan.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 2 + 3 + .. include:: ../disclaimer-zh_CN.rst 4 + 5 + :Original: Documentation/dev-tools/ubsan.rst 6 + :Translator: Dongliang Mu <dzm91@hust.edu.cn> 7 + 8 + 未定义行为消毒剂 - UBSAN 9 + ==================================== 10 + 11 + UBSAN是一种动态未定义行为检查工具。 12 + 13 + UBSAN使用编译时插桩捕捉未定义行为。编译器在可能导致未定义行为的操作前插入特定 14 + 检测代码。如果检查失败,即检测到未定义行为,__ubsan_handle_* 函数将被调用打印 15 + 错误信息。 16 + 17 + GCC自4.9.x [1_] (详见 ``-fsanitize=undefined`` 选项及其子选项)版本后引入这 18 + 一特性。GCC 5.x 版本实现了更多检查器 [2_]。 19 + 20 + 报告样例 21 + -------------- 22 + 23 + :: 24 + 25 + ================================================================================ 26 + UBSAN: Undefined behaviour in ../include/linux/bitops.h:110:33 27 + shift exponent 32 is to large for 32-bit type 'unsigned int' 28 + CPU: 0 PID: 0 Comm: swapper Not tainted 4.4.0-rc1+ #26 29 + 0000000000000000 ffffffff82403cc8 ffffffff815e6cd6 0000000000000001 30 + ffffffff82403cf8 ffffffff82403ce0 ffffffff8163a5ed 0000000000000020 31 + ffffffff82403d78 ffffffff8163ac2b ffffffff815f0001 0000000000000002 32 + Call Trace: 33 + [<ffffffff815e6cd6>] dump_stack+0x45/0x5f 34 + [<ffffffff8163a5ed>] ubsan_epilogue+0xd/0x40 35 + [<ffffffff8163ac2b>] __ubsan_handle_shift_out_of_bounds+0xeb/0x130 36 + [<ffffffff815f0001>] ? radix_tree_gang_lookup_slot+0x51/0x150 37 + [<ffffffff8173c586>] _mix_pool_bytes+0x1e6/0x480 38 + [<ffffffff83105653>] ? dmi_walk_early+0x48/0x5c 39 + [<ffffffff8173c881>] add_device_randomness+0x61/0x130 40 + [<ffffffff83105b35>] ? dmi_save_one_device+0xaa/0xaa 41 + [<ffffffff83105653>] dmi_walk_early+0x48/0x5c 42 + [<ffffffff831066ae>] dmi_scan_machine+0x278/0x4b4 43 + [<ffffffff8111d58a>] ? vprintk_default+0x1a/0x20 44 + [<ffffffff830ad120>] ? early_idt_handler_array+0x120/0x120 45 + [<ffffffff830b2240>] setup_arch+0x405/0xc2c 46 + [<ffffffff830ad120>] ? early_idt_handler_array+0x120/0x120 47 + [<ffffffff830ae053>] start_kernel+0x83/0x49a 48 + [<ffffffff830ad120>] ? early_idt_handler_array+0x120/0x120 49 + [<ffffffff830ad386>] x86_64_start_reservations+0x2a/0x2c 50 + [<ffffffff830ad4f3>] x86_64_start_kernel+0x16b/0x17a 51 + ================================================================================ 52 + 53 + 用法 54 + ----- 55 + 56 + 使用如下内核配置启用UBSAN:: 57 + 58 + CONFIG_UBSAN=y 59 + 60 + 使用如下内核配置检查整个内核:: 61 + 62 + CONFIG_UBSAN_SANITIZE_ALL=y 63 + 64 + 为了在特定文件或目录启动代码插桩,需要在相应的内核Makefile中添加一行类似内容: 65 + 66 + - 单文件(如main.o):: 67 + 68 + UBSAN_SANITIZE_main.o := y 69 + 70 + - 一个目录中的所有文件:: 71 + 72 + UBSAN_SANITIZE := y 73 + 74 + 即使设置了``CONFIG_UBSAN_SANITIZE_ALL=y``,为了避免文件被插桩,可使用:: 75 + 76 + UBSAN_SANITIZE_main.o := n 77 + 78 + 与:: 79 + 80 + UBSAN_SANITIZE := n 81 + 82 + 未对齐的内存访问检测可通过开启独立选项 - CONFIG_UBSAN_ALIGNMENT 检测。 83 + 该选项在支持未对齐访问的架构上(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y) 84 + 默认为关闭。该选项仍可通过内核配置启用,但它将产生大量的UBSAN报告。 85 + 86 + 参考文献 87 + ---------- 88 + 89 + .. _1: https://gcc.gnu.org/onlinedocs/gcc-4.9.0/gcc/Debugging-Options.html 90 + .. _2: https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html 91 + .. _3: https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html
+2 -2
Documentation/translations/zh_CN/index.rst
··· 24 24 上的linux-doc邮件列表。 25 25 26 26 顺便说下,中文文档也需要遵守内核编码风格,风格中中文和英文的主要不同就是中文 27 - 的字符标点占用两个英文字符宽度, 所以,当英文要求不要超过每行100个字符时, 28 - 中文就不要超过50个字符。另外,也要注意'-','=' 等符号与相关标题的对齐。在将 27 + 的字符标点占用两个英文字符宽度,所以,当英文要求不要超过每行100个字符时, 28 + 中文就不要超过50个字符。另外,也要注意'-','='等符号与相关标题的对齐。在将 29 29 补丁提交到社区之前,一定要进行必要的 ``checkpatch.pl`` 检查和编译测试。 30 30 31 31 与Linux 内核社区一起工作
+89
Documentation/translations/zh_CN/process/cve.rst
··· 1 + .. include:: ../disclaimer-zh_CN.rst 2 + 3 + :Original: Documentation/process/cve.rst 4 + :Translator: Dongliang Mu <dzm91@hust.edu.cn> 5 + 6 + ==== 7 + CVEs 8 + ==== 9 + 10 + Common Vulnerabilities and Exposure (CVE®) 编号是一种明确的方式来 11 + 识别、定义和登记公开披露的安全漏洞。随着时间的推移,它们在内核项目中的实用性 12 + 已经下降,CVE编号经常以不适当的方式和不适当的原因被分配。因此,内核开发社区 13 + 倾向于避免使用它们。然而,分配CVE与其他形式的安全标识符的持续压力,以及内核 14 + 社区之外的个人和公司的持续滥用,已经清楚地表明内核社区应该控制这些CVE分配。 15 + 16 + Linux内核开发团队确实有能力为潜在的Linux内核安全问题分配CVE。CVE的分配 17 + 独立于 :doc:`安全漏洞报送流程</process/security-bugs>`。 18 + 19 + 所有分配给Linux内核的CVE列表都可以在linux-cve邮件列表的存档中找到,如 20 + https://lore.kernel.org/linux-cve-announce/ 所示。如果想获得已分配 21 + CVE的通知,请“订阅”该邮件列表。要获得分配的CVE通知,请订阅该邮件列表: 22 + `订阅 <https://subspace.kernel.org/subscribing.html>`_。 23 + 24 + 过程 25 + ======= 26 + 27 + 作为正常稳定发布过程的一部分,可能存在安全问题的内核更改由负责CVE编号分配 28 + 的开发人员识别,并自动为其分配CVE编号。这些CVE分配会作为经常性的通告经常 29 + 发布在linux-cve-announce邮件列表上。 30 + 31 + 注意,由于Linux内核在系统中的特殊地位,几乎任何漏洞都可能被利用来危害内核 32 + 的安全性,但是当漏洞被修复后,利用的可能性通常不明显。因此,CVE分配团队过于 33 + 谨慎,并将CVE编号分配给他们识别的任何漏洞修复。这就解释了为什么Linux内核 34 + 团队会发布大量的CVE。 35 + 36 + 如果CVE分配团队错过了任何用户认为应该分配CVE的特定修复,请发送电子邮件到 37 + <cve@kernel.org>,那里的团队将与您一起工作。请注意,任何潜在的安全问题 38 + 不应被发送到此邮箱,它仅用于为已发布的内核树中的漏洞修复分配CVE。如果你觉得 39 + 自己发现了一个未修复的安全问题,请按照 :doc:`安全漏洞报送流程 40 + </process/security-bugs>` 发送到Linux内核社区。 41 + 42 + Linux内核不会给未修复的安全问题自动分配CVE;只有在安全修复可用且应用于 43 + 稳定内核树后,CVE分配才会自动发生,并且它将通过安全修复的Git提交编号进行 44 + 跟踪。如果有人希望在提交安全修复之前分配CVE,请联系内核CVE分配团队,从 45 + 他们的一批保留编号中获得相应的CVE编号。 46 + 47 + 对于目前没有得到稳定与长期维护内核团队积极支持的内核版本中发现的任何问题, 48 + 都不会分配CVEs。当前支持的内核分支列表可以在 https://kernel.org/releases.html 49 + 上找到。 50 + 51 + 被分配CVE的争论 52 + ========================= 53 + 54 + 对于为特定内核修改分配的CVE,其争论或修改的权限仅属于受影响子系统的维护者。 55 + 这一原则确保了漏洞报告的高度准确性和可问责性。只有那些具有深厚专业知识和 56 + 对子系统深入了解的维护人员,才能有效评估内核漏洞的有效性和范围,并确定其适当的 57 + CVE指定策略。在此指定权限之外,任何争论或修改CVE的尝试都可能导致混乱、 58 + 不准确的报告,并最终危及系统。 59 + 60 + 无效的CVE 61 + ============ 62 + 63 + 如果发现的安全问题存在于仅由某Linux发行版支持的Linux内核中,即安全问题是 64 + 由于Linux发行版所做的更改导致,或者Linux的发行版内核版本不再是Linux内核 65 + 社区支持的内核版本,那么Linux内核CVE团队将不能分配CVE,必须从Linux 66 + 发行版本身请求。 67 + 68 + 内核CVE分配团队以外的任何团队对Linux内核支持版本分配的CVE都不应被 69 + 视为有效CVE。请通知内核CVE分配团队,以便他们可以通过CNA修复措施使 70 + 这些条目失效。 71 + 72 + 特定CVE的适用性 73 + ============================== 74 + 75 + 由于Linux内核可以以许多不同方式使用,外部用户可以通过许多不同方式访问它,或者 76 + 根本没有访问,因此任何特定CVE的适用性取决于Linux用户,而不是内核CVE分配团队。 77 + 请不要与我们联系来尝试确定任何特定CVE的适用性。 78 + 79 + 此外,由于源代码树非常大,而任何一个系统都只使用源代码树的一小部分,因此任何 80 + Linux用户都应该意识到,大量分配的CVEs与他们的系统无关。 81 + 82 + 简而言之,我们不知道您的用例,也不知道您使用的是内核的哪个部分,因此我们无法 83 + 确定特定的CVE是否与您的系统相关。 84 + 85 + 与往常一样,最好采用所有发布的内核更改,因为它们是由许多社区成员在一个统一的 86 + 整体中一起进行测试的,而不是作为个别的精选更改。还要注意,对于许多安全问题来 87 + 说,整体问题的解决方案并不是在单个更改中找到的,而是在彼此之上的许多修复的总 88 + 和。理想情况下,CVE将被分配给所有问题的所有修复,但有时我们将无法注意到一些 89 + 修复,因此某些修复可能在没有CVE的情况下被采取。
+1
Documentation/translations/zh_CN/process/index.rst
··· 48 48 :maxdepth: 1 49 49 50 50 embargoed-hardware-issues 51 + cve 51 52 52 53 TODOLIST: 53 54
+4 -4
Documentation/translations/zh_CN/process/submitting-patches.rst
··· 333 333 未参与其开发。签署链应当反映补丁传播到维护者并最终传播到Linus所经过的 **真实** 334 334 路径,首个签署指明单个作者的主要作者身份。 335 335 336 - 何时使用Acked-by:,CC:,和Co-Developed by: 336 + 何时使用Acked-by:,Cc:,和Co-developed-by: 337 337 ------------------------------------------ 338 338 339 - Singed-off-by: 标签表示签名者参与了补丁的开发,或者他/她在补丁的传递路径中。 339 + Signed-off-by: 标签表示签名者参与了补丁的开发,或者他/她在补丁的传递路径中。 340 340 341 341 如果一个人没有直接参与补丁的准备或处理,但希望表示并记录他们对补丁的批准/赞成, 342 342 那么他们可以要求在补丁的变更日志中添加一个Acked-by:。 ··· 358 358 Co-developed-by: 声明补丁是由多个开发人员共同创建的;当几个人在一个补丁上工 359 359 作时,它用于给出共同作者(除了From:所给出的作者之外)。因为Co-developed-by: 360 360 表示作者身份,所以每个Co-developed-by:必须紧跟在相关合作作者的签署之后。标准 361 - 签署程序要求Singed-off-by:标签的顺序应尽可能反映补丁的时间历史,无论作者是通 362 - 过From:还是Co-developed-by:表明。值得注意的是,最后一个Singed-off-by:必须是 361 + 签署程序要求Signed-off-by:标签的顺序应尽可能反映补丁的时间历史,无论作者是通 362 + 过From:还是Co-developed-by:表明。值得注意的是,最后一个Signed-off-by:必须是 363 363 提交补丁的开发人员。 364 364 365 365 注意,如果From:作者也是电子邮件标题的From:行中列出的人,则From:标签是可选的。
+9 -5
Documentation/translations/zh_CN/rust/arch-support.rst
··· 16 16 17 17 下面是目前可以工作的架构的一般总结。支持程度与 ``MAINTAINERS`` 文件中的``S`` 值相对应: 18 18 19 - ============ ================ ============================================== 20 - 架构 支持水平 限制因素 21 - ============ ================ ============================================== 22 - ``x86`` Maintained 只有 ``x86_64`` 23 - ============ ================ ============================================== 19 + ============= ================ ============================================== 20 + 架构 支持水平 限制因素 21 + ============= ================ ============================================== 22 + ``arm64`` Maintained 只有小端序 23 + ``loongarch`` Maintained \- 24 + ``riscv`` Maintained 只有 ``riscv64`` 25 + ``um`` Maintained 只有 ``x86_64`` 26 + ``x86`` Maintained 只有 ``x86_64`` 27 + ============= ================ ==============================================
+12
Documentation/translations/zh_CN/rust/coding-guidelines.rst
··· 157 157 158 158 https://doc.rust-lang.org/rustdoc/how-to-write-documentation.html 159 159 160 + 此外,内核支持通过在链接目标前添加 ``srctree/`` 来创建相对于源代码树的链接。例如: 161 + 162 + .. code-block:: rust 163 + 164 + //! C header: [`include/linux/printk.h`](srctree/include/linux/printk.h) 165 + 166 + 或者: 167 + 168 + .. code-block:: rust 169 + 170 + /// [`struct mutex`]: srctree/include/linux/mutex.h 171 + 160 172 161 173 命名 162 174 ----
+1 -1
Documentation/translations/zh_CN/rust/general-information.rst
··· 32 32 33 33 要在你的网络浏览器中本地阅读该文档,请运行如:: 34 34 35 - xdg-open rust/doc/kernel/index.html 35 + xdg-open Documentation/output/rust/rustdoc/kernel/index.html 36 36 37 37 要了解如何编写文档,请看 coding-guidelines.rst 。 38 38
+34 -16
Documentation/translations/zh_CN/rust/quick-start.rst
··· 37 37 需要一个特定版本的Rust编译器。较新的版本可能会也可能不会工作,因为就目前而言,内核依赖 38 38 于一些不稳定的Rust特性。 39 39 40 - 如果使用的是 ``rustup`` ,请进入检出的源代码目录并运行:: 40 + 如果使用的是 ``rustup`` ,请进入内核编译目录(或者用 ``--path=<build-dir>`` 参数 41 + 来 ``设置`` sub-command)并运行:: 41 42 42 43 rustup override set $(scripts/min-tool-version.sh rustc) 43 44 44 - 或者从以下网址获取一个独立的安装程序或安装 ``rustup`` : 45 + +这将配置你的工作目录使用正确版本的 ``rustc``,而不影响你的默认工具链。 45 46 46 - https://www.rust-lang.org 47 + 请注意覆盖应用当前的工作目录(和它的子目录)。 48 + 49 + 如果你使用 ``rustup``, 可以从下面的链接拉取一个单独的安装程序: 50 + 51 + https://forge.rust-lang.org/infra/other-installation-methods.html#standalone 47 52 48 53 49 54 Rust标准库源代码 ··· 62 57 63 58 这些组件是按工具链安装的,因此以后升级Rust编译器版本需要重新添加组件。 64 59 65 - 否则,如果使用独立的安装程序,可以将Rust仓库克隆到工具链的安装文件夹中:: 60 + 否则,如果使用独立的安装程序,可以将Rust源码树下载到安装工具链的文件夹中:: 66 61 67 - git clone --recurse-submodules \ 68 - --branch $(scripts/min-tool-version.sh rustc) \ 69 - https://github.com/rust-lang/rust \ 70 - $(rustc --print sysroot)/lib/rustlib/src/rust 62 + curl -L "https://static.rust-lang.org/dist/rust-src-$(scripts/min-tool-version.sh rustc).tar.gz" | 63 + tar -xzf - -C "$(rustc --print sysroot)/lib" \ 64 + "rust-src-$(scripts/min-tool-version.sh rustc)/rust-src/lib/" \ 65 + --strip-components=3 71 66 72 - 在这种情况下,以后升级Rust编译器版本需要手动更新这个克隆的仓库。 67 + 在这种情况下,以后升级Rust编译器版本需要手动更新这个源代码树(这可以通过移除 68 + ``$(rustc --print sysroot)/lib/rustlib/src/rust`` ,然后重新执行上 69 + 面的命令做到)。 73 70 74 71 75 72 libclang 76 73 ******** 77 74 78 75 ``bindgen`` 使用 ``libclang`` (LLVM的一部分)来理解内核中的C代码,这意味着需要安 79 - 装LLVM;同在开启 ``CC=clang`` 或 ``LLVM=1`` 时编译内核一样。 76 + 装LLVM;同在开启``LLVM=1`` 时编译内核一样。 80 77 81 78 Linux发行版中可能会有合适的包,所以最好先检查一下。 82 79 ··· 101 94 102 95 通过以下方式安装它(注意,这将从源码下载并构建该工具):: 103 96 104 - cargo install --locked --version $(scripts/min-tool-version.sh bindgen) bindgen 97 + cargo install --locked --version $(scripts/min-tool-version.sh bindgen) bindgen-cli 98 + 99 + ``bindgen`` 需要找到合适的 ``libclang`` 才能工作。如果没有找到(或者找到的 100 + ``libclang`` 与应该使用的 ``libclang`` 不同),则可以使用 ``clang-sys`` 101 + 理解的环境变量(Rust绑定创建的 ``bindgen`` 用来访问 ``libclang``): 102 + 103 + 104 + * ``LLVM_CONFIG_PATH`` 可以指向一个 ``llvm-config`` 可执行文件。 105 + 106 + * 或者 ``LIBCLANG_PATH`` 可以指向 ``libclang`` 共享库或包含它的目录。 107 + 108 + * 或者 ``CLANG_PATH`` 可以指向 ``clang`` 可执行文件。 109 + 110 + 详情请参阅 ``clang-sys`` 的文档: 105 111 106 112 107 113 开发依赖 ··· 183 163 一起使用,以实现语法高亮、补全、转到定义和其他功能。 184 164 185 165 ``rust-analyzer`` 需要一个配置文件, ``rust-project.json``, 它可以由 ``rust-analyzer`` 186 - Make 目标生成。 166 + Make 目标生成:: 167 + 168 + make LLVM=1 rust-analyzer 187 169 188 170 189 171 配置 ··· 210 188 用完整的LLVM工具链构建内核是目前支持的最佳设置。即:: 211 189 212 190 make LLVM=1 213 - 214 - 对于不支持完整LLVM工具链的架构,使用:: 215 - 216 - make CC=clang 217 191 218 192 使用GCC对某些配置也是可行的,但目前它是非常试验性的。 219 193
+1 -1
Documentation/translations/zh_TW/process/submit-checklist.rst
··· 31 31 32 32 c) 使用 ``O=builddir`` 時可以成功編譯 33 33 34 - d) 任何 Doucmentation/ 下的變更都能成功構建且不引入新警告/錯誤。 34 + d) 任何 Documentation/ 下的變更都能成功構建且不引入新警告/錯誤。 35 35 用 ``make htmldocs`` 或 ``make pdfdocs`` 檢驗構建情況並修復問題。 36 36 37 37 3) 通過使用本地交叉編譯工具或其他一些構建設施在多個CPU體系結構上構建。
+4 -4
Documentation/translations/zh_TW/process/submitting-patches.rst
··· 334 334 未參與其開發。簽署鏈應當反映補丁傳播到維護者並最終傳播到Linus所經過的 **真實** 335 335 路徑,首個簽署指明單個作者的主要作者身份。 336 336 337 - 何時使用Acked-by:,CC:,和Co-Developed by: 337 + 何時使用Acked-by:,Cc:,和Co-developed-by: 338 338 ------------------------------------------ 339 339 340 - Singed-off-by: 標籤表示簽名者參與了補丁的開發,或者他/她在補丁的傳遞路徑中。 340 + Signed-off-by: 標籤表示簽名者參與了補丁的開發,或者他/她在補丁的傳遞路徑中。 341 341 342 342 如果一個人沒有直接參與補丁的準備或處理,但希望表示並記錄他們對補丁的批准/贊成, 343 343 那麼他們可以要求在補丁的變更日誌中添加一個Acked-by:。 ··· 359 359 Co-developed-by: 聲明補丁是由多個開發人員共同創建的;當幾個人在一個補丁上工 360 360 作時,它用於給出共同作者(除了From:所給出的作者之外)。因爲Co-developed-by: 361 361 表示作者身份,所以每個Co-developed-by:必須緊跟在相關合作作者的簽署之後。標準 362 - 簽署程序要求Singed-off-by:標籤的順序應儘可能反映補丁的時間歷史,無論作者是通 363 - 過From:還是Co-developed-by:表明。值得注意的是,最後一個Singed-off-by:必須是 362 + 簽署程序要求Signed-off-by:標籤的順序應儘可能反映補丁的時間歷史,無論作者是通 363 + 過From:還是Co-developed-by:表明。值得注意的是,最後一個Signed-off-by:必須是 364 364 提交補丁的開發人員。 365 365 366 366 注意,如果From:作者也是電子郵件標題的From:行中列出的人,則From:標籤是可選的。
+5 -4
MAINTAINERS
··· 993 993 994 994 AMD HSMP DRIVER 995 995 M: Naveen Krishna Chatradhi <naveenkrishna.chatradhi@amd.com> 996 - R: Carlos Bilbao <carlos.bilbao@amd.com> 996 + R: Carlos Bilbao <carlos.bilbao.osdev@gmail.com> 997 997 L: platform-driver-x86@vger.kernel.org 998 998 S: Maintained 999 999 F: Documentation/arch/x86/amd_hsmp.rst ··· 5376 5376 5377 5377 CONFIDENTIAL COMPUTING THREAT MODEL FOR X86 VIRTUALIZATION (SNP/TDX) 5378 5378 M: Elena Reshetova <elena.reshetova@intel.com> 5379 - M: Carlos Bilbao <carlos.bilbao@amd.com> 5379 + M: Carlos Bilbao <carlos.bilbao.osdev@gmail.com> 5380 5380 S: Maintained 5381 5381 F: Documentation/security/snp-tdx-threat-model.rst 5382 5382 ··· 6425 6425 P: Documentation/doc-guide/maintainer-profile.rst 6426 6426 T: git git://git.lwn.net/linux.git docs-next 6427 6427 F: Documentation/ 6428 + F: scripts/check-variable-fonts.sh 6428 6429 F: scripts/documentation-file-ref-check 6429 6430 F: scripts/kernel-doc 6430 6431 F: scripts/sphinx-pre-install ··· 10627 10626 F: drivers/video/fbdev/imsttfb.c 10628 10627 10629 10628 INDEX OF FURTHER KERNEL DOCUMENTATION 10630 - M: Carlos Bilbao <carlos.bilbao@amd.com> 10629 + M: Carlos Bilbao <carlos.bilbao.osdev@gmail.com> 10631 10630 S: Maintained 10632 10631 F: Documentation/process/kernel-docs.rst 10633 10632 ··· 20714 20713 F: drivers/media/dvb-frontends/sp2* 20715 20714 20716 20715 SPANISH DOCUMENTATION 20717 - M: Carlos Bilbao <carlos.bilbao@amd.com> 20716 + M: Carlos Bilbao <carlos.bilbao.osdev@gmail.com> 20718 20717 R: Avadhut Naik <avadhut.naik@amd.com> 20719 20718 S: Maintained 20720 20719 F: Documentation/translations/sp_SP/
+3 -4
mm/Kconfig
··· 333 333 334 334 While the randomization improves cache utilization it may 335 335 negatively impact workloads on platforms without a cache. For 336 - this reason, by default, the randomization is enabled only 337 - after runtime detection of a direct-mapped memory-side-cache. 338 - Otherwise, the randomization may be force enabled with the 339 - 'page_alloc.shuffle' kernel command line parameter. 336 + this reason, by default, the randomization is not enabled even 337 + if SHUFFLE_PAGE_ALLOCATOR=y. The randomization may be force enabled 338 + with the 'page_alloc.shuffle' kernel command line parameter. 340 339 341 340 Say Y if unsure. 342 341
+115
scripts/check-variable-fonts.sh
··· 1 + #!/bin/sh 2 + # SPDX-License-Identifier: GPL-2.0-only 3 + # Copyright (C) Akira Yokosawa, 2024 4 + # 5 + # For "make pdfdocs", reports of build errors of translations.pdf started 6 + # arriving early 2024 [1, 2]. It turned out that Fedora and openSUSE 7 + # tumbleweed have started deploying variable-font [3] format of "Noto CJK" 8 + # fonts [4, 5]. For PDF, a LaTeX package named xeCJK is used for CJK 9 + # (Chinese, Japanese, Korean) pages. xeCJK requires XeLaTeX/XeTeX, which 10 + # does not (and likely never will) understand variable fonts for historical 11 + # reasons. 12 + # 13 + # The build error happens even when both of variable- and non-variable-format 14 + # fonts are found on the build system. To make matters worse, Fedora enlists 15 + # variable "Noto CJK" fonts in the requirements of langpacks-ja, -ko, -zh_CN, 16 + # -zh_TW, etc. Hence developers who have interest in CJK pages are more 17 + # likely to encounter the build errors. 18 + # 19 + # This script is invoked from the error path of "make pdfdocs" and emits 20 + # suggestions if variable-font files of "Noto CJK" fonts are in the list of 21 + # fonts accessible from XeTeX. 22 + # 23 + # References: 24 + # [1]: https://lore.kernel.org/r/8734tqsrt7.fsf@meer.lwn.net/ 25 + # [2]: https://lore.kernel.org/r/1708585803.600323099@f111.i.mail.ru/ 26 + # [3]: https://en.wikipedia.org/wiki/Variable_font 27 + # [4]: https://fedoraproject.org/wiki/Changes/Noto_CJK_Variable_Fonts 28 + # [5]: https://build.opensuse.org/request/show/1157217 29 + # 30 + #=========================================================================== 31 + # Workarounds for building translations.pdf 32 + #=========================================================================== 33 + # 34 + # * Denylist "variable font" Noto CJK fonts. 35 + # - Create $HOME/deny-vf/fontconfig/fonts.conf from template below, with 36 + # tweaks if necessary. Remove leading "# ". 37 + # - Path of fontconfig/fonts.conf can be overridden by setting an env 38 + # variable FONTS_CONF_DENY_VF. 39 + # 40 + # * Template: 41 + # ----------------------------------------------------------------- 42 + # <?xml version="1.0"?> 43 + # <!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd"> 44 + # <fontconfig> 45 + # <!-- 46 + # Ignore variable-font glob (not to break xetex) 47 + # --> 48 + # <selectfont> 49 + # <rejectfont> 50 + # <!-- 51 + # for Fedora 52 + # --> 53 + # <glob>/usr/share/fonts/google-noto-*-cjk-vf-fonts</glob> 54 + # <!-- 55 + # for openSUSE tumbleweed 56 + # --> 57 + # <glob>/usr/share/fonts/truetype/Noto*CJK*-VF.otf</glob> 58 + # </rejectfont> 59 + # </selectfont> 60 + # </fontconfig> 61 + # ----------------------------------------------------------------- 62 + # 63 + # The denylisting is activated for "make pdfdocs". 64 + # 65 + # * For skipping CJK pages in PDF 66 + # - Uninstall texlive-xecjk. 67 + # Denylisting is not needed in this case. 68 + # 69 + # * For printing CJK pages in PDF 70 + # - Need non-variable "Noto CJK" fonts. 71 + # * Fedora 72 + # - google-noto-sans-cjk-fonts 73 + # - google-noto-serif-cjk-fonts 74 + # * openSUSE tumbleweed 75 + # - Non-variable "Noto CJK" fonts are not available as distro packages 76 + # as of April, 2024. Fetch a set of font files from upstream Noto 77 + # CJK Font released at: 78 + # https://github.com/notofonts/noto-cjk/tree/main/Sans#super-otc 79 + # and at: 80 + # https://github.com/notofonts/noto-cjk/tree/main/Serif#super-otc 81 + # , then uncompress and deploy them. 82 + # - Remember to update fontconfig cache by running fc-cache. 83 + # 84 + # !!! Caution !!! 85 + # Uninstalling "variable font" packages can be dangerous. 86 + # They might be depended upon by other packages important for your work. 87 + # Denylisting should be less invasive, as it is effective only while 88 + # XeLaTeX runs in "make pdfdocs". 89 + 90 + # Default per-user fontconfig path (overridden by env variable) 91 + : ${FONTS_CONF_DENY_VF:=$HOME/deny-vf} 92 + 93 + export XDG_CONFIG_HOME=${FONTS_CONF_DENY_VF} 94 + 95 + notocjkvffonts=`fc-list : file family variable | \ 96 + grep 'variable=True' | \ 97 + grep -E -e 'Noto (Sans|Sans Mono|Serif) CJK' | \ 98 + sed -e 's/^/ /' -e 's/: Noto S.*$//' | sort | uniq` 99 + 100 + if [ "x$notocjkvffonts" != "x" ] ; then 101 + echo '=============================================================================' 102 + echo 'XeTeX is confused by "variable font" files listed below:' 103 + echo "$notocjkvffonts" 104 + echo 105 + echo 'For CJK pages in PDF, they need to be hidden from XeTeX by denylisting.' 106 + echo 'Or, CJK pages can be skipped by uninstalling texlive-xecjk.' 107 + echo 108 + echo 'For more info on denylisting, other options, and variable font, see header' 109 + echo 'comments of scripts/check-variable-fonts.sh.' 110 + echo '=============================================================================' 111 + fi 112 + 113 + # As this script is invoked from Makefile's error path, always error exit 114 + # regardless of whether any variable font is discovered or not. 115 + exit 1
+3 -2
scripts/kernel-doc
··· 62 62 63 63 # match expressions used to find embedded type information 64 64 my $type_constant = '\b``([^\`]+)``\b'; 65 - my $type_constant2 = '\%([-_\w]+)'; 65 + my $type_constant2 = '\%([-_*\w]+)'; 66 66 my $type_func = '(\w+)\(\)'; 67 67 my $type_param = '\@(\w*((\.\w+)|(->\w+))*(\.\.\.)?)'; 68 68 my $type_param_ref = '([\!~\*]?)\@(\w*((\.\w+)|(->\w+))*(\.\.\.)?)'; ··· 1151 1151 # - first eat non-declaration parameters and rewrite for final match 1152 1152 # - then remove macro, outer parens, and trailing semicolon 1153 1153 $members =~ s/\bstruct_group\s*\(([^,]*,)/STRUCT_GROUP(/gos; 1154 - $members =~ s/\bstruct_group_(attr|tagged)\s*\(([^,]*,){2}/STRUCT_GROUP(/gos; 1154 + $members =~ s/\bstruct_group_attr\s*\(([^,]*,){2}/STRUCT_GROUP(/gos; 1155 + $members =~ s/\bstruct_group_tagged\s*\(([^,]*),([^,]*),/struct $1 $2; STRUCT_GROUP(/gos; 1155 1156 $members =~ s/\b__struct_group\s*\(([^,]*,){3}/STRUCT_GROUP(/gos; 1156 1157 $members =~ s/\bSTRUCT_GROUP(\(((?:(?>[^)(]+)|(?1))*)\))[^;]*;/$2/gos; 1157 1158
+4 -1
scripts/sphinx-pre-install
··· 514 514 { 515 515 my %map = ( 516 516 "python-sphinx" => "python3-sphinx", 517 + "yaml" => "python3-yaml", 517 518 "virtualenv" => "python3-virtualenv", 518 519 "dot" => "graphviz", 519 520 "convert" => "ImageMagick", ··· 558 557 sub give_arch_linux_hints() 559 558 { 560 559 my %map = ( 560 + "yaml" => "python-yaml", 561 561 "virtualenv" => "python-virtualenv", 562 562 "dot" => "graphviz", 563 563 "convert" => "imagemagick", 564 - "xelatex" => "texlive-bin", 564 + "xelatex" => "texlive-xetex", 565 565 "latexmk" => "texlive-core", 566 566 "rsvg-convert" => "extra/librsvg", 567 567 ); ··· 589 587 sub give_gentoo_hints() 590 588 { 591 589 my %map = ( 590 + "yaml" => "dev-python/pyyaml", 592 591 "virtualenv" => "dev-python/virtualenv", 593 592 "dot" => "media-gfx/graphviz", 594 593 "convert" => "media-gfx/imagemagick",