From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751638AbdAPNXu (ORCPT ); Mon, 16 Jan 2017 08:23:50 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:36248 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751584AbdAPNXp (ORCPT ); Mon, 16 Jan 2017 08:23:45 -0500 From: Djalal Harouni X-Google-Original-From: Djalal Harouni To: linux-kernel@vger.kernel.org, kernel-hardening@lists.openwall.com Cc: Andrew Morton , Kees Cook , Lafcadio Wluiki , Djalal Harouni Subject: [PATCH v4 0/2] procfs/tasks: introduce per-task procfs hidepid= field Date: Mon, 16 Jan 2017 14:23:02 +0100 Message-Id: <1484572984-13388-1-git-send-email-djalal@gmail.com> X-Mailer: git-send-email 2.5.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Djalal Harouni Hi, I'm sending this series again based on Lafcadio's previous patches. I have also fixed some issues and tested the code. This adds a new per-task hidepid= flag that is honored by procfs when presenting /proc to the user, in addition to the existing hidepid= mount option. One suggested change to add 'ns_capable(CAP_SYS_ADMIN)||no_new_privs' test before setting the hidepid was not included in this series, however I can add it. This change was not incorporated since it may be good for some setuid or even file capabilities programs to not access /proc, yes this may influence setuid programs but I am not sure if this is really a problem in this case. As stated I can add it if requested. Thanks! v4 changes: Patch 0001 procfs: use an enum for possible hidepid values * Was already acked and proposed to be added to -mm branch. Patch 0002 procfs/tasks: add a simple per-task procfs hidepid= field * Document HidePid in Documentation/filesystem/proc.txt * Switch to max() as suggested by Kees Cook. * Fix compiler warnings * Check all prctl() arguments and fail if unused ones are set. * Make PR_GET_HIDEPID return the task hidpid value as a result of prctl() syscall.