Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2706179ybb; Fri, 27 Mar 2020 10:32:33 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsv91i915a1siWrIxT081/YFV9cYrh6eRcels0t69ImWgrmGbf0ct11oBM4XgtCVo9iz9by X-Received: by 2002:a4a:6841:: with SMTP id a1mr456409oof.18.1585330353373; Fri, 27 Mar 2020 10:32:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585330353; cv=none; d=google.com; s=arc-20160816; b=CmTRJK1KDNHkdwkP/uRWIdMr2c3XGhK4+9xz5XjyvPuVcfQwbYaVfgQeZYnwxu+V6k AE+Jifm5W1pGAC3ruHbiE9yYMuaXFSwVovcMOHv7oAwdBBbqmf6vetIs+L/ocbocHqFO rl+diQdV4h9AFxv0hqNjLrqEId/hvi86p4vCaOWfSK+R752YA0CPAWwPcg9duPNNUDJ+ NjNjl9OQVNI9Tq982f32aHmOw4J2Zo7BSGI4nui33N/MJ0e4KljWoyfeVyR+TEq81wbx eHk7wN4QKChY+P6ftHfDY9BCy7cXJpJvmnmp1nki4OFFni0NAWUiHWl0/BhBpYhrbdB4 3A0w== 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=damW7sHfN4FwqsyHO5r4Wv4BPwcC+HpHRIfOYmeHu5I=; b=O56bYZ2qdoPR0BGrv7/4Ne4bQLdIYKZx2NmaLYhjCqx8JToMkeR3rILOftvFt2sgzA /U1AnuEVROG1R8dlCaird+j46uTuLqRJ2Qh3GHmUw5abEc+Djn6Hpwwkno//Iots497Z yBsEcTEXPcJIWqZy19xeztQY5pfPtcH0WOsp2WcCU8ZZ828wEoQd5O79AHt4azpVmBDs 3RDbzF258H9Hb+PNLSXKRmPHlU5Wp6mZBtFq0j3+FY2vjt6DAPSSRUZcqD+SRpWG1etK mkIdthyMwnJWL9g9s4+vJQBsM3UTLc65RrU1aDTFdgmzpiPNWX8xTzqgyH0yb+dNWFGZ gNkQ== 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 e24si2602253otk.203.2020.03.27.10.32.19; Fri, 27 Mar 2020 10:32:33 -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 S1727143AbgC0Rbu (ORCPT + 99 others); Fri, 27 Mar 2020 13:31:50 -0400 Received: from raptor.unsafe.ru ([5.9.43.93]:38850 "EHLO raptor.unsafe.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727770AbgC0Rbs (ORCPT ); Fri, 27 Mar 2020 13:31:48 -0400 Received: from comp-core-i7-2640m-0182e6.redhat.com (ip-89-102-33-211.net.upcbroadband.cz [89.102.33.211]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by raptor.unsafe.ru (Postfix) with ESMTPSA id A172520AB4; Fri, 27 Mar 2020 17:24:00 +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 v10 7/9] proc: move hidepid values to uapi as they are user interface to mount Date: Fri, 27 Mar 2020 18:23:29 +0100 Message-Id: <20200327172331.418878-8-gladkov.alexey@gmail.com> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200327172331.418878-1-gladkov.alexey@gmail.com> References: <20200327172331.418878-1-gladkov.alexey@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.1 (raptor.unsafe.ru [5.9.43.93]); Fri, 27 Mar 2020 17:24:01 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Suggested-by: Alexey Dobriyan Reviewed-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