[{"id":3679650,"web_url":"http://patchwork.ozlabs.org/comment/3679650/","msgid":"<CAKYAXd_QFUQb2f2y0ectw29ghrFwEEDPLBVRnwvpMzrZfSj1RA@mail.gmail.com>","list_archive_url":null,"date":"2026-04-21T01:40:37","subject":"Re: [PATCH] ksmbd: scope conn->binding slowpath to bound sessions\n only","submitter":{"id":79386,"url":"http://patchwork.ozlabs.org/api/people/79386/","name":"Namjae Jeon","email":"linkinjeon@kernel.org"},"content":"On Tue, Apr 21, 2026 at 12:31 AM Hyunwoo Kim <imv4bel@gmail.com> wrote:\n>\n> When the binding SESSION_SETUP sets conn->binding = true, the flag stays\n> set after the call so that the global session lookup in\n> ksmbd_session_lookup_all() can find the session, which was not added to\n> conn->sessions. Because the flag is connection-wide, the global lookup\n> path will also resolve any other session by id if asked.\n>\n> Tighten the global lookup so that the returned session must have this\n> connection registered in its channel xarray (sess->ksmbd_chann_list).\n> The channel entry is installed by the existing binding_session path in\n> ntlm_authenticate()/krb5_authenticate() when a SESSION_SETUP completes\n> successfully, so this condition is a strict equivalent of \"this\n> connection has been accepted as a channel of this session\". Connections\n> that have not bound to a given session cannot reach it via the global\n> table.\n>\n> The existing conn->binding gate for entering the slowpath is preserved\n> so that non-binding connections keep the fast-path-only behavior, and\n> the session->state check is unchanged.\n>\n> Fixes: f5a544e3bab7 (\"ksmbd: add support for SMB3 multichannel\")\n> Signed-off-by: Hyunwoo Kim <imv4bel@gmail.com>\nApplied it to #ksmbd-for-next-next.\nThanks!","headers":{"Return-Path":"\n <linux-cifs+bounces-10974-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-cifs@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=jOfbvTds;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=104.64.211.4; helo=sin.lore.kernel.org;\n envelope-from=linux-cifs+bounces-10974-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=\"jOfbvTds\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201"],"Received":["from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g04nM6WQJz1xqf\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 21 Apr 2026 11:40:55 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sin.lore.kernel.org (Postfix) with ESMTP id D26F83003BCA\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 21 Apr 2026 01:40:52 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id B47DC19D89E;\n\tTue, 21 Apr 2026 01:40:51 +0000 (UTC)","from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org\n [10.30.226.201])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 91E8718FC80\n\tfor <linux-cifs@vger.kernel.org>; Tue, 21 Apr 2026 01:40:51 +0000 (UTC)","by smtp.kernel.org (Postfix) with ESMTPSA id 2BE83C2BCB4\n\tfor <linux-cifs@vger.kernel.org>; Tue, 21 Apr 2026 01:40:51 +0000 (UTC)","by mail-ed1-f49.google.com with SMTP id\n 4fb4d7f45d1cf-676ab6d8075so325263a12.2\n        for <linux-cifs@vger.kernel.org>;\n Mon, 20 Apr 2026 18:40:51 -0700 (PDT)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776735651; cv=none;\n b=Ci40a/M2Najqbi77dzeXUKWLyKdOtJ3Wt4o6eNRRLswpHI5o3Dso5dKsooOc3Mgalxe0CG1+MKhTkrA8JkWfgK4UzMDpwl8CZnGsRxzLt9VveuxKn4HnE1KmE1we7kz8gtx9HOboWFjTXJGv3lecI30Huyo7fU1tr4S1ASB+Y7Y=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776735651; c=relaxed/simple;\n\tbh=lblu2Y/M/ip+rbBgyea4HYOI9n11bjXagzI+TlLTkZg=;\n\th=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:\n\t To:Cc:Content-Type;\n b=E2mF7DNfLcf0+93FA9aKf3hl+7U8kj3fLMNR5SFNfuZlTQblJhbz8S73vWc2Tf3rN2KSfIXOJ7YMMwe27SIqopLs/308QdyM0DxzR8OpQvVk5oX3i9PYPE4qQyzMryabC5pvuV9k28zEH/0RNjWr0G88mcgOxcpauyBpl1lX9ws=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=jOfbvTds; arc=none smtp.client-ip=10.30.226.201","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1776735651;\n\tbh=lblu2Y/M/ip+rbBgyea4HYOI9n11bjXagzI+TlLTkZg=;\n\th=References:In-Reply-To:From:Date:Subject:To:Cc:From;\n\tb=jOfbvTdsdgvb/jo3/hyE9iRPXWE3VDB6L8ZCykdajh9/T9W3FhnrQDi3TNKDA/L5H\n\t j9GUAGbTxdjwTH8xR1qTn4AC1jZWGfnMRKgeLVCc5nLugngCpzCsFLYo7zaNUEH5nf\n\t Frl8pypK63QaeddNUr5qse19644FzMTc3/mStFJFBkiRkpBFtO0UZqcNLuAiCWU2zB\n\t lvSiIv+YUXYBsDLSIYY+f8k/ZcV9KOU/dWfQm1X8V/U3+4KON8WqIxKJrfN56bwAQ6\n\t OrQlb3E9XDNK/tHrQ0Z7E2klsALpgb+ISB63yhcSrLbRN2/3bX+UYorHQzt+LoaLdV\n\t NONLEqpZwCF0A==","X-Forwarded-Encrypted":"i=1;\n AFNElJ/NXCBwAUz6rr4TFEpqzh8KNMAKj3BnVaRJvqdDeMebzHEtJ8WpjFowMvA9Vh1qGOQboQgMtF25gEvt@vger.kernel.org","X-Gm-Message-State":"AOJu0YzXATMHOhZ86lSBlFBugwVgkAvFCP6TlDWjhKEzcLV4Dmz+gRxf\n\tZHnK1OnoCriU6QGme32HxiEpHpHc6coWyAiSw47amb7TjDVWWkEdpNEIee5c41GiYsORaR0X8TZ\n\tWULdyKFqKeu4PJWaC1vuiqG9QONlkZZ4=","X-Received":"by 2002:aa7:d7da:0:b0:670:8b7b:5004 with SMTP id\n 4fb4d7f45d1cf-672bfedb106mr5146737a12.25.1776735649668; Mon, 20 Apr 2026\n 18:40:49 -0700 (PDT)","Precedence":"bulk","X-Mailing-List":"linux-cifs@vger.kernel.org","List-Id":"<linux-cifs.vger.kernel.org>","List-Subscribe":"<mailto:linux-cifs+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-cifs+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","References":"<aeZG4xhoMhYFSsIy@v4bel>","In-Reply-To":"<aeZG4xhoMhYFSsIy@v4bel>","From":"Namjae Jeon <linkinjeon@kernel.org>","Date":"Tue, 21 Apr 2026 10:40:37 +0900","X-Gmail-Original-Message-ID":"\n <CAKYAXd_QFUQb2f2y0ectw29ghrFwEEDPLBVRnwvpMzrZfSj1RA@mail.gmail.com>","X-Gm-Features":"AQROBzAGiUcR3IXtqMt5pyphEnnH-CkpRIKgfldNfK5XGWSR6IadCvxs2cDXB0o","Message-ID":"\n <CAKYAXd_QFUQb2f2y0ectw29ghrFwEEDPLBVRnwvpMzrZfSj1RA@mail.gmail.com>","Subject":"Re: [PATCH] ksmbd: scope conn->binding slowpath to bound sessions\n only","To":"Hyunwoo Kim <imv4bel@gmail.com>","Cc":"smfrench@gmail.com, senozhatsky@chromium.org, tom@talpey.com,\n\tlinux-cifs@vger.kernel.org","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Transfer-Encoding":"quoted-printable"}}]