Skip to content

Commit eae2177

Browse files
committed
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 <[email protected]>: (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 ...
2 parents e9f57eb + 9f273c2 commit eae2177

File tree

203 files changed

+3642
-3991
lines changed

Some content is hidden

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

203 files changed

+3642
-3991
lines changed

CREDITS

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1856,6 +1856,16 @@ S: Korte Heul 95
18561856
S: 1403 ND BUSSUM
18571857
S: The Netherlands
18581858

1859+
N: Martin Kepplinger
1860+
1861+
1862+
W: http://www.martinkepplinger.com
1863+
D: mma8452 accelerators iio driver
1864+
D: Kernel cleanups
1865+
S: Garnisonstraße 26
1866+
S: 4020 Linz
1867+
S: Austria
1868+
18591869
N: Karl Keyte
18601870
18611871
D: Disk usage statistics and modifications to line printer driver

Documentation/DMA-API-HOWTO.txt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -951,16 +951,6 @@ to "Closing".
951951
alignment constraints (e.g. the alignment constraints about 64-bit
952952
objects).
953953

954-
3) 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-
964954
Closing
965955

966956
This document, and the API itself, would not be in its current

Documentation/cgroup-v2.txt

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -819,6 +819,78 @@ PAGE_SIZE multiple when read back.
819819
the cgroup. This may not exactly match the number of
820820
processes killed but should generally be close.
821821

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+
822894

823895
5-2-2. General Usage
824896

@@ -1291,3 +1363,20 @@ allocation from the slack available in other groups or the rest of the
12911363
system than killing the group. Otherwise, memory.max is there to
12921364
limit this type of spillover and ultimately contain buggy or even
12931365
malicious applications.
1366+
1367+
The combined memory+swap accounting and limiting is replaced by real
1368+
control over swap space.
1369+
1370+
The main argument for a combined memory+swap facility in the original
1371+
cgroup design was that global or parental pressure would always be
1372+
able to swap all anonymous memory of a child group, regardless of the
1373+
child's own (possibly untrusted) configuration. However, untrusted
1374+
groups can sabotage swapping by other means - such as referencing its
1375+
anonymous memory in a tight loop - and an admin can not assume full
1376+
swappability when overcommitting untrusted jobs.
1377+
1378+
For trusted jobs, on the other hand, a combined counter is not an
1379+
intuitive userspace interface, and it flies in the face of the idea
1380+
that cgroup controllers should account and limit specific physical
1381+
resources. Swap space is a resource like all others in the system,
1382+
and that's why unified hierarchy allows distributing it separately.

Documentation/features/io/dma_map_attrs/arch-support.txt

Lines changed: 0 additions & 40 deletions
This file was deleted.

Documentation/filesystems/vfat.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,16 @@ dos1xfloppy -- If set, use a fallback default BIOS Parameter Block
180180

181181
<bool>: 0,1,yes,no,true,false
182182

183+
LIMITATION
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+
183193
TODO
184194
----------------------------------------------------------------------
185195
* Need to get rid of the raw scanning stuff. Instead, always use

Documentation/kernel-parameters.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
611611
cgroup.memory= [KNL] Pass options to the cgroup memory controller.
612612
Format: <string>
613613
nosocket -- Disable socket memory accounting.
614+
nokmem -- Disable kernel memory accounting.
614615

615616
checkreqprot [SELINUX] Set initial checkreqprot flag value.
616617
Format: { "0" | "1" }

Documentation/sysctl/kernel.txt

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -825,14 +825,13 @@ via the /proc/sys interface:
825825
Each write syscall must fully contain the sysctl value to be
826826
written, and multiple writes on the same sysctl file descriptor
827827
will rewrite the sysctl value, regardless of file position.
828-
0 - (default) Same behavior as above, but warn about processes that
829-
perform writes to a sysctl file descriptor when the file position
830-
is not 0.
831-
1 - Respect file position when writing sysctl strings. Multiple writes
832-
will append to the sysctl value buffer. Anything past the max length
833-
of the sysctl value buffer will be ignored. Writes to numeric sysctl
834-
entries must always be at file position 0 and the value must be
835-
fully contained in the buffer sent in the write syscall.
828+
0 - Same behavior as above, but warn about processes that perform writes
829+
to a sysctl file descriptor when the file position is not 0.
830+
1 - (default) Respect file position when writing sysctl strings. Multiple
831+
writes will append to the sysctl value buffer. Anything past the max
832+
length of the sysctl value buffer will be ignored. Writes to numeric
833+
sysctl entries must always be at file position 0 and the value must
834+
be fully contained in the buffer sent in the write syscall.
836835

837836
==============================================================
838837

Documentation/ubsan.txt

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
Undefined Behavior Sanitizer - UBSAN
2+
3+
Overview
4+
--------
5+
6+
UBSAN is a runtime undefined behaviour checker.
7+
8+
UBSAN uses compile-time instrumentation to catch undefined behavior (UB).
9+
Compiler inserts code that perform certain kinds of checks before operations
10+
that may cause UB. If check fails (i.e. UB detected) __ubsan_handle_*
11+
function called to print error message.
12+
13+
GCC has that feature since 4.9.x [1] (see -fsanitize=undefined option and
14+
its suboptions). GCC 5.x has more checkers implemented [2].
15+
16+
Report 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+
47+
Usage
48+
-----
49+
50+
To enable UBSAN configure kernel with:
51+
52+
CONFIG_UBSAN=y
53+
54+
and to check the entire kernel:
55+
56+
CONFIG_UBSAN_SANITIZE_ALL=y
57+
58+
To enable instrumentation for specific files or directories, add a line
59+
similar 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+
67+
To exclude files from being instrumented even if
68+
CONFIG_UBSAN_SANITIZE_ALL=y, use:
69+
70+
UBSAN_SANITIZE_main.o := n
71+
and:
72+
UBSAN_SANITIZE := n
73+
74+
Detection of unaligned accesses controlled through the separate option -
75+
CONFIG_UBSAN_ALIGNMENT. It's off by default on architectures that support
76+
unaligned accesses (CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y). One could
77+
still enable it in config, just note that it will produce a lot of UBSAN
78+
reports.
79+
80+
References
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

0 commit comments

Comments
 (0)