From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 94D07CE7B06 for ; Thu, 28 Sep 2023 18:02:03 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1qlvKt-0001xo-5d; Thu, 28 Sep 2023 18:02:02 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qlvKr-0001xF-6t; Thu, 28 Sep 2023 18:02:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=MIME-Version:Content-Transfer-Encoding:Content-Type :References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=EAdPFsmHcyWayc69u1pNQGVN/Od37LMkwOOQtSvFBiM=; b=PmlgHAzcB1cvWY5zT919YlC57F okmq8vnnuiT4E65HBvOQFFPmnBKL8BxjNigW81bWN9IevqeEdcZbkFgmn03dyGQBTKph3jr7/sHFG fnfIc4PGOv91p3UZGObKuAw7P1OrIUW1pyFQTrj3TnSyYJkWMbQelYGIbRq0eAPOuEoU=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=MIME-Version:Content-Transfer-Encoding:Content-Type:References: In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=EAdPFsmHcyWayc69u1pNQGVN/Od37LMkwOOQtSvFBiM=; b=HJ512DuO1+xY/iPK6ELqML1jEA BmqzkUltrbeRUVJRbzDxuJWj0GZQoKUdBuCXl4roi5V8FA3W38r1cIwk9O4korKsiexmQFnGm6b4F qGOIWybsnyKc33kik8DUoIrm4bhftYiXkjtc7PZk/mnqEeiQWZ3+o35vACX5MWSZ/8IA=; Received: from ams.source.kernel.org ([145.40.68.75]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1qlvKm-0003mi-7V; Thu, 28 Sep 2023 18:02:00 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id D6EECB81DC1; Thu, 28 Sep 2023 18:01:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A6C1DC433C7; Thu, 28 Sep 2023 18:01:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695924109; bh=EAdPFsmHcyWayc69u1pNQGVN/Od37LMkwOOQtSvFBiM=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=bfK28RLdLGgKZCUgDzeWTBKaqWs6brrGRaSyPdFXskOVm0On6PlLojE5M/xCgEEY5 grpUMo2uaqDtijMvKbHWfOGFJG+vQA/tkSyBcl6qHWL3dn3aU/KYO5L4q/l83Nz1PF rjm7ECl0slpI4oU4YRq3Il4iqcNMzLzfgVWdoz5lG6ZAiTp3N12KGI95ZvFcFMlTR+ jbG318WOr9JpuRBEryTb1XBxjEr4Jw9k8E4/FfV1BqWFd1k5jtZEs5n6naq0zoe6ze HRJ/cpQFseJro5/YEKgl8SVwodWHkLRLpC8H6rkjRLoCIio3JUF68vh6UiBMp7cQEp W7opbVnaB1VbA== Message-ID: <00ca2e3997cc86401f7fb65d936fe5403abd5627.camel@kernel.org> From: Jeff Layton To: Linus Torvalds Date: Thu, 28 Sep 2023 14:01:33 -0400 In-Reply-To: References: <20230928110554.34758-1-jlayton@kernel.org> <20230928110554.34758-3-jlayton@kernel.org> User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 X-Headers-End: 1qlvKm-0003mi-7V Subject: Re: [f2fs-dev] [PATCH 87/87] fs: move i_blocks up a few places in struct inode X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Latchesar Ionkov , Konstantin Komarov , "Rafael J. Wysocki" , "Darrick J. Wong" , Anders Larsen , Carlos Llamas , Andrii Nakryiko , Mattia Dongili , Hugh Dickins , John Johansen , Yonghong Song , Alexander Gordeev , Christoph Hellwig , Mike Marshall , Paulo Alcantara , linux-xfs@vger.kernel.org, Michael Ellerman , James Morris , Christophe Leroy , Christoph Hellwig , Christian Borntraeger , devel@lists.orangefs.org, Shyam Prasad N , linux-um@lists.infradead.org, Nicholas Piggin , Alexander Viro , Eric Van Hensbergen , Suren Baghdasaryan , Trond Myklebust , Anton Altaparmakov , Christian Brauner , Greg Kroah-Hartman , Stephen Smalley , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Ronnie Sahlberg , Sergey Senozhatsky , Arve =?ISO-8859-1?Q?Hj=F8nnev=E5g?= , Chuck Lever , Sven Schnelle , Jiri Olsa , Jan Kara , Tejun Heo , Andrew Morton , linux-trace-kernel@vger.kernel.org, Dave Kleikamp , linux-mm@kvack.org, Joel Fernandes , Eric Dumazet , Stanislav Fomichev , linux-s390@vger.kernel.org, linux-nilfs@vger.kernel.org, Paul Moore , Leon Romanovsky , John Fastabend , Luis Chamberlain , codalist@coda.cs.cmu.edu, Iurii Zaikin , Namjae Jeon , Masami Hiramatsu , Todd Kjos , Vasily Gorbik , selinux@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, reiserfs-devel@vger.kernel.org, Miklos Szeredi , Yue Hu , Jaegeuk Kim , Martijn Coenen , OGAWA Hirofumi , Hao Luo , Tony Luck , Theodore Ts'o , Nicolas Pitre , linux-ntfs-dev@lists.sourceforge.net, Muchun Song , linux-f2fs-devel@lists.sourceforge.net, "Guilherme G. Piccoli" , gfs2@lists.linux.dev, Eric Biederman , Anna Schumaker , Brad Warrum , Mike Kravetz , linux-efi@vger.kernel.org, Martin Brandenburg , ocfs2-devel@lists.linux.dev, Alexei Starovoitov , platform-driver-x86@vger.kernel.org, Chris Mason , linux-mtd@lists.infradead.org, linux-hardening@vger.kernel.org, Marc Dionne , Jiri Slaby , linux-afs@lists.infradead.org, Ian Kent , Naohiro Aota , Daniel Borkmann , Dennis Dalessandro , linux-rdma@vger.kernel.org, coda@cs.cmu.edu, Ilpo =?ISO-8859-1?Q?J=E4rvinen?= , Ilya Dryomov , Paolo Abeni , "Serge E. Hallyn" , Christian Schoenebeck , Kees Cook , Arnd Bergmann , autofs@vger.kernel.org, Steven Rostedt , Mark Gross , Damien Le Moal , Eric Paris , ceph-devel@vger.kernel.org, Gao Xiang , Jan Harkes , linux-nfs@vger.kernel.org, linux-ext4@vger.kernel.org, Olga Kornievskaia , Song Liu , samba-technical@lists.samba.org, Steve French , Jeremy Kerr , netdev@vger.kernel.org, Bob Peterson , linux-fsdevel@vger.kernel.org, bpf@vger.kernel.org, ntfs3@lists.linux.dev, linux-erofs@lists.ozlabs.org, "David S. Miller" , Chandan Babu R , jfs-discussion@lists.sourceforge.net, Jan Kara , Neil Brown , Dominique Martinet , Amir Goldstein , Bob Copeland , KP Singh , linux-unionfs@vger.kernel.org, David Howells , Joseph Qi , Andreas Dilger , Mikulas Patocka , Ard Biesheuvel , Anton Ivanov , Andreas Gruenbacher , Richard Weinberger , Mark Fasheh , Dai Ngo , Jason Gunthorpe , linux-serial@vger.kernel.org, Jakub Kicinski , Salah Triki , Evgeniy Dushistov , linux-cifs@vger.kernel.org, Heiko Carstens , apparmor@lists.ubuntu.com, Josef Bacik , Tom Talpey , Hans de Goede , "Tigran A. Aivazian" , David Sterba , Xiubo Li , Ryusuke Konishi , Johannes Thumshirn , Ritu Agarwal , Luis de Bethencourt , Martin KaFai Lau , v9fs@lists.linux.dev, David Sterba , linux-security-module@vger.kernel.org, Jeffle Xu , Phillip Lougher , Johannes Berg , Sungjong Seo , David Woodhouse , linux-karma-devel@lists.sourceforge.net, linux-btrfs@vger.kernel.org, Joel Becker Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On Thu, 2023-09-28 at 10:41 -0700, Linus Torvalds wrote: > On Thu, 28 Sept 2023 at 04:06, Jeff Layton wrote: > > > > Move i_blocks up above the i_lock, which moves the new 4 byte hole to > > just after the timestamps, without changing the size of the structure. > > I'm sure others have mentioned this, but 'struct inode' is marked with > __randomize_layout, so the actual layout may end up being very > different. > > I'm personally not convinced the whole structure randomization is > worth it - it's easy enough to figure out for any distro kernel since > the seed has to be the same across machines for modules to work, so > even if the seed isn't "public", any layout is bound to be fairly > easily discoverable. > > So the whole randomization only really works for private kernel > builds, and it adds this kind of pain where "optimizing" the structure > layout is kind of pointless depending on various options. > > I certainly *hope* no distro enables that pointless thing, but it's a worry. > I've never enabled struct randomization and don't know anyone who does. I figure if you turn that on, you get to keep all of the pieces when you start seeing weird performance problems. I think that we have to optimize for that being disabled. Even without that though, turning on and off options can change the layout...and then there are different arches, etc. I'm using a config derived from the Fedora x86_64 kernel images and hope that represents a reasonably common configuration. The only conditional members before the timestamps are based on CONFIG_FS_POSIX_ACL and CONFIG_SECURITY, which are almost always turned on with most distros. -- Jeff Layton _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel