2020-10-21 10:22:33 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-10-21 10:37:11 +10:00
|
|
|
|
2020-12-10 00:06:02 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-03-01 19:25:00 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-10-21 10:22:33 +10:00
|
|
|
|
2025-04-30 20:15:48 -03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-10-21 12:10:44 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-10-21 11:30:35 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-01-21 13:28:21 -03:00
|
|
|
|
|
|
|
|
|
2024-09-21 16:15:30 +02:00
|
|
|
|
2024-01-21 13:28:21 -03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-10-11 11:20:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-10-21 10:37:11 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CIFS: New mount option for cifs.upcall namespace resolution
In the current implementation, the SMB filesystem on a mount point can
trigger upcalls from the kernel to the userspace to enable certain
functionalities like spnego, dns_resolution, amongst others. These upcalls
usually either happen in the context of the mount or in the context of an
application/user. The upcall handler for cifs, cifs.upcall already has
existing code which switches the namespaces to the caller's namespace
before handling the upcall. This behaviour is expected for scenarios like
multiuser mounts, but might not cover all single user scenario with
services such as Kubernetes, where the mount can happen from different
locations such as on the host, from an app container, or a driver pod
which does the mount on behalf of a different pod.
This patch introduces a new mount option called upcall_target, to
customise the upcall behaviour. upcall_target can take 'mount' and 'app'
as possible values. This aids use cases like Kubernetes where the mount
happens on behalf of the application in another container altogether.
Having this new mount option allows the mount command to specify where the
upcall should happen: 'mount' for resolving the upcall to the host
namespace, and 'app' for resolving the upcall to the ns of the calling
thread. This will enable both the scenarios where the Kerberos credentials
can be found on the application namespace or the host namespace to which
just the mount operation is "delegated".
Reviewed-by: Shyam Prasad <shyam.prasad@microsoft.com>
Reviewed-by: Bharath S M <bharathsm@microsoft.com>
Reviewed-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Signed-off-by: Ritvik Budhiraja <rbudhiraja@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
2024-11-11 11:43:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-02 10:59:55 +10:00
|
|
|
|
|
|
|
|
|
2020-12-10 00:06:02 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-02 10:59:55 +10:00
|
|
|
|
|
|
|
|
|
2026-04-09 09:59:19 +00:00
|
|
|
|
2022-05-23 23:17:12 -05:00
|
|
|
|
2020-12-10 00:06:02 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-02 10:59:55 +10:00
|
|
|
|
2020-12-10 00:06:02 -06:00
|
|
|
|
2020-11-02 10:59:55 +10:00
|
|
|
|
|
|
|
|
|
2020-12-10 00:06:02 -06:00
|
|
|
|
2020-11-02 10:59:55 +10:00
|
|
|
|
2020-12-10 00:06:02 -06:00
|
|
|
|
|
|
|
|
|
2020-11-02 10:59:55 +10:00
|
|
|
|
2020-12-10 00:06:02 -06:00
|
|
|
|
|
|
|
|
|
2020-11-02 10:59:55 +10:00
|
|
|
|
|
|
|
|
|
2020-12-10 00:06:02 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-02 10:59:55 +10:00
|
|
|
|
2020-12-10 00:06:02 -06:00
|
|
|
|
|
|
|
|
|
2020-11-02 10:59:55 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-12-10 00:06:02 -06:00
|
|
|
|
|
|
|
|
|
2021-10-14 15:54:26 -05:00
|
|
|
|
2020-11-02 10:59:55 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-12-10 00:06:02 -06:00
|
|
|
|
2020-11-02 10:59:55 +10:00
|
|
|
|
2020-12-11 22:59:29 -06:00
|
|
|
|
CIFS: New mount option for cifs.upcall namespace resolution
In the current implementation, the SMB filesystem on a mount point can
trigger upcalls from the kernel to the userspace to enable certain
functionalities like spnego, dns_resolution, amongst others. These upcalls
usually either happen in the context of the mount or in the context of an
application/user. The upcall handler for cifs, cifs.upcall already has
existing code which switches the namespaces to the caller's namespace
before handling the upcall. This behaviour is expected for scenarios like
multiuser mounts, but might not cover all single user scenario with
services such as Kubernetes, where the mount can happen from different
locations such as on the host, from an app container, or a driver pod
which does the mount on behalf of a different pod.
This patch introduces a new mount option called upcall_target, to
customise the upcall behaviour. upcall_target can take 'mount' and 'app'
as possible values. This aids use cases like Kubernetes where the mount
happens on behalf of the application in another container altogether.
Having this new mount option allows the mount command to specify where the
upcall should happen: 'mount' for resolving the upcall to the host
namespace, and 'app' for resolving the upcall to the ns of the calling
thread. This will enable both the scenarios where the Kerberos credentials
can be found on the application namespace or the host namespace to which
just the mount operation is "delegated".
Reviewed-by: Shyam Prasad <shyam.prasad@microsoft.com>
Reviewed-by: Bharath S M <bharathsm@microsoft.com>
Reviewed-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Signed-off-by: Ritvik Budhiraja <rbudhiraja@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
2024-11-11 11:43:51 +00:00
|
|
|
|
|
|
|
|
|
2024-10-06 19:16:24 +02:00
|
|
|
|
2020-11-02 10:59:55 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-01-17 06:09:16 +00:00
|
|
|
|
2020-11-02 10:59:55 +10:00
|
|
|
|
2021-04-24 21:46:23 -05:00
|
|
|
|
2020-11-02 10:59:55 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-02-23 15:50:57 -06:00
|
|
|
|
2021-02-24 12:12:53 -06:00
|
|
|
|
2022-08-11 00:53:00 -05:00
|
|
|
|
2020-11-02 10:59:55 +10:00
|
|
|
|
|
|
|
|
|
2023-09-01 02:15:14 -05:00
|
|
|
|
2020-11-02 10:59:55 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-04-04 18:06:56 -05:00
|
|
|
|
2020-11-02 10:59:55 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-10-27 12:13:12 +01:00
|
|
|
|
2020-11-02 10:59:55 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-01-21 13:28:21 -03:00
|
|
|
|
CIFS: New mount option for cifs.upcall namespace resolution
In the current implementation, the SMB filesystem on a mount point can
trigger upcalls from the kernel to the userspace to enable certain
functionalities like spnego, dns_resolution, amongst others. These upcalls
usually either happen in the context of the mount or in the context of an
application/user. The upcall handler for cifs, cifs.upcall already has
existing code which switches the namespaces to the caller's namespace
before handling the upcall. This behaviour is expected for scenarios like
multiuser mounts, but might not cover all single user scenario with
services such as Kubernetes, where the mount can happen from different
locations such as on the host, from an app container, or a driver pod
which does the mount on behalf of a different pod.
This patch introduces a new mount option called upcall_target, to
customise the upcall behaviour. upcall_target can take 'mount' and 'app'
as possible values. This aids use cases like Kubernetes where the mount
happens on behalf of the application in another container altogether.
Having this new mount option allows the mount command to specify where the
upcall should happen: 'mount' for resolving the upcall to the host
namespace, and 'app' for resolving the upcall to the ns of the calling
thread. This will enable both the scenarios where the Kerberos credentials
can be found on the application namespace or the host namespace to which
just the mount operation is "delegated".
Reviewed-by: Shyam Prasad <shyam.prasad@microsoft.com>
Reviewed-by: Bharath S M <bharathsm@microsoft.com>
Reviewed-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Signed-off-by: Ritvik Budhiraja <rbudhiraja@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
2024-11-11 11:43:51 +00:00
|
|
|
|
2024-09-16 20:21:52 +02:00
|
|
|
|
2024-10-11 11:20:56 +02:00
|
|
|
|
2024-09-23 23:01:59 +02:00
|
|
|
|
2020-11-02 10:59:55 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-12-09 23:07:12 -06:00
|
|
|
|
2024-04-15 16:47:49 +09:00
|
|
|
|
|
|
|
|
|
2020-12-09 23:07:12 -06:00
|
|
|
|
2021-07-08 09:24:16 +10:00
|
|
|
|
2020-12-09 23:07:12 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-12-14 16:40:17 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-12-09 23:07:12 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-04-04 18:06:56 -05:00
|
|
|
|
2020-12-09 23:07:12 -06:00
|
|
|
|
2021-02-11 16:06:16 +10:00
|
|
|
|
2021-10-14 11:52:39 +00:00
|
|
|
|
2020-12-09 23:07:12 -06:00
|
|
|
|
2020-12-14 16:40:19 +10:00
|
|
|
|
2022-05-25 07:37:04 -05:00
|
|
|
|
2020-12-09 23:07:12 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-10-27 12:13:12 +01:00
|
|
|
|
2020-12-09 23:07:12 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CIFS: New mount option for cifs.upcall namespace resolution
In the current implementation, the SMB filesystem on a mount point can
trigger upcalls from the kernel to the userspace to enable certain
functionalities like spnego, dns_resolution, amongst others. These upcalls
usually either happen in the context of the mount or in the context of an
application/user. The upcall handler for cifs, cifs.upcall already has
existing code which switches the namespaces to the caller's namespace
before handling the upcall. This behaviour is expected for scenarios like
multiuser mounts, but might not cover all single user scenario with
services such as Kubernetes, where the mount can happen from different
locations such as on the host, from an app container, or a driver pod
which does the mount on behalf of a different pod.
This patch introduces a new mount option called upcall_target, to
customise the upcall behaviour. upcall_target can take 'mount' and 'app'
as possible values. This aids use cases like Kubernetes where the mount
happens on behalf of the application in another container altogether.
Having this new mount option allows the mount command to specify where the
upcall should happen: 'mount' for resolving the upcall to the host
namespace, and 'app' for resolving the upcall to the ns of the calling
thread. This will enable both the scenarios where the Kerberos credentials
can be found on the application namespace or the host namespace to which
just the mount operation is "delegated".
Reviewed-by: Shyam Prasad <shyam.prasad@microsoft.com>
Reviewed-by: Bharath S M <bharathsm@microsoft.com>
Reviewed-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Signed-off-by: Ritvik Budhiraja <rbudhiraja@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
2024-11-11 11:43:51 +00:00
|
|
|
|
2020-12-09 23:07:12 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-23 23:17:12 -05:00
|
|
|
|
2020-12-09 23:07:12 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cifs: client: enforce consistent handling of multichannel and max_channels
Previously, the behavior of the multichannel and max_channels mount
options was inconsistent and order-dependent. For example, specifying
"multichannel,max_channels=1" would result in 2 channels, while
"max_channels=1,multichannel" would result in 1 channel. Additionally,
conflicting combinations such as "nomultichannel,max_channels=3" or
"multichannel,max_channels=1" did not produce errors and could lead to
unexpected channel counts.
This commit introduces two new fields in smb3_fs_context to explicitly
track whether multichannel and max_channels were specified during
mount. The option parsing and validation logic is updated to ensure:
- The outcome is no longer dependent on the order of options.
- Conflicting combinations (e.g., "nomultichannel,max_channels=3" or
"multichannel,max_channels=1") are detected and result in an error.
- The number of channels created is consistent with the specified
options.
This improves the reliability and predictability of mount option
handling for SMB3 multichannel support.
Reviewed-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Rajasi Mandal <rajasimandal@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
2025-11-18 02:26:55 +00:00
|
|
|
|
|
|
|
|
|
2020-12-09 23:07:12 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-03-31 21:33:14 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-12-09 23:07:12 -06:00
|
|
|
|
2021-04-24 21:46:23 -05:00
|
|
|
|
2020-12-09 23:07:12 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-01-17 06:09:16 +00:00
|
|
|
|
2020-12-09 23:07:12 -06:00
|
|
|
|
2024-09-25 14:55:43 +08:00
|
|
|
|
2021-02-24 12:12:53 -06:00
|
|
|
|
|
|
|
|
|
2022-08-11 00:53:00 -05:00
|
|
|
|
|
|
|
|
|
2020-12-09 23:07:12 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-12-14 16:40:20 +10:00
|
|
|
|
2020-12-09 23:07:12 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-09-01 02:15:14 -05:00
|
|
|
|
2024-02-23 11:58:57 -03:00
|
|
|
|
2020-12-09 23:07:12 -06:00
|
|
|
|
2020-12-11 22:59:29 -06:00
|
|
|
|
2024-10-06 19:16:24 +02:00
|
|
|
|
2022-11-17 13:23:49 -03:00
|
|
|
|
2023-03-14 20:32:53 -03:00
|
|
|
|
2023-11-09 12:01:48 -03:00
|
|
|
|
2024-01-21 13:28:21 -03:00
|
|
|
|
2024-10-11 11:20:56 +02:00
|
|
|
|
2024-09-16 20:21:52 +02:00
|
|
|
|
2024-09-18 02:03:55 -03:00
|
|
|
|
2025-01-03 16:58:12 -03:00
|
|
|
|
2024-09-23 23:01:59 +02:00
|
|
|
|
2020-12-09 23:07:12 -06:00
|
|
|
|
|
|
|
|
|
2020-12-10 00:06:02 -06:00
|
|
|
|
|
|
|
|
|
2025-07-31 20:46:41 -03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-10-11 11:20:56 +02:00
|
|
|
|
2025-12-11 11:50:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-12-10 00:06:02 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-12-11 11:50:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-02-23 13:34:35 -03:00
|
|
|
|
2020-10-21 10:22:33 +10:00
|
|
|
|
2022-08-11 00:53:00 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-03-23 15:10:26 -05:00
|
|
|
|
2023-09-01 02:15:14 -05:00
|
|
|
|
2025-12-11 11:50:49 +00:00
|
|
|
|
2023-04-05 10:16:48 -03:00
|
|
|
|
2024-04-01 22:44:09 -03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-30 20:15:48 -03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-10-21 10:22:33 +10:00
|
|
|
|