Skip to content

Commit fdff7c2

Browse files
author
Ingo Molnar
committed
Merge branch 'linus' into perf/urgent, to synchronize with upstream
Signed-off-by: Ingo Molnar <[email protected]>
2 parents f1ec3a5 + b3a6082 commit fdff7c2

File tree

3,382 files changed

+218565
-60376
lines changed

Some content is hidden

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

3,382 files changed

+218565
-60376
lines changed

.mailmap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ Juha Yrjola <at solidboot.com>
139139
Juha Yrjola <[email protected]>
140140
Juha Yrjola <[email protected]>
141141
142+
142143
Kay Sievers <[email protected]>
143144
Kenneth W Chen <[email protected]>
144145
Konstantin Khlebnikov <[email protected]> <[email protected]>
@@ -210,6 +211,10 @@ Paolo 'Blaisorblade' Giarrusso <[email protected]>
210211
Patrick Mochel <[email protected]>
211212
212213
214+
215+
216+
217+
213218
Peter A Jonsson <[email protected]>
214219
Peter Oruba <[email protected]>
215220
Peter Oruba <[email protected]>

Documentation/ABI/testing/ima_policy

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ Description:
2525
lsm: [[subj_user=] [subj_role=] [subj_type=]
2626
[obj_user=] [obj_role=] [obj_type=]]
2727
option: [[appraise_type=]] [template=] [permit_directio]
28-
[appraise_flag=]
28+
[appraise_flag=] [keyrings=]
2929
base: func:= [BPRM_CHECK][MMAP_CHECK][CREDS_CHECK][FILE_CHECK][MODULE_CHECK]
3030
[FIRMWARE_CHECK]
3131
[KEXEC_KERNEL_CHECK] [KEXEC_INITRAMFS_CHECK]
32-
[KEXEC_CMDLINE]
32+
[KEXEC_CMDLINE] [KEY_CHECK]
3333
mask:= [[^]MAY_READ] [[^]MAY_WRITE] [[^]MAY_APPEND]
3434
[[^]MAY_EXEC]
3535
fsmagic:= hex value
@@ -42,6 +42,9 @@ Description:
4242
appraise_flag:= [check_blacklist]
4343
Currently, blacklist check is only for files signed with appended
4444
signature.
45+
keyrings:= list of keyrings
46+
(eg, .builtin_trusted_keys|.ima). Only valid
47+
when action is "measure" and func is KEY_CHECK.
4548
template:= name of a defined IMA template type
4649
(eg, ima-ng). Only valid when action is "measure".
4750
pcr:= decimal value
@@ -113,3 +116,12 @@ Description:
113116
Example of appraise rule allowing modsig appended signatures:
114117

115118
appraise func=KEXEC_KERNEL_CHECK appraise_type=imasig|modsig
119+
120+
Example of measure rule using KEY_CHECK to measure all keys:
121+
122+
measure func=KEY_CHECK
123+
124+
Example of measure rule using KEY_CHECK to only measure
125+
keys added to .builtin_trusted_keys or .ima keyring:
126+
127+
measure func=KEY_CHECK keyrings=.builtin_trusted_keys|.ima
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
What: /sys/bus/mdio_bus/devices/.../statistics/
2+
Date: January 2020
3+
KernelVersion: 5.6
4+
5+
Description:
6+
This folder contains statistics about global and per
7+
MDIO bus address statistics.
8+
9+
What: /sys/bus/mdio_bus/devices/.../statistics/transfers
10+
Date: January 2020
11+
KernelVersion: 5.6
12+
13+
Description:
14+
Total number of transfers for this MDIO bus.
15+
16+
What: /sys/bus/mdio_bus/devices/.../statistics/errors
17+
Date: January 2020
18+
KernelVersion: 5.6
19+
20+
Description:
21+
Total number of transfer errors for this MDIO bus.
22+
23+
What: /sys/bus/mdio_bus/devices/.../statistics/writes
24+
Date: January 2020
25+
KernelVersion: 5.6
26+
27+
Description:
28+
Total number of write transactions for this MDIO bus.
29+
30+
What: /sys/bus/mdio_bus/devices/.../statistics/reads
31+
Date: January 2020
32+
KernelVersion: 5.6
33+
34+
Description:
35+
Total number of read transactions for this MDIO bus.
36+
37+
What: /sys/bus/mdio_bus/devices/.../statistics/transfers_<addr>
38+
Date: January 2020
39+
KernelVersion: 5.6
40+
41+
Description:
42+
Total number of transfers for this MDIO bus address.
43+
44+
What: /sys/bus/mdio_bus/devices/.../statistics/errors_<addr>
45+
Date: January 2020
46+
KernelVersion: 5.6
47+
48+
Description:
49+
Total number of transfer errors for this MDIO bus address.
50+
51+
What: /sys/bus/mdio_bus/devices/.../statistics/writes_<addr>
52+
Date: January 2020
53+
KernelVersion: 5.6
54+
55+
Description:
56+
Total number of write transactions for this MDIO bus address.
57+
58+
What: /sys/bus/mdio_bus/devices/.../statistics/reads_<addr>
59+
Date: January 2020
60+
KernelVersion: 5.6
61+
62+
Description:
63+
Total number of read transactions for this MDIO bus address.

