From: Matthew Wilcox <willy@infradead.org> To: Al Viro <viro@zeniv.linux.org.uk> Cc: Mike Kravetz <mike.kravetz@oracle.com>, Miklos Szeredi <miklos@szeredi.hu>, kbuild test robot <lkp@intel.com>, kbuild-all@lists.01.org, Colin Walters <walters@verbum.org>, syzbot <syzbot+d6ec23007e951dadf3de@syzkaller.appspotmail.com>, Andrew Morton <akpm@linux-foundation.org>, Linux Memory Management List <linux-mm@kvack.org>, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, syzkaller-bugs <syzkaller-bugs@googlegroups.com>, overlayfs <linux-unionfs@vger.kernel.org> Subject: Re: [PATCH v2] ovl: provide real_file() and overlayfs get_unmapped_area() Date: Wed, 10 Jun 2020 18:36:16 -0700 [thread overview] Message-ID: <20200611013616.GM19604@bombadil.infradead.org> (raw) In-Reply-To: <20200611003726.GY23230@ZenIV.linux.org.uk> On Thu, Jun 11, 2020 at 01:37:26AM +0100, Al Viro wrote: > On Wed, Jun 10, 2020 at 05:13:52PM -0700, Mike Kravetz wrote: > > > To address this issue, > > - Add a new file operation f_real while will return the underlying file. > > Only overlayfs provides a function for this operation. > > - Add a new routine real_file() which can be used by core code get an > > underlying file. > > - Update is_file_hugepages to get the real file. > > Egads... So to find out whether it's a hugetlb you would > * check if a method is NULL > * if not, call it > * ... and check if the method table of the result is hugetlbfs one? > > Here's a radical suggestion: FMODE_HUGEPAGES. Just have it set by > ->open() and let is_file_hugepages() check it. In ->f_mode. And > make the bloody hugetlbfs_file_operations static, while we are at it. ITYM FMODE_OVL_UPPER. To quote Mike: > while (file->f_op == &ovl_file_operations) > file = file->private_data; > return file; which would be transformed into: while (file->f_mode & FMODE_OVL_UPPER) file = file->private_data; return file; Or are you proposing that overlayfs copy FMODE_HUGEPAGES from the underlying fs to the overlaying fs?
WARNING: multiple messages have this Message-ID (diff)
From: Matthew Wilcox <willy@infradead.org> To: kbuild-all@lists.01.org Subject: Re: [PATCH v2] ovl: provide real_file() and overlayfs get_unmapped_area() Date: Wed, 10 Jun 2020 18:36:16 -0700 [thread overview] Message-ID: <20200611013616.GM19604@bombadil.infradead.org> (raw) In-Reply-To: <20200611003726.GY23230@ZenIV.linux.org.uk> [-- Attachment #1: Type: text/plain, Size: 1250 bytes --] On Thu, Jun 11, 2020 at 01:37:26AM +0100, Al Viro wrote: > On Wed, Jun 10, 2020 at 05:13:52PM -0700, Mike Kravetz wrote: > > > To address this issue, > > - Add a new file operation f_real while will return the underlying file. > > Only overlayfs provides a function for this operation. > > - Add a new routine real_file() which can be used by core code get an > > underlying file. > > - Update is_file_hugepages to get the real file. > > Egads... So to find out whether it's a hugetlb you would > * check if a method is NULL > * if not, call it > * ... and check if the method table of the result is hugetlbfs one? > > Here's a radical suggestion: FMODE_HUGEPAGES. Just have it set by > ->open() and let is_file_hugepages() check it. In ->f_mode. And > make the bloody hugetlbfs_file_operations static, while we are at it. ITYM FMODE_OVL_UPPER. To quote Mike: > while (file->f_op == &ovl_file_operations) > file = file->private_data; > return file; which would be transformed into: while (file->f_mode & FMODE_OVL_UPPER) file = file->private_data; return file; Or are you proposing that overlayfs copy FMODE_HUGEPAGES from the underlying fs to the overlaying fs?
next prev parent reply other threads:[~2020-06-11 1:36 UTC|newest] Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-06 3:06 kernel BUG at mm/hugetlb.c:LINE! syzbot 2020-04-06 3:06 ` syzbot 2020-04-06 22:05 ` Mike Kravetz 2020-05-12 15:04 ` Miklos Szeredi 2020-05-12 15:04 ` Miklos Szeredi 2020-05-12 18:11 ` Mike Kravetz 2020-05-15 22:15 ` Mike Kravetz 2020-05-18 11:12 ` Miklos Szeredi 2020-05-18 11:12 ` Miklos Szeredi 2020-05-18 23:22 ` Mike Kravetz 2020-05-18 23:41 ` Colin Walters 2020-05-19 0:35 ` Mike Kravetz 2020-05-20 11:20 ` Miklos Szeredi 2020-05-20 11:20 ` Miklos Szeredi 2020-05-20 17:27 ` Mike Kravetz 2020-05-22 10:05 ` Miklos Szeredi 2020-05-28 0:01 ` Mike Kravetz 2020-05-28 8:37 ` [PATCH v2] ovl: provide real_file() and overlayfs get_unmapped_area() kbuild test robot 2020-05-28 8:37 ` kbuild test robot 2020-05-28 21:01 ` Mike Kravetz 2020-05-28 21:01 ` Mike Kravetz 2020-06-04 9:16 ` Miklos Szeredi 2020-06-04 9:16 ` Miklos Szeredi 2020-06-04 9:16 ` Miklos Szeredi 2020-06-11 0:13 ` Mike Kravetz 2020-06-11 0:13 ` Mike Kravetz 2020-06-11 0:37 ` Al Viro 2020-06-11 0:37 ` Al Viro 2020-06-11 1:36 ` Matthew Wilcox [this message] 2020-06-11 1:36 ` Matthew Wilcox 2020-06-11 2:17 ` Al Viro 2020-06-11 2:17 ` Al Viro 2020-06-11 2:31 ` Mike Kravetz 2020-06-11 2:31 ` Mike Kravetz
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200611013616.GM19604@bombadil.infradead.org \ --to=willy@infradead.org \ --cc=akpm@linux-foundation.org \ --cc=kbuild-all@lists.01.org \ --cc=linux-fsdevel@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mm@kvack.org \ --cc=linux-unionfs@vger.kernel.org \ --cc=lkp@intel.com \ --cc=mike.kravetz@oracle.com \ --cc=miklos@szeredi.hu \ --cc=syzbot+d6ec23007e951dadf3de@syzkaller.appspotmail.com \ --cc=syzkaller-bugs@googlegroups.com \ --cc=viro@zeniv.linux.org.uk \ --cc=walters@verbum.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.