From patchwork Thu Sep 26 16:40:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ghadi Elie Rahme X-Patchwork-Id: 1989887 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XDzsL5HS6z1xt9 for ; Fri, 27 Sep 2024 02:42:14 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1strZ2-00038r-Fz; Thu, 26 Sep 2024 16:42:00 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1strZ0-00038d-HN for kernel-team@lists.ubuntu.com; Thu, 26 Sep 2024 16:41:58 +0000 Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id A5FAF3F1CC for ; Thu, 26 Sep 2024 16:41:56 +0000 (UTC) Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-37cccd94a69so563360f8f.0 for ; Thu, 26 Sep 2024 09:41:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727368916; x=1727973716; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=V/V1jnTtU2bN412/4gcjvI0BX3/WbZ3EWa3ajgUr4zo=; b=ABPkzN8dpaW3clxWo1fl8lPrOeIwY/GP5WZd+Dn5wkONkb/xk5EdJqFjWaZAFYLPGY PKMm1M/MiTl9kTKcRnppAvlQ/ZMXZlJNaPRhQf4EXv3q5irbVMvj7Wm8lOhFT0WzoJjf D6++y4deezv/d58D+ItoFeJVPSIGMQMGOzCfM/XSSB+6wfXz7A1bEW8Av4YQNOwYmJT6 JI30fRH0w55Dx08sRCxEznNB+s5NWfePLjBckoJ1cBsYr9wvJqiw0yBZm0hgadOcDHUk TjeicN5qjOYHvPOwBuYii97fU5ibBGbz8o6CFIP1YpQtwqYYlsoGzZV27P1Y2ltN3e3B WDlQ== X-Gm-Message-State: AOJu0YwG2Rv+AabRetZsiZRAL92R7nzjnG6PFmQ1XDBtWhZfin4UEtSD WMZ4nOQOJ/tC3Nimhh/zn760IxmBPWHQhE+Sytl4bunLHTv0hn0kA4oEBYPCjRX5cgM03mtZ6j+ qNom2CRO4uY+oeLarNWRft/hwbWDpc1UGK5jv8EPskIK5luY12MsxF6aoHKRSH7w9UjxryeBV1P G5hb9YXuUVUIoV X-Received: by 2002:a5d:6791:0:b0:37c:d001:856d with SMTP id ffacd0b85a97d-37cd5b106d5mr101637f8f.42.1727368915672; Thu, 26 Sep 2024 09:41:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG8J6RbwdQQ4EPgSmh9qcA4sjySNQGcQOuYM+K6/2kI8iF7CFKooe1l7vktnmZBr06S+kiE7A== X-Received: by 2002:a5d:6791:0:b0:37c:d001:856d with SMTP id ffacd0b85a97d-37cd5b106d5mr101618f8f.42.1727368915229; Thu, 26 Sep 2024 09:41:55 -0700 (PDT) Received: from XPS-17-9720.han-hoki.ts.net ([213.204.117.111]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37cd564d2d2sm314272f8f.1.2024.09.26.09.41.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2024 09:41:54 -0700 (PDT) From: Ghadi Elie Rahme To: kernel-team@lists.ubuntu.com Subject: [SRU][N][PATCH 0/1] fs/smb: fix unable to list files in share Date: Thu, 26 Sep 2024 19:40:52 +0300 Message-ID: <20240926164053.2123925-1-ghadi.rahme@canonical.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/2082423 [impact] Currently on the latest version of the 6.8 kernel, there is an issue where listing directories with CIFS fails and returns an error stating that the operation is not permitted. There is an upstream patch to fix the issue: https://git.kernel.dk/?p=linux-block.git;a=commitdiff;h=ec686804117a0421cf31d54427768aaf93aa0069 And I have back ported to Noble 6.8. Note that the same issue also affects jammy HWE 6.8. [Test Plan] 1. Create a CIFS share. 2. Populate the CIFS share directory with files. 3. connect to the CIFS share using a ubuntu noble machine or a jammy machine running 6.8 HWE. Steps to connect to a CIFS share can be found here: https://ubuntu.com/server/docs/how-to-mount-cifs-shares-permanently 4. Once mounted, access the share and try listing the content of the directory with "ls". 5. This will result in the following errors: ls: cannot access 'file1': Operation not supported ls: cannot access 'file2': Operation not supported ls: cannot access 'file3': Operation not supported ls: cannot access 'file4': Operation not supported 6. Looking at dmesg, the following traces can be seen: CIFS: VFS: parse_reparse_point: unhandled reparse tag: 0x0000001b CIFS: fs/smb/client/dir.c: Unexpected lookup error -95 7. The expected output would be to have the files listed wihtout any "operation not supported" errors or dmesg CIFS related error logs. [Fix] The fix is already upstream and is provided by: * ec686804117a smb: client: ignore unhandled reparse tags The patch does not apply cleanly due to the following missing commit: c520ba7573a8 smb: client: move most of reparse point handling code to common file So I had to do a few modifications. [where problems could occur] * The patch might not fix the issue and it might still be present in some scenarios. * Other CIFS commands might break. Paulo Alcantara (1): smb: client: ignore unhandled reparse tags /fs/smb/client/smb2ops.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) Acked-by: Mehmet Basaran