Documentation/RCU/NMI-RCU.txt renamed to Documentation/RCU/NMI-RCU.rst

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
.. _NMI_rcu_doc:
2+
13
Using RCU to Protect Dynamic NMI Handlers
4+
=========================================
25

36

47
Although RCU is usually used to protect read-mostly data structures,
@@ -9,7 +12,7 @@ work in "arch/x86/oprofile/nmi_timer_int.c" and in
912
"arch/x86/kernel/traps.c".
1013

1114
The relevant pieces of code are listed below, each followed by a
12-
brief explanation.
15+
brief explanation::
1316

1417
static int dummy_nmi_callback(struct pt_regs *regs, int cpu)
1518
{
@@ -18,12 +21,12 @@ brief explanation.
1821

1922
The dummy_nmi_callback() function is a "dummy" NMI handler that does
2023
nothing, but returns zero, thus saying that it did nothing, allowing
21-
the NMI handler to take the default machine-specific action.
24+
the NMI handler to take the default machine-specific action::
2225

2326
static nmi_callback_t nmi_callback = dummy_nmi_callback;
2427

2528
This nmi_callback variable is a global function pointer to the current
26-
NMI handler.
29+
NMI handler::
2730

2831
void do_nmi(struct pt_regs * regs, long error_code)
2932
{
@@ -53,11 +56,12 @@ anyway. However, in practice it is a good documentation aid, particularly
5356
for anyone attempting to do something similar on Alpha or on systems
5457
with aggressive optimizing compilers.
5558

56-
Quick Quiz: Why might the rcu_dereference_sched() be necessary on Alpha,
57-
given that the code referenced by the pointer is read-only?
59+
Quick Quiz:
60+
Why might the rcu_dereference_sched() be necessary on Alpha, given that the code referenced by the pointer is read-only?
5861

62+
:ref:`Answer to Quick Quiz <answer_quick_quiz_NMI>`
5963

60-
Back to the discussion of NMI and RCU...
64+
Back to the discussion of NMI and RCU::
6165

6266
void set_nmi_callback(nmi_callback_t callback)
6367
{
@@ -68,7 +72,7 @@ The set_nmi_callback() function registers an NMI handler. Note that any
6872
data that is to be used by the callback must be initialized up -before-
6973
the call to set_nmi_callback(). On architectures that do not order
7074
writes, the rcu_assign_pointer() ensures that the NMI handler sees the
71-
initialized values.
75+
initialized values::
7276

7377
void unset_nmi_callback(void)
7478
{
@@ -82,7 +86,7 @@ up any data structures used by the old NMI handler until execution
8286
of it completes on all other CPUs.
8387

8488
One way to accomplish this is via synchronize_rcu(), perhaps as
85-
follows:
89+
follows::
8690

8791
unset_nmi_callback();
8892
synchronize_rcu();
@@ -98,24 +102,23 @@ to free up the handler's data as soon as synchronize_rcu() returns.
98102
Important note: for this to work, the architecture in question must
99103
invoke nmi_enter() and nmi_exit() on NMI entry and exit, respectively.
100104

105+
.. _answer_quick_quiz_NMI:
101106

102-
Answer to Quick Quiz
103-
104-
Why might the rcu_dereference_sched() be necessary on Alpha, given
105-
that the code referenced by the pointer is read-only?
107+
Answer to Quick Quiz:
108+
Why might the rcu_dereference_sched() be necessary on Alpha, given that the code referenced by the pointer is read-only?
106109

107-
Answer: The caller to set_nmi_callback() might well have
108-
initialized some data that is to be used by the new NMI
109-
handler. In this case, the rcu_dereference_sched() would
110-
be needed, because otherwise a CPU that received an NMI
111-
just after the new handler was set might see the pointer
112-
to the new NMI handler, but the old pre-initialized
113-
version of the handler's data.
110+
The caller to set_nmi_callback() might well have
111+
initialized some data that is to be used by the new NMI
112+
handler. In this case, the rcu_dereference_sched() would
113+
be needed, because otherwise a CPU that received an NMI
114+
just after the new handler was set might see the pointer
115+
to the new NMI handler, but the old pre-initialized
116+
version of the handler's data.
114117

115-
This same sad story can happen on other CPUs when using
116-
a compiler with aggressive pointer-value speculation
117-
optimizations.
118+
This same sad story can happen on other CPUs when using
119+
a compiler with aggressive pointer-value speculation
120+
optimizations.
118121

119-
More important, the rcu_dereference_sched() makes it
120-
clear to someone reading the code that the pointer is
121-
being protected by RCU-sched.
122+
More important, the rcu_dereference_sched() makes it
123+
clear to someone reading the code that the pointer is
124+
being protected by RCU-sched.

Documentation/RCU/arrayRCU.txt renamed to Documentation/RCU/arrayRCU.rst

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
1-
Using RCU to Protect Read-Mostly Arrays
1+
.. _array_rcu_doc:
22

3+
Using RCU to Protect Read-Mostly Arrays
4+
=======================================
35

46
Although RCU is more commonly used to protect linked lists, it can
57
also be used to protect arrays. Three situations are as follows:
68

7-
1. Hash Tables
9+
1. :ref:`Hash Tables <hash_tables>`
810

9-
2. Static Arrays
11+
2. :ref:`Static Arrays <static_arrays>`
1012

11-
3. Resizeable Arrays
13+
3. :ref:`Resizable Arrays <resizable_arrays>`
1214

1315
Each of these three situations involves an RCU-protected pointer to an
1416
array that is separately indexed. It might be tempting to consider use
1517
of RCU to instead protect the index into an array, however, this use
16-
case is -not- supported. The problem with RCU-protected indexes into
18+
case is **not** supported. The problem with RCU-protected indexes into
1719
arrays is that compilers can play way too many optimization games with
1820
integers, which means that the rules governing handling of these indexes
1921
are far more trouble than they are worth. If RCU-protected indexes into
@@ -24,30 +26,38 @@ to be safely used.
2426
That aside, each of the three RCU-protected pointer situations are
2527
described in the following sections.
2628

29+
.. _hash_tables:
2730

2831
Situation 1: Hash Tables
32+
------------------------
2933

3034
Hash tables are often implemented as an array, where each array entry
3135
has a linked-list hash chain. Each hash chain can be protected by RCU
3236
as described in the listRCU.txt document. This approach also applies
3337
to other array-of-list situations, such as radix trees.
3438

39+
.. _static_arrays:
3540

3641
Situation 2: Static Arrays
42+
--------------------------
3743

3844
Static arrays, where the data (rather than a pointer to the data) is
3945
located in each array element, and where the array is never resized,
4046
have not been used with RCU. Rik van Riel recommends using seqlock in
4147
this situation, which would also have minimal read-side overhead as long
4248
as updates are rare.
4349

44-
Quick Quiz: Why is it so important that updates be rare when
45-
using seqlock?
50+
Quick Quiz:
51+
Why is it so important that updates be rare when using seqlock?
52+
53+
:ref:`Answer to Quick Quiz <answer_quick_quiz_seqlock>`
4654

55+
.. _resizable_arrays:
4756

48-
Situation 3: Resizeable Arrays
57+
Situation 3: Resizable Arrays
58+
------------------------------
4959

50-
Use of RCU for resizeable arrays is demonstrated by the grow_ary()
60+
Use of RCU for resizable arrays is demonstrated by the grow_ary()
5161
function formerly used by the System V IPC code. The array is used
5262
to map from semaphore, message-queue, and shared-memory IDs to the data
5363
structure that represents the corresponding IPC construct. The grow_ary()
@@ -60,7 +70,7 @@ the remainder of the new, updates the ids->entries pointer to point to
6070
the new array, and invokes ipc_rcu_putref() to free up the old array.
6171
Note that rcu_assign_pointer() is used to update the ids->entries pointer,
6272
which includes any memory barriers required on whatever architecture
63-
you are running on.
73+
you are running on::
6474

6575
static int grow_ary(struct ipc_ids* ids, int newsize)
6676
{
@@ -112,7 +122,7 @@ a simple check suffices. The pointer to the structure corresponding
112122
to the desired IPC object is placed in "out", with NULL indicating
113123
a non-existent entry. After acquiring "out->lock", the "out->deleted"
114124
flag indicates whether the IPC object is in the process of being
115-
deleted, and, if not, the pointer is returned.
125+
deleted, and, if not, the pointer is returned::
116126

117127
struct kern_ipc_perm* ipc_lock(struct ipc_ids* ids, int id)
118128
{
@@ -144,8 +154,10 @@ deleted, and, if not, the pointer is returned.
144154
return out;
145155
}
146156

157+
.. _answer_quick_quiz_seqlock:
147158

148159
Answer to Quick Quiz:
160+
Why is it so important that updates be rare when using seqlock?
149161

150162
The reason that it is important that updates be rare when
151163
using seqlock is that frequent updates can livelock readers.

Documentation/RCU/index.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,13 @@ RCU concepts
77
.. toctree::
88
:maxdepth: 3
99

10+
arrayRCU
11+
rcubarrier
12+
rcu_dereference
13+
whatisRCU
1014
rcu
1115
listRCU
16+
NMI-RCU
1217
UP
1318

1419
Design/Memory-Ordering/Tree-RCU-Memory-Ordering

Documentation/RCU/lockdep-splat.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ With this change, the rcu_dereference() is always within an RCU
9999
read-side critical section, which again would have suppressed the
100100
above lockdep-RCU splat.
101101

102-
But in this particular case, we don't actually deference the pointer
102+
But in this particular case, we don't actually dereference the pointer
103103
returned from rcu_dereference(). Instead, that pointer is just compared
104104
to the cic pointer, which means that the rcu_dereference() can be replaced
105105
by rcu_access_pointer() as follows:

0 commit comments

Comments
 (0)