Skip to content

Commit 3ab378c

Browse files
committed
Merge patch series "ns: support file handles"
Christian Brauner <brauner@kernel.org> says: For a while now we have supported file handles for pidfds. This has proven to be very useful. Extend the concept to cover namespaces as well. After this patchset it is possible to encode and decode namespace file handles using the commong name_to_handle_at() and open_by_handle_at() apis. Namespaces file descriptors can already be derived from pidfds which means they aren't subject to overmount protection bugs. IOW, it's irrelevant if the caller would not have access to an appropriate /proc/<pid>/ns/ directory as they could always just derive the namespace based on a pidfd already. It has the same advantage as pidfds. It's possible to reliably and for the lifetime of the system refer to a namespace without pinning any resources and to compare them. Permission checking is kept simple. If the caller is located in the namespace the file handle refers to they are able to open it otherwise they must hold privilege over the owning namespace of the relevant namespace. Both the network namespace and the mount namespace already have an associated cookie that isn't recycled and is fully exposed to userspace. Move this into ns_common and use the same id space for all namespaces so they can trivially and reliably be compared. There's more coming based on the iterator infrastructure but the series is large enough and focuses on file handles. Extensive selftests included. * patches from https://lore.kernel.org/20250912-work-namespace-v2-0-1a247645cef5@kernel.org: (33 commits) selftests/namespaces: add file handle selftests selftests/namespaces: add identifier selftests tools: update nsfs.h uapi header nsfs: add missing id retrieval support nsfs: support exhaustive file handles nsfs: support file handles nsfs: add current_in_namespace() ns: add to_<type>_ns() to respective headers uts: support ns lookup user: support ns lookup time: support ns lookup pid: support ns lookup net: support ns lookup ipc: support ns lookup cgroup: support ns lookup mnt: support ns lookup nstree: make iterator generic ns: remove ns_alloc_inum() uts: use ns_common_init() user: use ns_common_init() ... Signed-off-by: Christian Brauner <brauner@kernel.org>
2 parents 8f5ae30 + 28ef38a commit 3ab378c

889 files changed

Lines changed: 12311 additions & 5178 deletions

File tree

Some content is hidden

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

.mailmap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,8 @@ Domen Puncer <domen@coderock.org>
226226
Douglas Gilbert <dougg@torque.net>
227227
Drew Fustini <fustini@kernel.org> <drew@pdp7.com>
228228
<duje@dujemihanovic.xyz> <duje.mihanovic@skole.hr>
229+
Easwar Hariharan <easwar.hariharan@linux.microsoft.com> <easwar.hariharan@intel.com>
230+
Easwar Hariharan <easwar.hariharan@linux.microsoft.com> <eahariha@linux.microsoft.com>
229231
Ed L. Cashin <ecashin@coraid.com>
230232
Elliot Berman <quic_eberman@quicinc.com> <eberman@codeaurora.org>
231233
Enric Balletbo i Serra <eballetbo@kernel.org> <enric.balletbo@collabora.com>

CREDITS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3222,6 +3222,10 @@ D: AIC5800 IEEE 1394, RAW I/O on 1394
32223222
D: Starter of Linux1394 effort
32233223
S: ask per mail for current address
32243224

3225+
N: Boris Pismenny
3226+
E: borisp@mellanox.com
3227+
D: Kernel TLS implementation and offload support.
3228+
32253229
N: Nicolas Pitre
32263230
E: nico@fluxnic.net
32273231
D: StrongARM SA1100 support integrator & hacker
@@ -4168,6 +4172,9 @@ S: 1513 Brewster Dr.
41684172
S: Carrollton, TX 75010
41694173
S: USA
41704174

4175+
N: Dave Watson
4176+
D: Kernel TLS implementation.
4177+
41714178
N: Tim Waugh
41724179
E: tim@cyberelk.net
41734180
D: Co-architect of the parallel-port sharing system

Documentation/ABI/stable/sysfs-block

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ Contact: linux-block@vger.kernel.org
731731
Description:
732732
[RW] If the device is registered for writeback throttling, then
733733
this file shows the target minimum read latency. If this latency
734-
is exceeded in a given window of time (see wb_window_usec), then
734+
is exceeded in a given window of time (see curr_win_nsec), then
735735
the writeback throttling will start scaling back writes. Writing
736736
a value of '0' to this file disables the feature. Writing a
737737
value of '-1' to this file resets the value to the default

