Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp51916rdb; Mon, 22 Jan 2024 11:36:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IHBXssnIv+IwEjc7nQlzxWMETI0Oe0Iqey/7Y6DIAcSb81ypzC0/9qPdfqOmtXB1+TKfDkx X-Received: by 2002:a05:620a:4001:b0:783:34d0:951c with SMTP id h1-20020a05620a400100b0078334d0951cmr6650801qko.152.1705952186093; Mon, 22 Jan 2024 11:36:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705952186; cv=pass; d=google.com; s=arc-20160816; b=qtdk4jPhimkDQg4TyTAz2EaRv9R375uDsiLphrDLnm6y3yLMJ4+VjOOdmUulAlEbtM fdriMFkKBiPKSid4bXhPVAAdUW0jYN0iwEO/YOroiS5VRVQMJFIFmFdc2i2XmKspfA9A Nrk3fFJXlyGQqx2+Ur5DWontWwALgWNh/0oJRRSyeIOEcu0+rY6eG2N8eaI8CEG9jdO1 0s5wRYEf0mCBvx2m5NbW4wlgnQhhPBF05+Oz520/zv0LQFAjH6yKR4Cgeexvl8QLkhqo 3Z0lszI3MXpxB6ywsHApcthCOW5GBXIZGprNdK/jIyPkHHrrAk8Hrq+kVlCbMnOgtWya IOEQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date; bh=SE16//iondV/KrdN0gIGJGCvM6RomjL26mAotHopcFw=; fh=+VwKKnLc7ctX089divt3rZzZCIjYjVyeTSC1xdIoiOc=; b=QIGLsbKiTbg25R6qCCkTGZ2YKdmeyZkz2YAcNtVTxeLcsmZNmsPzB2HVspvuYHpcpf bRNqq+NLB5Kt0LZ3OPsQActbf63UhAnmzJmpxfUzeowk9Zlo4Rjzdx0XkoFhJTHQCjqN N5plJv/Omp5ioPDCNFySfe65G2JxEhm0Tk8nCRlxGKmrUPTrf4moEm9KM7aSGbrAXpvn UYTfZvEgCxJXKDFab9QFnSLUZo4OAButwtXzeltpj33cPMtde5ZorI+AMFCvMWJYh1ua LYzUVDYH2FW+Jd3uXi/WDkwyFaEYWKk1EY2q+DPylv/NDW4JJjaMRIaM4VfrPpcwMDyV MsOg== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-34060-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34060-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id l23-20020a37f517000000b007839e747700si2892548qkk.192.2024.01.22.11.36.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 11:36:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-34060-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-34060-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34060-linux.lists.archive=gmail.com@vger.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 35E0B1C27D11 for ; Mon, 22 Jan 2024 19:36:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2390A3F8D6; Mon, 22 Jan 2024 19:36:14 +0000 (UTC) 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 A382F3E49E for ; Mon, 22 Jan 2024 19:36:13 +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=1705952173; cv=none; b=al7xlBXu0vd5yQymMywvI2TS77OJl5n+n/k5zm/Zzj2ASQDWdLSXxq43feya5ACNJMFgWLeQ+Uq0EmFYDEmGB3CHdnprz63uG2q/Y/87eiR0g3oXiBNWdc2gEJpM6xSd7XifJ5rqRboHWHPmHNRomsW1Lf+gJDLi5VtxOJyutLw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705952173; c=relaxed/simple; bh=hd4hERnKUHLp2M7ISNYou1fZosK6qgnVMXcDV3L4S5Y=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=kXoI6vHmASwRsdfFjtn9ymViCCv/oavtavncR/4CvX/qclyxc4thUS2SBXy6xaDK2D/vFeLEgku52MhxhaAq5/R5PyZ23/vezzbSKdWKfPoqfGCSyJw4oxKhTjyU+aWtZqdyiYo0Ii5O1ajjPWJTDOhAycvG1+0ZJcctE1lVnww= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D1DFBC433F1; Mon, 22 Jan 2024 19:36:11 +0000 (UTC) Date: Mon, 22 Jan 2024 14:37:40 -0500 From: Steven Rostedt To: Mathieu Desnoyers Cc: Linus Torvalds , Geert Uytterhoeven , Kees Cook , linux-kernel@vger.kernel.org, Masami Hiramatsu , Mark Rutland , Andrew Morton , Christian Brauner , Al Viro , Ajay Kaher Subject: Re: [for-linus][PATCH 1/3] eventfs: Have the inodes all for files and directories all be the same Message-ID: <20240122143740.6a889e36@gandalf.local.home> In-Reply-To: References: <20240117143548.595884070@goodmis.org> <20240117143810.531966508@goodmis.org> <20240122100630.6a400dd3@gandalf.local.home> <20240122114743.7e46b7cb@gandalf.local.home> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 22 Jan 2024 13:27:25 -0500 Mathieu Desnoyers wrote: > > IOW, this trivial patch seems to be much safer than worrying about > > some pointer exposure. > > My only concern about the simple ino_counter static increment is what > happens in the unlikely scenario of a 32-bit overflow. This is why > I suggested using a bitmap to track inode allocation. It's compact, and > we don't care that much about the linear bitmap scan overhead because > it's far from being a fast path. The original code use to get its inode via "get_next_ino()" I don't think there's any reason not to just go back and do that again. It can still overflow, but it's not anything new that couldn't have happen to debugfs and tracefs over the last decade. -- Steve