From mboxrd@z Thu Jan 1 00:00:00 1970 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