Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3826193ybv; Mon, 10 Feb 2020 07:07:07 -0800 (PST) X-Google-Smtp-Source: APXvYqz8lTFVTn8goA0vXvdViVSp9k18sbja+L6HdyG4w4n6mG+YYBvFvQQtfZGxXyw7oEUtre2C X-Received: by 2002:a9d:7dc9:: with SMTP id k9mr1388635otn.117.1581347227418; Mon, 10 Feb 2020 07:07:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581347227; cv=none; d=google.com; s=arc-20160816; b=wYN8+VxekQkXw4E5PPQEZISV8J7ecdWL0l93teNz9zxbmxJH6SVNeuCnDF8NwdBLzL 5imj0fCMMMc9U6QR+jFWZBNBR+1ilgwmceAJGAvLMc2I4UlOelfOpbpvwIb8Cpb2zgQY /edOS2tudF0ZWxWODOqoCmg3xvPLZukVxI9yyyTWFYXCfYjUIK1vaLCalkFV5YHOSVSo bvFc7e7nElNWnlIdO7XcXcyEUKK08ZDw+M988t7F2veoKgjSAnosoSoBYSDkMR97O10E sZZ+Z11dgIdTWVrWXwkj0FZbqafQnRs5NHBU4ok+7Rng0erh4LvTOQUZ9nwKCRPAdg04 31Xw== 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=DWjF20VK4gC5anRt5sxTZ7AgmTUUifGpYaRki4/6R3I=; b=CZ7cycMzzva59ZeGIh4ppu9V2Ykb9ZYI8pyTHWg4rUA1UDuDcEZ0QZzhVQfz/BGaBJ x6dbcIG5EOWNGNMo096gSvwzyzl7CpjSGdGJ6gygEYw1JXaYihsT388AD8/lnlxf/ZW0 PDsmIMl25xYQtQSZ0EeZLPpWTrNJdv6cqYqiMoOIbjR9HxAhTfsVyMbKisTSZwx9XAj3 qVXI9dG8Q9/SvM7Tv4J7AFgVrj2Agf5EdEFA9ZQUexNxVQQWCi7FhLYSfcyBLNn/+AhF 5UmQiNSHFDsw+MP3j5RAy+AxvPcYXLfUWvvZ4z1wmvAVPSbuqgrAeVsNtLe4rzUyJ2SU KnFg== 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 l21si279960oic.126.2020.02.10.07.06.55; Mon, 10 Feb 2020 07:07:07 -0800 (PST) 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 S1729391AbgBJPG3 (ORCPT + 99 others); Mon, 10 Feb 2020 10:06:29 -0500 Received: from monster.unsafe.ru ([5.9.28.80]:54352 "EHLO mail.unsafe.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729360AbgBJPG2 (ORCPT ); Mon, 10 Feb 2020 10:06:28 -0500 Received: from comp-core-i7-2640m-0182e6.redhat.com (nat-pool-brq-t.redhat.com [213.175.37.10]) (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 0A217C61B1C; Mon, 10 Feb 2020 15:06:25 +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 , Solar Designer Subject: [PATCH v8 11/11] proc: Move hidepid values to uapi as they are user interface to mount Date: Mon, 10 Feb 2020 16:05:19 +0100 Message-Id: <20200210150519.538333-12-gladkov.alexey@gmail.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200210150519.538333-1-gladkov.alexey@gmail.com> References: <20200210150519.538333-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 3ad0a47c3556..f2b4a411d371 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h @@ -7,19 +7,12 @@ #include #include +#include struct proc_dir_entry; struct seq_file; struct seq_operations; -/* definitions for hide_pid field */ -enum { - HIDEPID_OFF = 0, - HIDEPID_NO_ACCESS = 1, - HIDEPID_INVISIBLE = 2, - HIDEPID_NOT_PTRACABLE = 4, /* Limit pids to only ptracable 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..1e3374efffe2 --- /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_PTRACABLE = 4, +}; + +#endif -- 2.24.1