From nobody Mon Jul 10 17:52:04 2023 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4R0BQr4qgNz4dWlj for ; Mon, 10 Jul 2023 17:52:04 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4R0BQr2xMnz3p3V for ; Mon, 10 Jul 2023 17:52:04 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689011524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bWn37t2akfRYRO6uKF+x2REE1NvhsEXtMlsv9Sw7ftA=; b=sBN4JZ+Td+EYqCpRrRNQ5FGZtP7PQjVf4cyX51L5XLoUqBQevcfmws5hqw2WBzn8eqARqd NbT34JDokWrCDbefUsklEwQ19iX1AdPoYiB//f//E2zQUtHXK4LGmPPKJDTjBMffVvRYEM S9/K0jIUlG4FhEzAPasjQ0If+z+Pe7bsKG9rxctqGhEWXUEdaqKruLOg3alClisdNxQ8/6 L5mICXYXZfIqi4/XEAVdAIk4gde2jTCHAGES7pFvCPgSgq1lcX3TIJR7DbkBLdE8FgNetc 8FHgTkDt3jgFiOs1Lz7YQvRWeZAkkkmXC7cqbyHfMamkiIEkPM1QleVR98w1gw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1689011524; a=rsa-sha256; cv=none; b=E31flTa26xjIOXz3pY/4M+QNvcgRJlkU97fL4C/Fb6gnPChNDcetfcwSYUcaYFQ83LYgjc x4C46AmitIOOkiVWEASOrTDik9I6y/55YZUYVUB19MjbOH+gU591n5En8Ra3K8yPffxzTo fSe+dptYdftK8nEYvNfjrwF6fu2w0V2MCjd2tc+NbSNb1gUzMB9djV6QceSL32fyXUomTy jYEVDxooa+9YGdgF9g+eO8A+GVhbtgnekORKZ4Ka0ahGUli46K00+/LXEttG+T5t5jJH/m vYJOHHvmA0ut3drCsE7SbRM9cGg6W4zAOGX3f+MjT20CD0NdvN7fH6Tm+EFtjw== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4R0BQr20yRztg3 for ; Mon, 10 Jul 2023 17:52:04 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 36AHq4g5049455 for ; Mon, 10 Jul 2023 17:52:04 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 36AHq46u049429 for bugs@FreeBSD.org; Mon, 10 Jul 2023 17:52:04 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 272446] automount -c clobbers flags of mounted direct map entries Date: Mon, 10 Jul 2023 17:52:04 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: andrew@tao11.riddles.org.uk X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D272446 Bug ID: 272446 Summary: automount -c clobbers flags of mounted direct map entries Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: andrew@tao11.riddles.org.uk If you try and enable both the -media and -noauto maps from the sample auto_master, and enable use of automount -c from devd as suggested in the comments, then on every devd event, the flags of all the -noauto filesystems are reset (clearing the "automounted" flag and, more critically, flags such= as "readonly" and "nosuid"). This happens because when traversing the mount list, there are two entries = for each -noauto map entry that is currently active: the autofs filesystem itse= lf, and the real filesystem mounted on top of it. The automount program sees the first of those, and issues the equivalent of "mount -u /path" on it, WITHOUT checking whether "/path" is currently mounted over. This can be partially fixed in the userland code, but that obviously leaves= a race condition. Accordingly the attached review includes both a kernel and a userland change: the kernel change is to require that the fstype field pass= ed to nmount does actually match the VFS type of the filesystem to be updated. https://reviews.freebsd.org/D40961 --=20 You are receiving this mail because: You are the assignee for the bug.=