Documentation/admin-guide/blockdev/zoned_loop.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ zone_capacity_mb Device zone capacity (must always be equal to or lower than
7979
the zone size. Default: zone size.
8080
conv_zones Total number of conventioanl zones starting from sector 0.
8181
Default: 8.
82-
base_dir Path to the base directoy where to create the directory
82+
base_dir Path to the base directory where to create the directory
8383
containing the zone files of the device.
8484
Default=/var/local/zloop.
8585
The device directory containing the zone files is always

Documentation/admin-guide/cgroup-v2.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,8 +435,8 @@ both cgroups.
435435
Controlling Controllers
436436
-----------------------
437437

438-
Availablity
439-
~~~~~~~~~~~
438+
Availability
439+
~~~~~~~~~~~~
440440

441441
A controller is available in a cgroup when it is supported by the kernel (i.e.,
442442
compiled in, not disabled and not attached to a v1 hierarchy) and listed in the

Documentation/admin-guide/hw-vuln/attack_vector_controls.rst

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,8 @@ Spectre_v1 X
214214
Spectre_v2 X X
215215
Spectre_v2_user X X * (Note 1)
216216
SRBDS X X X X
217-
SRSO X X
218-
SSB (Note 4)
217+
SRSO X X X X
218+
SSB X
219219
TAA X X X X * (Note 2)
220220
TSA X X X X
221221
=============== ============== ============ ============= ============== ============ ========
@@ -229,9 +229,6 @@ Notes:
229229
3 -- Disables SMT if cross-thread mitigations are fully enabled, the CPU is
230230
vulnerable, and STIBP is not supported
231231

232-
4 -- Speculative store bypass is always enabled by default (no kernel
233-
mitigation applied) unless overridden with spec_store_bypass_disable option
234-
235232
When an attack-vector is disabled, all mitigations for the vulnerabilities
236233
listed in the above table are disabled, unless mitigation is required for a
237234
different enabled attack-vector or a mitigation is explicitly selected via a

Documentation/core-api/symbol-namespaces.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,20 +76,21 @@ unit as preprocessor statement. The above example would then read::
7676
within the corresponding compilation unit before the #include for
7777
<linux/export.h>. Typically it's placed before the first #include statement.
7878

79-
Using the EXPORT_SYMBOL_GPL_FOR_MODULES() macro
80-
-----------------------------------------------
79+
Using the EXPORT_SYMBOL_FOR_MODULES() macro
80+
-------------------------------------------
8181

8282
Symbols exported using this macro are put into a module namespace. This
83-
namespace cannot be imported.
83+
namespace cannot be imported. These exports are GPL-only as they are only
84+
intended for in-tree modules.
8485

8586
The macro takes a comma separated list of module names, allowing only those
8687
modules to access this symbol. Simple tail-globs are supported.
8788

8889
For example::
8990

90-
EXPORT_SYMBOL_GPL_FOR_MODULES(preempt_notifier_inc, "kvm,kvm-*")
91+
EXPORT_SYMBOL_FOR_MODULES(preempt_notifier_inc, "kvm,kvm-*")
9192

92-
will limit usage of this symbol to modules whoes name matches the given
93+
will limit usage of this symbol to modules whose name matches the given
9394
patterns.
9495

9596
How to use Symbols exported in Namespaces

Documentation/devicetree/bindings/display/msm/qcom,mdp5.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ properties:
6060
- const: bus
6161
- const: core
6262
- const: vsync
63-
- const: lut
6463
- const: tbu
6564
- const: tbu_rt
6665
# MSM8996 has additional iommu clock

Documentation/devicetree/bindings/net/thead,th1520-gmac.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,13 @@ properties:
6262
items:
6363
- description: GMAC main clock
6464
- description: Peripheral registers interface clock
65+
- description: APB glue registers interface clock
6566

6667
clock-names:
6768
items:
6869
- const: stmmaceth
6970
- const: pclk
71+
- const: apb
7072

7173
interrupts:
7274
items:
@@ -88,8 +90,8 @@ examples:
8890
compatible = "thead,th1520-gmac", "snps,dwmac-3.70a";
8991
reg = <0xe7070000 0x2000>, <0xec003000 0x1000>;
9092
reg-names = "dwmac", "apb";
91-
clocks = <&clk 1>, <&clk 2>;
92-
clock-names = "stmmaceth", "pclk";
93+
clocks = <&clk 1>, <&clk 2>, <&clk 3>;
94+
clock-names = "stmmaceth", "pclk", "apb";
9395
interrupts = <66>;
9496
interrupt-names = "macirq";
9597
phy-mode = "rgmii-id";

Documentation/devicetree/bindings/regulator/infineon,ir38060.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
77
title: Infineon Buck Regulators with PMBUS interfaces
88

99
maintainers:
10-
- Not Me.
10+
- Guenter Roeck <linux@roeck-us.net>
1111

1212
allOf:
1313
- $ref: regulator.yaml#

0 commit comments

Comments
 (0)