lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANT5p=qH9aXGpQzcCwFZ81MGrKFYiGBHxejdy-oRAa_QN=k=Yw@mail.gmail.com>
Date: Tue, 23 Sep 2025 11:08:00 +0530
From: Shyam Prasad N <nspmangalore@...il.com>
To: Enzo Matsumiya <ematsumiya@...e.de>
Cc: Henrique Carvalho <henrique.carvalho@...e.com>, rajasimandalos@...il.com, 
	linux-cifs@...r.kernel.org, sfrench@...ba.org, pc@...guebit.org, 
	ronniesahlberg@...il.com, sprasad@...rosoft.com, tom@...pey.com, 
	bharathsm@...rosoft.com, linux-kernel@...r.kernel.org, 
	Rajasi Mandal <rajasimandal@...rosoft.com>
Subject: Re: [PATCH 1/2] cifs: client: force multichannel=off when max_channels=1

On Mon, Sep 22, 2025 at 8:29 PM Enzo Matsumiya <ematsumiya@...e.de> wrote:
>
> On 09/22, Henrique Carvalho wrote:
> >Hi Rajasi,
> >
> >On 9/22/25 5:24 AM, rajasimandalos@...il.com wrote:
> >> From: Rajasi Mandal <rajasimandal@...rosoft.com>
> >>
> >> Previously, specifying both multichannel and max_channels=1 as mount
> >> options would leave multichannel enabled, even though it is not
> >> meaningful when only one channel is allowed. This led to confusion and
> >> inconsistent behavior, as the client would advertise multichannel
> >> capability but never establish secondary channels.
> >>
> >> Fix this by forcing multichannel to false whenever max_channels=1,
> >> ensuring the mount configuration is consistent and matches user intent.
> >> This prevents the client from advertising or attempting multichannel
> >> support when it is not possible.
> >>
> >> Signed-off-by: Rajasi Mandal <rajasimandal@...rosoft.com>
> >> ---
> >>  fs/smb/client/fs_context.c | 7 +++++++
> >>  1 file changed, 7 insertions(+)
> >>
> >> diff --git a/fs/smb/client/fs_context.c b/fs/smb/client/fs_context.c
> >> index 072383899e81..43552b44f613 100644
> >> --- a/fs/smb/client/fs_context.c
> >> +++ b/fs/smb/client/fs_context.c
> >> @@ -1820,6 +1820,13 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
> >>              goto cifs_parse_mount_err;
> >>      }
> >>
> >> +    /*
> >> +     * Multichannel is not meaningful if max_channels is 1.
> >> +     * Force multichannel to false to ensure consistent configuration.
> >> +     */
> >> +    if (ctx->multichannel && ctx->max_channels == 1)
> >> +            ctx->multichannel = false;
> >> +
> >>      return 0;
> >>
> >>   cifs_parse_mount_err:
> >
> >Do we even need ->multichannel flag at all? Maybe we could replace
> >->multichannel for a function that checks for max_channels > 1?
>
> I agree with Henrique.
>
> I'd actually like to propose going even further and having the whole
> module behaving as if multichannel was always on, even with
> max_channels=1 -- the only difference being the need to run the
> query_interfaces worker.
>
> This is probably work for another patch/series though.
>
>
> Cheers,
>
> Enzo
>

Although I agree with this line of thought, I'd want to do it slightly
differently.
max_channels should be a configurable option for users to tune the
number of max channels, even if the actual channel count is lower.
multichannel mount option should be kept to maintain backward
compatibility, but always be interpreted based on max_channels value.

In the future, we should make max_channels=16 the default, thereby
enabling multichannel by default. Users optionally can set
max_channels to a lower value.

-- 
Regards,
Shyam

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