Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1633602ybl; Sat, 25 Jan 2020 05:09:10 -0800 (PST) X-Google-Smtp-Source: APXvYqxFsNAVxwLWN8mrl9XIUo2R4yyzpen8UJmDfhlMCXX3Be220xjahtQx/qCJSDrwvWnMCxeo X-Received: by 2002:aca:be57:: with SMTP id o84mr2349728oif.138.1579957750281; Sat, 25 Jan 2020 05:09:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579957750; cv=none; d=google.com; s=arc-20160816; b=CStSOE0oOfG0b0F6aCTeAg7QeOg03vPigqoCwKEAWNJggrGa2/iH/NS/uzX2HxsRiV azyS7xYFDeCwrOxnAbbBd4Kxp/MJwjf49DuswqxWB8Q+xVFr55Hj9TOz7doQ06qOFhFN xBPppX4v10cNEfkq/+WGc4fD3ghXclC2eCXpzJkuHnA+LZyXI5ehrRqCoQOGik8LCVHG qR5tQNCdxcTnOO2GG+EWzHrmXm5AIsQJazYv/mcfMIKym/qUA4HXQ8WIucKBLrnFpiVU T4UOgErrmGG95SikXNQWN4o9/A9gMB+jzSTeC0fAi8yPkkPzci/hV1sQLf/K7pCGIeqE 3XIA== 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=GNjyZSG5fOxbo930w/KRlLy8ueyu9dThjQbqLRSdvhJozxcnixar9ACOq9p/yv3L3T wjp6R80ZhidFOtPl9TcnzPrcqFg3eLcMc7pldJwGqkUXVUL88jj80WkR/dt5nZd2CuaU Ogl9VTtwHbEJ2tqFlak2MAwT9Vav8/802IiRPtUZDH7HKAuY7jzjFLugjjQ5+5gbBG+3 OMtIvDiRFlWmSwapxynJGMoyZCNn112rhfFcK5qYiSxGURWuYfJuRexvYYn612oeShTW zOVPtjr1cKOkR/YxjRnqWyXaO2V/qO7VY7P11u8N+7ob3/5x4PPHMUlvBPZ/j0z4vkrQ y+Ww== 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 m8si1141201oim.180.2020.01.25.05.08.58; Sat, 25 Jan 2020 05:09:10 -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 S1729538AbgAYNHC (ORCPT + 99 others); Sat, 25 Jan 2020 08:07:02 -0500 Received: from monster.unsafe.ru ([5.9.28.80]:41520 "EHLO mail.unsafe.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729353AbgAYNG4 (ORCPT ); Sat, 25 Jan 2020 08:06:56 -0500 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 0592AC61B47; Sat, 25 Jan 2020 13:06:51 +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 , Stephen Rothwell Subject: [PATCH v7 11/11] proc: Move hidepid values to uapi as they are user interface to mount Date: Sat, 25 Jan 2020 14:05:41 +0100 Message-Id: <20200125130541.450409-12-gladkov.alexey@gmail.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200125130541.450409-1-gladkov.alexey@gmail.com> References: <20200125130541.450409-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