Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp990431lqt; Tue, 19 Mar 2024 09:32:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW1K8X108MtZ6nXRgsP9glFPOOurARL9w+PDjXLNMK/n5SyJvFI6aMST3TJ+UwpD7sF+YJ46qdU+gpk5eo8q+y897ZsYpowiy+vAHLJCg== X-Google-Smtp-Source: AGHT+IGuDOnN70r6NA8ywwxD5C4I1LB2fK/OnFvYtuqxIvt7OSupmpG7FRNSfwfXerwrejhu72Oh X-Received: by 2002:a17:907:174c:b0:a46:61ef:2846 with SMTP id lf12-20020a170907174c00b00a4661ef2846mr1548292ejc.66.1710865938427; Tue, 19 Mar 2024 09:32:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710865938; cv=pass; d=google.com; s=arc-20160816; b=j4CwKZAd4lTZJxb07rv5NcSMZkb86jS9IUjfKF2EKl9DS6IBcVriL+bqumKCSBe6JB CleN+MdrcUM2AVzH6iBkFCpkH3UFdmTHKXt40EpSJ6qEGcESpOS0lkEyh05d255xtY1B 8+5nyUaQ52JAXqim9IV+11w4m2e8JzZqZSdQULW6zGDgjR3P7qQGgP14EI1N6Nvvqk9X TF1noWwqtEXWC8zJ+5UmklgiEaK0OQOpEeNMnSQI9GK/cVXQnRxZQ76W7jmhRpnuSaZD 39/6f7/vPimXt/Je/JgEfaXpSBX1MIebn+xdF26r+CaoPAtZ8XLlQpyVaCy1h7AgTmBU kliw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:message-id:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:subject:date :from:dkim-signature; bh=UXo9DQGrd/aUjX1+0U/FZBBaIBwTYeKjhBBIf9ZZyyI=; fh=9bu3mmgqCMZFRnkU20ZSOzqlNLJWroT+hPUq2rShtZ4=; b=npWhL8jxoWOD9DWxh5b4tA3PPsYW7/X2cMNMbLx55NROScjEp4skzJc5ThG2tsrmnb 4UjciW9V343uInenhDpONqEJYsbi6yq+LoWVzZH4P58QSeCGLJ1JPdWpJCMWCNTX6rGo pbi0c1dJ/JOKCcaBHY7t+Ub4Yf4mUAAt7AA3IT5schtDL+xSU0GQQtMLstIlcgIm5Q3c 8TjjdufRTpQKdnKwFXyNpProJSb+vUsJTKKeaDv6YKGcrNfHpC1JahOXKEZih//RikcN bAv+j0THJfRSOhgt10tT6fZCHE/yD/b9tWHYxP9WSgBjaW1CNlctqy+fnZxhQtbyXv2W Dp+Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aUR8ahsz; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-107836-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-107836-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id v9-20020a170906338900b00a4677788684si5001400eja.551.2024.03.19.09.32.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 09:32:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-107836-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aUR8ahsz; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-107836-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-107836-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 7ED501F24950 for ; Tue, 19 Mar 2024 16:32:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DDAE9DDBD; Tue, 19 Mar 2024 16:32:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="aUR8ahsz" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0F3626AC0; Tue, 19 Mar 2024 16:32:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710865931; cv=none; b=aHjmLLHMrfyzbAIoAKJ5SqTtk6NDYSI8BR+R15978KnbOLIS3dKQsteXRV+xTL4iz+lBTNizXa6thj2tNjI12WZuIHOFvEfvfjJeCGimKZIlH+/7Rm1mqHCpc/0qBABdCoHX3anfiKs1RF94O5sjJrsxYwmVNXN7KMV2i1U4QXg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710865931; c=relaxed/simple; bh=NhTjsDbeF+jZwB6UdNaz4xCZqScOCQU5gs19tO01lLs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=dHSMbjlRmYDJ+9nv/sQiDdWVi59qzmVXLju4fKCfQCnkcJxZMSYLbnW5F5FjUhC5QW02ihR10Wo30LLg/Af8LcEDrkWx28YYpkX7/IU6mVALUUh/o1uYfMjkzkIjjMyj5SlAArOxSkBNgg3/VLDqxogvGiQ94MIcN6NlK94tWFM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=aUR8ahsz; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7D0BAC433F1; Tue, 19 Mar 2024 16:32:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710865930; bh=NhTjsDbeF+jZwB6UdNaz4xCZqScOCQU5gs19tO01lLs=; h=From:Date:Subject:To:Cc:From; b=aUR8ahszlCpeKTzonzhIEs24YaCWhLKvufoK18jGUBjVQHpFAZeDSx9OtOqNNq4Oa 0AHn5buoluaQ9q+Cto3nROALV9PW6XxNFl3l2nUyGKwY7NaG88vPw61fJ6frhYELHA VZDVEAiYJxkiE2lUbVoJcBfUjjrRgdPxOHqYdymUHSQd3mU5ji2FVI2wVMhilf1hOA t7srlgi8SmRsEUsHbABX8OXPEiius9h6KG8eUaoLMXa2lZhv51S+bqQt/DXUhtD7qq vveB16IbvyxFRRCt+7/w0RGjTfLsuB/Hd118shnw9JX9B7OwufWGmxOOk9CKnt4bPs XUZdvH8UrqOqA== From: Jeff Layton Date: Tue, 19 Mar 2024 12:32:04 -0400 Subject: [PATCH] vboxsf: explicitly deny setlease attempts Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240319-setlease-v1-1-5997d67e04b3@kernel.org> X-B4-Tracking: v=1; b=H4sIAAO++WUC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIxMDY0NL3eLUkpzUxOJU3eRUY8O0JAtzc/MkAyWg8oKi1LTMCrBR0bG1tQA swUHSWgAAAA== To: Hans de Goede Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Jeff Layton X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1029; i=jlayton@kernel.org; h=from:subject:message-id; bh=NhTjsDbeF+jZwB6UdNaz4xCZqScOCQU5gs19tO01lLs=; b=owEBbQKS/ZANAwAIAQAOaEEZVoIVAcsmYgBl+b4KKnWSIRHwTvzyrK//St8r9MZW6K7Eccg6f rA4HdHKfNyJAjMEAAEIAB0WIQRLwNeyRHGyoYTq9dMADmhBGVaCFQUCZfm+CgAKCRAADmhBGVaC FVLSEAC80hdMN2Gs3KkTk1zwh2mUSpiCWOT1my1yQ6CfsDj481qJaUZMksSyj9DbiuZUiV4UG4s /FMd97NnXYBOk2IK3pHn0BRkvNAeeqFvgRPg+IYof/DqFRSyYIIgI3lWIcBc58l0ZOUwf87MTXG V15wW0UwUcOIZLh7QVbIHIxkQ0Z2ir0OQvxyo/q9TKpxli/nq3tj1tau3ns43YISbNxj3K7GdJv gJwoAZ59BDeD8Dgk+LEhci4mMLqRCz2OjQD80y0UUOXe0PGrsNWYDhK0IkIS2H+7O4nMpHaTsnK 8mDI8X+tlyHXPkTHIXJ4N7ZdgJxnKPupbKmtiUTvPsy6xRoB3EU3hTPBNpUck2cLItaSwWsAjDK 9ZY0LqrfV5GPgwW537wNHezTBOJHxSVly1FY3vf527BCDdi18QSItzzHMSfOxnpPIy8h6bQTT02 I09Dr1p0DAPt5CN8ikIqP1pWOE0C3TjsxI1XwNhbj6Zi3ITebPQzZitHQbtm4IpbUFt2c7FXN1h AhBsjMPMX4b0944FzljExhViZpziAdsWST6Fc7x8QNkDBrkIUvgdB057DDE2R5j1O1Yn4PK6GvO NVcaDlWv6XAZhVweXNQo5ZCdyfSvAYjEhH/ZfkDFqIxJ94/pnjGPswTC7zmT3TvdwgnEZ70qLXp JM6ftqSdgl51sdA== X-Developer-Key: i=jlayton@kernel.org; a=openpgp; fpr=4BC0D7B24471B2A184EAF5D3000E684119568215 vboxsf does not break leases on its own, so it can't properly handle the case where the hypervisor changes the data. Don't allow file leases on vboxsf. Signed-off-by: Jeff Layton --- Looking over the comments in the code around cache coherency, it seems like it ought to deny file locks as well? We could add a stub ->lock routine that just returns -ENOLCK or something. --- fs/vboxsf/file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/vboxsf/file.c b/fs/vboxsf/file.c index 2307f8037efc..118dedef8ebe 100644 --- a/fs/vboxsf/file.c +++ b/fs/vboxsf/file.c @@ -218,6 +218,7 @@ const struct file_operations vboxsf_reg_fops = { .release = vboxsf_file_release, .fsync = noop_fsync, .splice_read = filemap_splice_read, + .setlease = simple_nosetlease, }; const struct inode_operations vboxsf_reg_iops = { --- base-commit: 0a7b0acecea273c8816f4f5b0e189989470404cf change-id: 20240319-setlease-ce31fb8777b0 Best regards, -- Jeff Layton