From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754948AbcH3O6c (ORCPT ); Tue, 30 Aug 2016 10:58:32 -0400 Received: from mail-ua0-f181.google.com ([209.85.217.181]:34335 "EHLO mail-ua0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753592AbcH3O63 (ORCPT ); Tue, 30 Aug 2016 10:58:29 -0400 MIME-Version: 1.0 In-Reply-To: References: <20160825152110.25663-1-dsafonov@virtuozzo.com> <20160825152110.25663-2-dsafonov@virtuozzo.com> From: Andy Lutomirski Date: Tue, 30 Aug 2016 07:58:07 -0700 Message-ID: Subject: Re: [RFC 1/3] x86/vdso: create vdso file, use it for mapping To: Dmitry Safonov Cc: "linux-kernel@vger.kernel.org" , Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , X86 ML , Dmitry Safonov <0x7f454c46@gmail.com>, Oleg Nesterov , Steven Rostedt , Al Viro Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 29, 2016 at 2:50 AM, Dmitry Safonov wrote: > On 08/29/2016 12:28 PM, Andy Lutomirski wrote: >> >> On Thu, Aug 25, 2016 at 8:21 AM, Dmitry Safonov >> wrote: >>> >>> I added here a new in-kernel fs with ramfs-like options. >>> Created vdso file in this fs (yet for testing, only 64-bit vdso). >>> Mapped this file to process's mm on setup_additional_pages. >>> Just for testing purpose it's done only for specific UID. >> >> >> I'm wondering whether all this code could be easily moved into the >> core special mapping helpers so that all special mappings get the same >> benefit. We could embed a struct file * (or struct inode or whatever) >> in special_mapping if needed. > > > Hmm, yes, I guess. The only thing -- we'll still need per-arch changes > to initialize those files on booting. But that looks like the proper > generic place to move this code. You might be able to get away with initializing on first use. --Andy