From patchwork Sun Mar 15 15:25:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Gladkov X-Patchwork-Id: 11439255 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4917D14B4 for ; Sun, 15 Mar 2020 15:26:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3415920724 for ; Sun, 15 Mar 2020 15:26:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728921AbgCOP0C (ORCPT ); Sun, 15 Mar 2020 11:26:02 -0400 Received: from monster.unsafe.ru ([5.9.28.80]:34336 "EHLO mail.unsafe.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728794AbgCOP0A (ORCPT ); Sun, 15 Mar 2020 11:26:00 -0400 Received: from localhost.localdomain (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 39A8EC61B31; Sun, 15 Mar 2020 15:25:56 +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 v9 7/8] proc: move hidepid values to uapi as they are user interface to mount Date: Sun, 15 Mar 2020 16:25:22 +0100 Message-Id: <08f4488dc372c23c3c8511999cf77814e70ce292.1584285253.git.gladkov.alexey@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: 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