Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753608AbbBJS54 (ORCPT ); Tue, 10 Feb 2015 13:57:56 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40599 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753297AbbBJS5y (ORCPT ); Tue, 10 Feb 2015 13:57:54 -0500 Date: Tue, 10 Feb 2015 12:57:49 -0600 From: Josh Poimboeuf To: Jiri Slaby Cc: Seth Jennings , Jiri Kosina , Vojtech Pavlik , Masami Hiramatsu , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 7/9] proc: add /proc//universe to show livepatch status Message-ID: <20150210185749.GK21643@treble.redhat.com> References: <54DA5230.8020800@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <54DA5230.8020800@suse.cz> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1759 Lines: 50 On Tue, Feb 10, 2015 at 07:47:12PM +0100, Jiri Slaby wrote: > On 02/09/2015, 06:31 PM, Josh Poimboeuf wrote: > > Expose the per-task klp_universe value so users can determine which > > tasks are holding up completion of a patching operation. > > > > Signed-off-by: Josh Poimboeuf > > --- > > fs/proc/base.c | 11 +++++++++++ > > 1 file changed, 11 insertions(+) > > > > diff --git a/fs/proc/base.c b/fs/proc/base.c > > index 3f3d7ae..b9fe6b5 100644 > > --- a/fs/proc/base.c > > +++ b/fs/proc/base.c > > @@ -2528,6 +2528,14 @@ static int proc_pid_personality(struct seq_file *m, struct pid_namespace *ns, > > return err; > > } > > > > +#ifdef CONFIG_LIVEPATCH > > +static int proc_pid_klp_universe(struct seq_file *m, struct pid_namespace *ns, > > + struct pid *pid, struct task_struct *task) > > +{ > > + return seq_printf(m, "%d\n", task->klp_universe); > > +} > > +#endif /* CONFIG_LIVEPATCH */ > > + > > /* > > * Thread groups > > */ > > @@ -2628,6 +2636,9 @@ static const struct pid_entry tgid_base_stuff[] = { > > #ifdef CONFIG_CHECKPOINT_RESTORE > > REG("timers", S_IRUGO, proc_timers_operations), > > #endif > > +#ifdef CONFIG_LIVEPATCH > > + ONE("universe", S_IRUGO, proc_pid_klp_universe), > > I am not sure if this can be UGO or if it should be USR only instead. > Leaving for discussion, but I incline to use USR to avoid *any* info > leakage. That's fine. I can't think of any reason why a non-root user would need to know the task's universe. -- Josh -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/