From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755219AbcIUBHm (ORCPT ); Tue, 20 Sep 2016 21:07:42 -0400 Received: from terminus.zytor.com ([198.137.202.10]:42756 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754593AbcIUBHk (ORCPT ); Tue, 20 Sep 2016 21:07:40 -0400 Subject: Re: [RFC 0/3] Put vdso in ramfs-like filesystem (vdsofs) To: Andy Lutomirski References: <20160825152110.25663-1-dsafonov@virtuozzo.com> <3AD1D5AF-552E-4345-855A-36ECC4B545DE@zytor.com> <6d16fdfe-582e-fa4a-9d51-49bd07a22945@zytor.com> Cc: Dmitry Safonov <0x7f454c46@gmail.com>, Dmitry Safonov , "linux-kernel@vger.kernel.org" , Ingo Molnar , Thomas Gleixner , X86 ML , Oleg Nesterov , Steven Rostedt , Al Viro From: "H. Peter Anvin" Message-ID: <6de39359-511e-1ce9-9201-85bd3425a05d@zytor.com> Date: Tue, 20 Sep 2016 18:07:21 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/20/16 17:54, Andy Lutomirski wrote: > - If vvar is in the same inode, then that inode won't be a valid ELF > image, because the ELF header won't be in the right place. So the vvar ought to move into an actual ELF segment, which is probably The Right Thing anyway. > - vvar is highly magical. IMO letting it get mapped with VM_MAYWRITE > is asking for trouble, as anything that writes it will COW it, leading > to strange malfunctions. > > - vvar can, and has, had IO pages in it. This means that the actual > cache types can vary page-to-page in the vvar area, which is not > something that ordinary files do. Neither of these are any different than many devices, or various files in procfs. > My personal preference is to let them both be real struct file * > objects (possibly shared between all processes of the same vdso ABI) > but to prevent user code from ever creating an fd referring to one of > these files. Why? It would help people doing weird things like process snapshotting or bimodal execution enormously. We want to share an inode, obviously; the pointer is another issue. > Also, if we let the users get an fd pointing to the vdso, then we're > more or less committing to never having contents in the vdso text that > vary per-process. Are we okay with that. This might be a reason to put these objects in procfs rather than sysfs, but I have to admit that this seems *extremely* far fetched to me. Obviously they vary per process in the sense that there are already several to choose from. In the case of process-unique vdsos there would be a large number of them, of course. -hpa