Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp621905ybh; Tue, 21 Jul 2020 04:00:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyX5Mj+ROAHXl+G/uCyLqApbkUVkZ1D5ri3UreCQNK/NaiTNP6bHXydcOAxWL9bah96epmv X-Received: by 2002:aa7:c504:: with SMTP id o4mr24898524edq.311.1595329211880; Tue, 21 Jul 2020 04:00:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595329211; cv=none; d=google.com; s=arc-20160816; b=jVYfhPmE9DgKNHVbjcyNQNRmEwtGI7Cuv1hcQ622MukrfNpOAGMK5S6CVpYfu29cJz cJO6uxz3iFWGjlaARyZszGHBQQ61ZHn0YYhCpIwkaoa7S8JU4kNbvbbqaP6s2xlCyhiC sRGqlVs6tn+eOSSiX76Wx21zhhm0qQWoBrx+g5ykWeJZ0IDTq1aCVFTXtlLiuB7lzBYr w745mUEGZLnS81ddZzTTPaJjJo/bK9mhKmVor3Cr+abVl5TUVQCbKJFIWwFjpR1FV04r uisdrHx1duU5Mn5GwFP+5VzcplighMDkLV4TaMwMqOKu1cOV4UPI3SxghJV3Y7jwI0eZ Y6Kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :reply-to:in-reply-to:references:mime-version:dkim-signature; bh=/EF7Qison7+OGXQXe8tCTGM4PP/e4Mdg4NPhl6XK730=; b=a593r6x05b2Y9aUMDc8gdE7wcOgGaS5Hiqa4zPcT5KSY16xRakEsK3SHzC9tqkr4Op SyIVECHOBAfCHB0EUls93KfzOw2ICWDrq6n/sl7C8eDITBI5bcxoyIJPpgj3HS1JO08a lt3CVuohlu+SBwbJoRkP3LHaWXXUe90AIKifQfgm+08hSOucjT43cmfuqS7dQpzSeiGA Axn0FnloGJOsrOfuU4g60EM2AdJkt49QP6y7QfEVRUhnaYDOBDXCyJLQvbVxrmYCeRFg oMrTccilb3dQAKKj74dTnC16e1GcepyWLbGfEqpX18YKnH7tGBbP1ztpUDJ0dDceiosd BmVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Uk4f9jfG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k6si11848741edn.299.2020.07.21.03.59.49; Tue, 21 Jul 2020 04:00:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Uk4f9jfG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729357AbgGUK7e (ORCPT + 99 others); Tue, 21 Jul 2020 06:59:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726611AbgGUK7e (ORCPT ); Tue, 21 Jul 2020 06:59:34 -0400 Received: from mail-ot1-x343.google.com (mail-ot1-x343.google.com [IPv6:2607:f8b0:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D77C9C061794; Tue, 21 Jul 2020 03:59:33 -0700 (PDT) Received: by mail-ot1-x343.google.com with SMTP id h13so14742116otr.0; Tue, 21 Jul 2020 03:59:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=/EF7Qison7+OGXQXe8tCTGM4PP/e4Mdg4NPhl6XK730=; b=Uk4f9jfGhs5DkBWkywVYSxv+RjvPtlBJKwNzxDQJRM4oyUlZeJHH9Ay0Dz9S3T+O86 I1k8wcSU5qjlnQbQS1Cc5u/Di5a8oxU0TqNANIeZ+urK3ruLtTD1rFzoDtPyUq0zyw1t TKTa7dYj3q558MX8C2dCAhl0Kx3BnS6PKK14W3du9GA95iORa8+JZDbW/DQ6a9DT5Fmy 8za6hMaHY5YNv55f0k+a+Ti8u5YKEfdRVS6vRWc0m6bcU1eZA57gEbg14Y3/HWJqEceg I6AApXJum8MPc7FIX+9Iv2OU5g/1PXoIJOC9VdOjehdpKQ5Gaotz84w3/VSWkS/6Omc3 Mlbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=/EF7Qison7+OGXQXe8tCTGM4PP/e4Mdg4NPhl6XK730=; b=U0J4n6LqDPliXbop2taAxI2/hRXvE/q8gjt4Ao78OJkxKolEdR14ZuirKHtQyMl3at bP/yU+GYiomDb4cmPeww1CRjhAnXky3ZwbdG8tQqvbBN3a0QWlvrwCPY6juaaSmLQjmk QV1RQUuxwFvH9/kldYisCOcsQ3uuaN7TX2JD/5mrz3IKZJ67hnKLLKINOUJRIekWoTcl BNg7y3p/h+lGtvjIHFQEM53emsLf4aAkihNZxBBsUqP1Lp4Gde5ek5aeYCDYrfPmEFV0 REUqhb+je2R3IaOMNhS2Yvp4uGIomIKeJXZQpwaR0aaFT01Kw2aXRzWbRxGjAa57cCwe sXaQ== X-Gm-Message-State: AOAM533kpAbfiB3/fRn4/mWvD67UX4m1W5FVIfmww+T/1P1ukJnhvypA T2XLuN9JypBewCTmF6PggNwoUvYX7fPtDPzKpeI= X-Received: by 2002:a05:6830:2081:: with SMTP id y1mr23521903otq.114.1595329173244; Tue, 21 Jul 2020 03:59:33 -0700 (PDT) MIME-Version: 1.0 References: <20200720092435.17469-1-rppt@kernel.org> <20200720092435.17469-4-rppt@kernel.org> In-Reply-To: <20200720092435.17469-4-rppt@kernel.org> Reply-To: mtk.manpages@gmail.com From: "Michael Kerrisk (man-pages)" Date: Tue, 21 Jul 2020 12:59:22 +0200 Message-ID: Subject: Re: [PATCH 3/6] mm: introduce secretmemfd system call to create "secret" memory areas To: Mike Rapoport Cc: lkml , Alexander Viro , Andrew Morton , Andy Lutomirski , Arnd Bergmann , Borislav Petkov , Catalin Marinas , Christopher Lameter , Dan Williams , Dave Hansen , Elena Reshetova , "H. Peter Anvin" , Idan Yaniv , Ingo Molnar , James Bottomley , "Kirill A. Shutemov" , Matthew Wilcox , Mike Rapoport , Palmer Dabbelt , Paul Walmsley , Peter Zijlstra , Thomas Gleixner , Tycho Andersen , Will Deacon , Linux API , linux-arch , linux-arm-kernel@lists.infradead.org, "linux-fsdevel@vger.kernel.org" , Linux-MM , linux-nvdimm@lists.01.org, linux-riscv@lists.infradead.org, "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mike, On Mon, 20 Jul 2020 at 11:26, Mike Rapoport wrote: > > From: Mike Rapoport > > Introduce "secretmemfd" system call with the ability to create memory areas > visible only in the context of the owning process and not mapped not only > to other processes but in the kernel page tables as well. > > The user will create a file descriptor using the secretmemfd system call Without wanting to start a bikeshed discussion, the more common convention in recently added system calls is to use an underscore in names that consist of multiple clearly distinct words. See many examples in https://man7.org/linux/man-pages/man2/syscalls.2.html. Thus, I'd suggest at least secret_memfd(). Also, I wonder whether memfd_secret() might not be even better. There's plenty of precedent for the naming style where related APIs share a common prefix [1]. Thanks, Michael [1] Some examples: epoll_create(2) epoll_create1(2) epoll_ctl(2) epoll_pwait(2) epoll_wait(2) mq_getsetattr(2) mq_notify(2) mq_open(2) mq_timedreceive(2) mq_timedsend(2) mq_unlink(2) sched_get_affinity(2) sched_get_priority_max(2) sched_get_priority_min(2) sched_getaffinity(2) sched_getattr(2) sched_getparam(2) sched_getscheduler(2) sched_rr_get_interval(2) sched_set_affinity(2) sched_setaffinity(2) sched_setattr(2) sched_setparam(2) sched_setscheduler(2) sched_yield(2) timer_create(2) timer_delete(2) timer_getoverrun(2) timer_gettime(2) timer_settime(2) timerfd_create(2) timerfd_gettime(2) timerfd_settime(2) -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/