Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp5253410ybb; Tue, 24 Mar 2020 13:47:28 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuda3RkCO/rXGkyA6iTylrot4rwW+W4ng/mqMYN5SWM5MUUMFQGr09AXaxGJe6Gqx2FAe0M X-Received: by 2002:a4a:2c55:: with SMTP id o82mr77810ooo.33.1585082848309; Tue, 24 Mar 2020 13:47:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585082848; cv=none; d=google.com; s=arc-20160816; b=YoqMLP7/cx2oWAIYwLnjLyODSEPM+RQPkxTLFttQnrXRlms8ZlHbuZtdMds6mjwLXU Sl29uzFE4K0nmdK7WOM9QOA/AXD1JaF7G0J1cTznZ10rdbnm7rcdC9OK0e9COwEVCa1t XFeVn03sm7lPGxesrcKRHZqlELzB/pbAGAgUPcxM/wnE82n55E1l8GkDcaBrdnjhy98i bYIAvnjcYcNHIQxaeEnNoHymqbVWNzNiB0W0BThuQXgAQDwpZAF3iMUUCDegKG7kWRpY vqYEuEnie8nPkBH2DhsXcmg9le5WZ2aiHu8toleajkndbzBjcXkjwNvzv3ZXf6MjxFA2 u2VA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=03Vf7NWeYJA8RK86mKjseFUeDCtQRhfByskCq962FGE=; b=jyiLZDzMnJBTJ+SwFgRvXJmIIz8xjB2AvG64RzAOpo+79FNGnQcxOqvrFdHprkRd2O AY9NQFyC+qXaqL4DuRqgv8bife48jUEFn4HYvJkeC0XEcLmpXVfZYcLx5ySCL00LA0r4 DEaxD3aNxa679NWdifv4wreGGaYP6JEodhXoHZphNKbPHrMEnkNiGeWQoFaaL7kbEgcH dFBozDpoek5xkGk5mH/mTSBd1+DjTW3Rdp/+nZS5a6UvqEu4JVrubYHXTrwsbFhWgIgl N8i1/nF7x2et7H/ZRdeMOUAeXXWf0sl7L4xZ3UZa5yN0BJMR6k8c0oihmJzS7BfrEyPT NLjw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c19si1197218otr.276.2020.03.24.13.47.05; Tue, 24 Mar 2020 13:47:28 -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; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728350AbgCXUq3 (ORCPT + 99 others); Tue, 24 Mar 2020 16:46:29 -0400 Received: from monster.unsafe.ru ([5.9.28.80]:38698 "EHLO mail.unsafe.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728190AbgCXUqR (ORCPT ); Tue, 24 Mar 2020 16:46:17 -0400 Received: from comp-core-i7-2640m-0182e6.redhat.com (ip-89-102-33-211.net.upcbroadband.cz [89.102.33.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.unsafe.ru (Postfix) with ESMTPSA id 40AFDC61B2C; Tue, 24 Mar 2020 20:46:14 +0000 (UTC) From: Alexey Gladkov To: LKML , Kernel Hardening , Linux API , Linux FS Devel , Linux Security Module Cc: Akinobu Mita , Alexander Viro , Alexey Dobriyan , Alexey Gladkov , 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 , Kees Cook , Linus Torvalds , Oleg Nesterov Subject: [PATCH RESEND v9 7/8] proc: move hidepid values to uapi as they are user interface to mount Date: Tue, 24 Mar 2020 21:44:48 +0100 Message-Id: <20200324204449.7263-8-gladkov.alexey@gmail.com> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200324204449.7263-1-gladkov.alexey@gmail.com> References: <20200324204449.7263-1-gladkov.alexey@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Suggested-by: Alexey Dobriyan Signed-off-by: Alexey Gladkov --- include/linux/proc_fs.h | 9 +-------- include/uapi/linux/proc_fs.h | 13 +++++++++++++ 2 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 include/uapi/linux/proc_fs.h diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index afd38cae2339..d259817ec913 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h @@ -7,6 +7,7 @@ #include #include +#include struct proc_dir_entry; struct seq_file; @@ -27,14 +28,6 @@ struct proc_ops { unsigned long (*proc_get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); }; -/* definitions for hide_pid field */ -enum { - HIDEPID_OFF = 0, - HIDEPID_NO_ACCESS = 1, - HIDEPID_INVISIBLE = 2, - HIDEPID_NOT_PTRACEABLE = 4, /* Limit pids to only ptraceable pids */ -}; - /* definitions for proc mount option pidonly */ enum { PROC_PIDONLY_OFF = 0, 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