From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 88939377575 for ; Sun, 5 Jul 2026 12:35:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783254920; cv=none; b=bK9rZvtjrnWhUueeAWg6383u3N3yemk9BFybQHEIdPLpobITSEymn6w7g3uaozMl2mLFB7owaj9U8LKUb1oWcAXtI9qhrqSgDIFfYXF/7WTDPOHjCMlhaQSLqGwSFy920ZGenG8cp6ZFStAv5W1vUBx013+fxvXyzNebJDMbzhY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783254920; c=relaxed/simple; bh=og4tc1Ixbb1Lb87pDD0lVguCyg/WWoBV34QfrHngqM0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FhCtnKQtRsI4koLrJ+2gjZHeK5xLpCkinEIkzYxJfHfsPKolJUnMlkLuqnEWfGIfOJaNYC1SOowpPfuhWUxSPBvQqmqR+iXP3QAXo00T6WplHdbS1D0uzf2eGcd0aUnuKv/wrAkBk66IxPFpcSnP61gyhky5q/mK7stANkYDZyw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=C5G9fj/Q; arc=none smtp.client-ip=209.85.128.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="C5G9fj/Q" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-493c733f15aso21089685e9.0 for ; Sun, 05 Jul 2026 05:35:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783254918; x=1783859718; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wHxGta1pA0jKEWoTfFEAv0UuPjTotnZKIGieZiQ/ujc=; b=C5G9fj/Qk4JA36wV8lVRwuNWzthXBpoHoiqfsxne1KU+UoDE2/HbqK4EVDUVkl0LdZ uBhYLZdXuzWfnFtd/IT1nBeeMGHPI0XYiPiL395QwPFV6U8zoQAhRL2n0S1DLvU9GiZ5 ksuVUuN2rUsywHdiIqyCT2Yh1mP4oKBoBCIe6pF43dl0BM1suWy1Rn/RBD007sw8e3Ew v/TCrJ5YJ88aych/qWH7ZHJHdQ0TzDmTnOkONOWBebHNED3LzEqvF6re5TrRa6Fq/eNx rA2Ti3aO7PBhthvKO2sIZAj9G5SaGCT0Z83xWcOwAqga8mg21fraFy5gH7JhiCtDMVfE 49Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783254918; x=1783859718; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=wHxGta1pA0jKEWoTfFEAv0UuPjTotnZKIGieZiQ/ujc=; b=RexsyTwQu8NOxHHXy6/rrq0ZBFTyhQ8pdmBhm7bo/963WFk8hRkSGenyfek/a6faZB bXVQAtTC7uUCa3fVm8zw83SVzAypt88k1rYjyEiCLMvcv8LiuAFMKieo6FElyHtspInz kcvAWN5WatiJvRCt+APGIo5zBkx3WjFCYsUEKmUXmFuldbhaqu/XH+XQmdokIBJNyki8 npWBBXUjifMSbhyxSTXXTg5GaejoOGMtSVGAE2VYf61D9xWv/sYnyEBOmF8Phed+AsaO Flut90C+25/QFETSVQE40XDNzPdL4JFYgOi7F3pdmzmfFwa4q01MuhtI3h/J6w1UaqS+ nptg== X-Forwarded-Encrypted: i=1; AFNElJ/124QMub/emftFRYslH5aVzfPuOgBiUvidMpWkcsiSdYep2SQD9eidZv35ycIpnGA7eHKIm9Ou2kSMUgo=@vger.kernel.org X-Gm-Message-State: AOJu0YwHlrfmpwKXL7yjjz2HuAID3G29f/M9GU7yngX8oS34awKdSWhH rBPXwvLDD5QOtkt6lcMXy9rIjkX+zlcT4l8ipakku28YOcLT9aCA42Mp X-Gm-Gg: AfdE7cmhC4oiUpZ55SQGMbuD0Biy77NIiNPnwC2QQXH9mBnRuvj43DdawWeuD5swPMc 5ojzW59wH+9GAXrnMzJ9ESgebPG1KqYFKUC/WLD1k+PK13skCNahHUWotxrh5XiPABMx7rOa4IU ZEWhJ0/MjOEiPiZrb1awcOfeS5q7nFesXbQDRnT96e6WLRSKL3xuFoGzka2RUUhPMmNXvgUMaYE T4fcLftG7ikXWHyEL1ugnhnI7eLyTX4MXCYP5/sKtxy5m4CDI27PpCZPuGjOPWOz4Sg/zsl5QXB Om0KuZNHCpSKE3GmHdGo9Xwo11sHwhANp3FnfDS1dPb28h+kXi6GeNVNONUgKnqomnuZKLxebVA Q+47phoTbY3IDMBk1XlHnPBNKLt+xCFzIiTqMe0xU7Ko+D5BulmQWE0+2Jl4PRhfla2mSUKuwPP gi1usUxSv5 X-Received: by 2002:a05:600c:b8d:b0:493:ad1b:b38d with SMTP id 5b1f17b1804b1-493d5ff8f97mr30004695e9.37.1783254917425; Sun, 05 Jul 2026 05:35:17 -0700 (PDT) Received: from localhost ([212.73.77.104]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-493c636e9e9sm275072695e9.2.2026.07.05.05.35.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 05 Jul 2026 05:35:16 -0700 (PDT) From: Askar Safin To: brauner@kernel.org Cc: jack@suse.cz, jannh@google.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, viro@zeniv.linux.org.uk Subject: Re: [PATCH RFC v4 00/25] fs,kthread: start all kthreads in nullfs Date: Sun, 5 Jul 2026 15:34:47 +0300 Message-ID: <20260705123447.742980-1-safinaskar@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260601-work-kthread-nullfs-v4-0-77ee053060e0@kernel.org> References: <20260601-work-kthread-nullfs-v4-0-77ee053060e0@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Christian Brauner : > We now also warn and notice when pid 1 simply stops sharing filesystem > state with us, i.e., abandons it's userspace_init_fs. > > On older kernels if PID 1 unshared its filesystem state with us the > kernel simply used the stale fs_struct state implicitly pinning > anything that PID 1 had last used. Even if PID 1 might've moved on to > some completely different fs_struct state and might've even unmounted > the old root. > > This has hilarious consequences: Think continuing to dump coredump > state into an implicitly pinned directory somewhere. Calling random > binaries in the old rootfs via usermodehelpers. > > Be aggressive about this: We simply reject operating on stale > fs_struct state by reverting userspace_init_fs to nullfs. Every kworker > that does lookups after this point will fail. Every usermodehelper call > will fail. This is a lot stronger but I wouldn't know what it means for > pid 1 to simply stop sharing its fs state with the kernel. Clearly it > wanted to separate so cut all ties. Your approach means that you introduced new degraded system state: "PID 1 unshared its fs_struct, so we switched all kernel threads to nullfs". I don't like this. If PID 1 tries to unshare its fs_struct, then, please, just do nothing and return error to userspace. (I already said this in one of previous threads about this. It seems you missed this, so I'm saying this again.) -- Askar Safin