aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-01-21 15:32:08 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2016-01-21 15:32:08 -0500
commiteae21770b4fed5597623aad0d618190fa60426ff (patch)
tree23c59fb7a33e93a79525e2b10d56df54d40049d1 /Documentation
parente9f57ebcba563e0cd532926cab83c92bb4d79360 (diff)
parent9f273c24ec5f4a6f785bb83e931b3808a07b459e (diff)
Merge branch 'akpm' (patches from Andrew)
Merge third patch-bomb from Andrew Morton: "I'm pretty much done for -rc1 now: - the rest of MM, basically - lib/ updates - checkpatch, epoll, hfs, fatfs, ptrace, coredump, exit - cpu_mask simplifications - kexec, rapidio, MAINTAINERS etc, etc. - more dma-mapping cleanups/simplifications from hch" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (109 commits) MAINTAINERS: add/fix git URLs for various subsystems mm: memcontrol: add "sock" to cgroup2 memory.stat mm: memcontrol: basic memory statistics in cgroup2 memory controller mm: memcontrol: do not uncharge old page in page cache replacement Documentation: cgroup: add memory.swap.{current,max} description mm: free swap cache aggressively if memcg swap is full mm: vmscan: do not scan anon pages if memcg swap limit is hit swap.h: move memcg related stuff to the end of the file mm: memcontrol: replace mem_cgroup_lruvec_online with mem_cgroup_online mm: vmscan: pass memcg to get_scan_count() mm: memcontrol: charge swap to cgroup2 mm: memcontrol: clean up alloc, online, offline, free functions mm: memcontrol: flatten struct cg_proto mm: memcontrol: rein in the CONFIG space madness net: drop tcp_memcontrol.c mm: memcontrol: introduce CONFIG_MEMCG_LEGACY_KMEM mm: memcontrol: allow to disable kmem accounting for cgroup2 mm: memcontrol: account "kmem" consumers in cgroup2 memory controller mm: memcontrol: move kmem accounting code to CONFIG_MEMCG mm: memcontrol: separate kmem code from legacy tcp accounting code ...
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/DMA-API-HOWTO.txt10
-rw-r--r--Documentation/cgroup-v2.txt89
-rw-r--r--Documentation/features/io/dma_map_attrs/arch-support.txt40
-rw-r--r--Documentation/filesystems/vfat.txt10
-rw-r--r--Documentation/kernel-parameters.txt1
-rw-r--r--Documentation/sysctl/kernel.txt15
-rw-r--r--Documentation/ubsan.txt84
7 files changed, 191 insertions, 58 deletions
diff --git a/Documentation/DMA-API-HOWTO.txt b/Documentation/DMA-API-HOWTO.txt
index d69b3fc64e14..781024ef9050 100644
--- a/Documentation/DMA-API-HOWTO.txt
+++ b/Documentation/DMA-API-HOWTO.txt
@@ -951,16 +951,6 @@ to "Closing".
951 alignment constraints (e.g. the alignment constraints about 64-bit 951 alignment constraints (e.g. the alignment constraints about 64-bit
952 objects). 952 objects).
953 953
9543) Supporting multiple types of IOMMUs
955
956 If your architecture needs to support multiple types of IOMMUs, you
957 can use include/linux/asm-generic/dma-mapping-common.h. It's a
958 library to support the DMA API with multiple types of IOMMUs. Lots
959 of architectures (x86, powerpc, sh, alpha, ia64, microblaze and
960 sparc) use it. Choose one to see how it can be used. If you need to
961 support multiple types of IOMMUs in a single system, the example of
962 x86 or powerpc helps.
963
964 Closing 954 Closing
965 955
966This document, and the API itself, would not be in its current 956This document, and the API itself, would not be in its current
diff --git a/Documentation/cgroup-v2.txt b/Documentation/cgroup-v2.txt
index 31d1f7bf12a1..65b3eac8856c 100644
--- a/Documentation/cgroup-v2.txt
+++ b/Documentation/cgroup-v2.txt
@@ -819,6 +819,78 @@ PAGE_SIZE multiple when read back.
819 the cgroup. This may not exactly match the number of 819 the cgroup. This may not exactly match the number of
820 processes killed but should generally be close. 820 processes killed but should generally be close.
821 821
822 memory.stat
823
824 A read-only flat-keyed file which exists on non-root cgroups.
825
826 This breaks down the cgroup's memory footprint into different
827 types of memory, type-specific details, and other information
828 on the state and past events of the memory management system.
829
830 All memory amounts are in bytes.
831
832 The entries are ordered to be human readable, and new entries
833 can show up in the middle. Don't rely on items remaining in a
834 fixed position; use the keys to look up specific values!
835
836 anon
837
838 Amount of memory used in anonymous mappings such as
839 brk(), sbrk(), and mmap(MAP_ANONYMOUS)
840
841 file
842
843 Amount of memory used to cache filesystem data,
844 including tmpfs and shared memory.
845
846 file_mapped
847
848 Amount of cached filesystem data mapped with mmap()
849
850 file_dirty
851
852 Amount of cached filesystem data that was modified but
853 not yet written back to disk
854
855 file_writeback
856
857 Amount of cached filesystem data that was modified and
858 is currently being written back to disk
859
860 inactive_anon
861 active_anon
862 inactive_file
863 active_file
864 unevictable
865
866 Amount of memory, swap-backed and filesystem-backed,
867 on the internal memory management lists used by the
868 page reclaim algorithm
869
870 pgfault
871
872 Total number of page faults incurred
873
874 pgmajfault
875
876 Number of major page faults incurred
877
878 memory.swap.current
879
880 A read-only single value file which exists on non-root
881 cgroups.
882
883 The total amount of swap currently being used by the cgroup
884 and its descendants.
885
886 memory.swap.max
887
888 A read-write single value file which exists on non-root
889 cgroups. The default is "max".
890
891 Swap usage hard limit. If a cgroup's swap usage reaches this
892 limit, anonymous meomry of the cgroup will not be swapped out.
893
822 894
8235-2-2. General Usage 8955-2-2. General Usage
824 896
@@ -1291,3 +1363,20 @@ allocation from the slack available in other groups or the rest of the
1291system than killing the group. Otherwise, memory.max is there to 1363system than killing the group. Otherwise, memory.max is there to
1292limit this type of spillover and ultimately contain buggy or even 1364limit this type of spillover and ultimately contain buggy or even
1293malicious applications. 1365malicious applications.
1366
1367The combined memory+swap accounting and limiting is replaced by real
1368control over swap space.
1369
1370The main argument for a combined memory+swap facility in the original
1371cgroup design was that global or parental pressure would always be
1372able to swap all anonymous memory of a child group, regardless of the
1373child's own (possibly untrusted) configuration. However, untrusted
1374groups can sabotage swapping by other means - such as referencing its
1375anonymous memory in a tight loop - and an admin can not assume full
1376swappability when overcommitting untrusted jobs.
1377
1378For trusted jobs, on the other hand, a combined counter is not an
1379intuitive userspace interface, and it flies in the face of the idea
1380that cgroup controllers should account and limit specific physical
1381resources. Swap space is a resource like all others in the system,
1382and that's why unified hierarchy allows distributing it separately.
diff --git a/Documentation/features/io/dma_map_attrs/arch-support.txt b/Documentation/features/io/dma_map_attrs/arch-support.txt
deleted file mode 100644
index 51d0f1c02a3e..000000000000
--- a/Documentation/features/io/dma_map_attrs/arch-support.txt
+++ /dev/null
@@ -1,40 +0,0 @@
1#
2# Feature name: dma_map_attrs
3# Kconfig: HAVE_DMA_ATTRS
4# description: arch provides dma_*map*_attrs() APIs
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | ok |
10 | arc: | TODO |
11 | arm: | ok |
12 | arm64: | ok |
13 | avr32: | TODO |
14 | blackfin: | TODO |
15 | c6x: | TODO |
16 | cris: | TODO |
17 | frv: | TODO |
18 | h8300: | ok |
19 | hexagon: | ok |
20 | ia64: | ok |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | TODO |
24 | microblaze: | ok |
25 | mips: | ok |
26 | mn10300: | TODO |
27 | nios2: | TODO |
28 | openrisc: | ok |
29 | parisc: | TODO |
30 | powerpc: | ok |
31 | s390: | ok |
32 | score: | TODO |
33 | sh: | ok |
34 | sparc: | ok |
35 | tile: | ok |
36 | um: | TODO |
37 | unicore32: | ok |
38 | x86: | ok |
39 | xtensa: | TODO |
40 -----------------------
diff --git a/Documentation/filesystems/vfat.txt b/Documentation/filesystems/vfat.txt
index ce1126aceed8..223c32171dcc 100644
--- a/Documentation/filesystems/vfat.txt
+++ b/Documentation/filesystems/vfat.txt
@@ -180,6 +180,16 @@ dos1xfloppy -- If set, use a fallback default BIOS Parameter Block
180 180
181<bool>: 0,1,yes,no,true,false 181<bool>: 0,1,yes,no,true,false
182 182
183LIMITATION
184---------------------------------------------------------------------
185* The fallocated region of file is discarded at umount/evict time
186 when using fallocate with FALLOC_FL_KEEP_SIZE.
187 So, User should assume that fallocated region can be discarded at
188 last close if there is memory pressure resulting in eviction of
189 the inode from the memory. As a result, for any dependency on
190 the fallocated region, user should make sure to recheck fallocate
191 after reopening the file.
192
183TODO 193TODO
184---------------------------------------------------------------------- 194----------------------------------------------------------------------
185* Need to get rid of the raw scanning stuff. Instead, always use 195* Need to get rid of the raw scanning stuff. Instead, always use
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 3ea869d7a31c..cfb2c0f1a4a8 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -611,6 +611,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
611 cgroup.memory= [KNL] Pass options to the cgroup memory controller. 611 cgroup.memory= [KNL] Pass options to the cgroup memory controller.
612 Format: <string> 612 Format: <string>
613 nosocket -- Disable socket memory accounting. 613 nosocket -- Disable socket memory accounting.
614 nokmem -- Disable kernel memory accounting.
614 615
615 checkreqprot [SELINUX] Set initial checkreqprot flag value. 616 checkreqprot [SELINUX] Set initial checkreqprot flag value.
616 Format: { "0" | "1" } 617 Format: { "0" | "1" }
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt
index 73c6b1ef0e84..a93b414672a7 100644
--- a/Documentation/sysctl/kernel.txt
+++ b/Documentation/sysctl/kernel.txt
@@ -825,14 +825,13 @@ via the /proc/sys interface:
825 Each write syscall must fully contain the sysctl value to be 825 Each write syscall must fully contain the sysctl value to be
826 written, and multiple writes on the same sysctl file descriptor 826 written, and multiple writes on the same sysctl file descriptor
827 will rewrite the sysctl value, regardless of file position. 827 will rewrite the sysctl value, regardless of file position.
828 0 - (default) Same behavior as above, but warn about processes that 828 0 - Same behavior as above, but warn about processes that perform writes
829 perform writes to a sysctl file descriptor when the file position 829 to a sysctl file descriptor when the file position is not 0.
830 is not 0. 830 1 - (default) Respect file position when writing sysctl strings. Multiple
831 1 - Respect file position when writing sysctl strings. Multiple writes 831 writes will append to the sysctl value buffer. Anything past the max
832 will append to the sysctl value buffer. Anything past the max length 832 length of the sysctl value buffer will be ignored. Writes to numeric
833 of the sysctl value buffer will be ignored. Writes to numeric sysctl 833 sysctl entries must always be at file position 0 and the value must
834 entries must always be at file position 0 and the value must be 834 be fully contained in the buffer sent in the write syscall.
835 fully contained in the buffer sent in the write syscall.
836 835
837============================================================== 836==============================================================
838 837
diff --git a/Documentation/ubsan.txt b/Documentation/ubsan.txt
new file mode 100644
index 000000000000..f58215ef5797
--- /dev/null
+++ b/Documentation/ubsan.txt
@@ -0,0 +1,84 @@
1Undefined Behavior Sanitizer - UBSAN
2
3Overview
4--------
5
6UBSAN is a runtime undefined behaviour checker.
7
8UBSAN uses compile-time instrumentation to catch undefined behavior (UB).
9Compiler inserts code that perform certain kinds of checks before operations
10that may cause UB. If check fails (i.e. UB detected) __ubsan_handle_*
11function called to print error message.
12
13GCC has that feature since 4.9.x [1] (see -fsanitize=undefined option and
14its suboptions). GCC 5.x has more checkers implemented [2].
15
16Report example
17---------------
18
19 ================================================================================
20 UBSAN: Undefined behaviour in ../include/linux/bitops.h:110:33
21 shift exponent 32 is to large for 32-bit type 'unsigned int'
22 CPU: 0 PID: 0 Comm: swapper Not tainted 4.4.0-rc1+ #26
23 0000000000000000 ffffffff82403cc8 ffffffff815e6cd6 0000000000000001
24 ffffffff82403cf8 ffffffff82403ce0 ffffffff8163a5ed 0000000000000020
25 ffffffff82403d78 ffffffff8163ac2b ffffffff815f0001 0000000000000002
26 Call Trace:
27 [<ffffffff815e6cd6>] dump_stack+0x45/0x5f
28 [<ffffffff8163a5ed>] ubsan_epilogue+0xd/0x40
29 [<ffffffff8163ac2b>] __ubsan_handle_shift_out_of_bounds+0xeb/0x130
30 [<ffffffff815f0001>] ? radix_tree_gang_lookup_slot+0x51/0x150
31 [<ffffffff8173c586>] _mix_pool_bytes+0x1e6/0x480
32 [<ffffffff83105653>] ? dmi_walk_early+0x48/0x5c
33 [<ffffffff8173c881>] add_device_randomness+0x61/0x130
34 [<ffffffff83105b35>] ? dmi_save_one_device+0xaa/0xaa
35 [<ffffffff83105653>] dmi_walk_early+0x48/0x5c
36 [<ffffffff831066ae>] dmi_scan_machine+0x278/0x4b4
37 [<ffffffff8111d58a>] ? vprintk_default+0x1a/0x20
38 [<ffffffff830ad120>] ? early_idt_handler_array+0x120/0x120
39 [<ffffffff830b2240>] setup_arch+0x405/0xc2c
40 [<ffffffff830ad120>] ? early_idt_handler_array+0x120/0x120
41 [<ffffffff830ae053>] start_kernel+0x83/0x49a
42 [<ffffffff830ad120>] ? early_idt_handler_array+0x120/0x120
43 [<ffffffff830ad386>] x86_64_start_reservations+0x2a/0x2c
44 [<ffffffff830ad4f3>] x86_64_start_kernel+0x16b/0x17a
45 ================================================================================
46
47Usage
48-----
49
50To enable UBSAN configure kernel with:
51
52 CONFIG_UBSAN=y
53
54and to check the entire kernel:
55
56 CONFIG_UBSAN_SANITIZE_ALL=y
57
58To enable instrumentation for specific files or directories, add a line
59similar to the following to the respective kernel Makefile:
60
61 For a single file (e.g. main.o):
62 UBSAN_SANITIZE_main.o := y
63
64 For all files in one directory:
65 UBSAN_SANITIZE := y
66
67To exclude files from being instrumented even if
68CONFIG_UBSAN_SANITIZE_ALL=y, use:
69
70 UBSAN_SANITIZE_main.o := n
71 and:
72 UBSAN_SANITIZE := n
73
74Detection of unaligned accesses controlled through the separate option -
75CONFIG_UBSAN_ALIGNMENT. It's off by default on architectures that support
76unaligned accesses (CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y). One could
77still enable it in config, just note that it will produce a lot of UBSAN
78reports.
79
80References
81----------
82
83[1] - https://gcc.gnu.org/onlinedocs/gcc-4.9.0/gcc/Debugging-Options.html
84[2] - https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html