Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp980022ybb; Sat, 28 Mar 2020 15:10:24 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtS8TGrWqv39JWHN1igDkFsQyqTUSoj7ryQKnglI4SmVBfOTixAceeutvsAVFTcfLI1Rs0k X-Received: by 2002:a05:6830:17ca:: with SMTP id p10mr4188199ota.165.1585433423867; Sat, 28 Mar 2020 15:10:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585433423; cv=none; d=google.com; s=arc-20160816; b=tuOJakTacrZWdSzLKDL5eJ/ftHrJX/enXNl2Z//tf0COreK+rFDQGdj1EBYrejNoSV y2TTHKXCAvudh6bOqRmuhiEs14TCKzDHv1PKAVqW7bke0jSGZ4wN+TM39YVk/4rH2hvI FQiHi9qjrKcVOESA4Su2yIYUK7cz+GBrCpIxBscwoqKZvSRqAnu6BvmsbcVa4fQGJ/Dr aJDkScax6UCCVXlHksbT5z3ZKkB0A4SpHx4YPooTh+m0BMNES4fa71U+kk3eRZIKKlpl 3j/Si2V/lsrVpP6HRyEenITd1lmKZ8KCo1vL/yYB+3Bq2MKCF6nGZeWBkwub336OgrqF Hmrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=ovk2bmmHiHq0822krEgDFQkSPYt5Bktnb17JLm/lkJA=; b=Zw3P/Jj+z9siSOyS8ZJ0MRFXB1a5b1qeJ87RFebaGrKxGks/PEyfDLjXWc8UbnhbX/ NLdvABWWmJMIdWxZB0WGwxq/AiVdLm39a6RR6hX6kRwgBo9iKlBdMXuo4/TrDN7LZX4C ke3ivLlxEkqrpCZvaYjDFaYMpuiPSz4YqTqkEMynaCK2FN6yGzey772PzpeEgdWqWPqz MmzSIxyZNepx/crGzJ1F4A3Jg/1AulAamkO9oZ8RuyrdO82df/mClnLkJb1L6n4h+tEY cojMF4GnsQoomc9brZrLTGG60E4BSqfcwvIGwBkmn19TqKXppd3XSYQZJ9diQmNOgAFm XL1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=alfNoYU8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e17si4289621oti.82.2020.03.28.15.10.10; Sat, 28 Mar 2020 15:10:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=alfNoYU8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727795AbgC1Vxw (ORCPT + 99 others); Sat, 28 Mar 2020 17:53:52 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:34240 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726604AbgC1Vxw (ORCPT ); Sat, 28 Mar 2020 17:53:52 -0400 Received: by mail-pl1-f194.google.com with SMTP id a23so5034884plm.1 for ; Sat, 28 Mar 2020 14:53:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ovk2bmmHiHq0822krEgDFQkSPYt5Bktnb17JLm/lkJA=; b=alfNoYU8g+4LyDehhJH9iGwAtea55N/Xy8WHF5I5hMwcVa8EuZTEWAbZ7eeEAtCAjD 1YoFtSlC3h2vBfbE0MPFBAhCW1HFfaZquUMB005WQh05V1HgCf9MnCioH/P0sUd516+4 DI0bMW4XCbsmAoMIv05h5N0yfwlGhX5+NtqUE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ovk2bmmHiHq0822krEgDFQkSPYt5Bktnb17JLm/lkJA=; b=TvaM1b284JDG9puNV2kN1a+bOpuAzjZ98uIxY26VrZetlOr/yb9tW+XllwvTa/Qa7d nsblpUdE+5eohO+TonQ67gRi1OeNjZe1RoBENfCLYIGPdtP7YcxVDKuSG+N2Du67sE7O ypMX1B09R8FzuBWiS0OwYvIP7gdZopVXlizJMGCUGaDNx9IEoWhIRmQ6aKkRHqPpYh/o 494W3AwA+Q3Je3rtj7Ak0SLeLh+0maOOeRHxyAXw7hvcS0b+EiV78OYCEc1Q24bOHWu+ dpIHqmEY30lpGqQhfLzhVoSantEhN9C30OrkXidfPpJuSs9CRW1MNXyEEGCpNCxdvnR8 VT3g== X-Gm-Message-State: ANhLgQ2HgWy/inTw7BB7nBf3hbXzpxghcenLYV4snYzDn7Qho6qj53tA lOAPZOdxYi+Ks8vY/ohcueKTDQ== X-Received: by 2002:a17:90a:fd90:: with SMTP id cx16mr7121093pjb.41.1585432431548; Sat, 28 Mar 2020 14:53:51 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id hg20sm6550839pjb.3.2020.03.28.14.53.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Mar 2020 14:53:50 -0700 (PDT) Date: Sat, 28 Mar 2020 14:53:49 -0700 From: Kees Cook To: Alexey Gladkov Cc: LKML , Kernel Hardening , Linux API , Linux FS Devel , Linux Security Module , Akinobu Mita , Alexander Viro , Alexey Dobriyan , Andrew Morton , Andy Lutomirski , Daniel Micay , Djalal Harouni , "Dmitry V . Levin" , "Eric W . Biederman" , Greg Kroah-Hartman , Ingo Molnar , "J . Bruce Fields" , Jeff Layton , Jonathan Corbet , Linus Torvalds , Oleg Nesterov Subject: Re: [PATCH v10 7/9] proc: move hidepid values to uapi as they are user interface to mount Message-ID: <202003281453.CED94974@keescook> References: <20200327172331.418878-1-gladkov.alexey@gmail.com> <20200327172331.418878-8-gladkov.alexey@gmail.com> <202003281340.B73225DCC9@keescook> <20200328212547.xxiqxqhxzwp6w5n5@comp-core-i7-2640m-0182e6> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200328212547.xxiqxqhxzwp6w5n5@comp-core-i7-2640m-0182e6> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 28, 2020 at 10:25:47PM +0100, Alexey Gladkov wrote: > On Sat, Mar 28, 2020 at 01:41:02PM -0700, Kees Cook wrote: > > diff --git a/include/uapi/linux/proc_fs.h b/include/uapi/linux/proc_fs.h > > > new file mode 100644 > > > index 000000000000..dc6d717aa6ec > > > --- /dev/null > > > +++ b/include/uapi/linux/proc_fs.h > > > @@ -0,0 +1,13 @@ > > > +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ > > > +#ifndef _UAPI_PROC_FS_H > > > +#define _UAPI_PROC_FS_H > > > + > > > +/* definitions for hide_pid field */ > > > +enum { > > > + HIDEPID_OFF = 0, > > > + HIDEPID_NO_ACCESS = 1, > > > + HIDEPID_INVISIBLE = 2, > > > + HIDEPID_NOT_PTRACEABLE = 4, > > > +}; > > > + > > > +#endif > > > -- > > > 2.25.2 > > > > > > > Should the numeric values still be UAPI if there is string parsing now? > > I think yes, because these are still valid hidepid= values. But if we don't expose the values, we can do whatever we like with future numbers (e.g. the "is this a value or a bit field?" question). -- Kees Cook