Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1368113
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Jiri Slaby <jslaby@suse.cz> |
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH v1.9 13/14] livepatch: add /proc/<pid>/patch_status |
| Date | Thu, 31 Mar 2016 11:50:01 +0200 |
| Message-ID | <riHoJ-2Z1-1@gated-at.bofh.it> (permalink) |
| References | <rgFKp-6zA-3@gated-at.bofh.it> <rgFKr-6zA-61@gated-at.bofh.it> <riHf5-2VE-33@gated-at.bofh.it> |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=h6wivquFQ22R7QApW+L7L5hLS6L5X0IgtOE7ooZK2oI=; b=eVscK/uYQEMA/RAV6d7rFvsNnMTqtBBXiSs3XwQZhA6ypmsK8X8/gUnLI2M3OyQi+0 0TZ9kGtIZlWMrhN0ZJpJxkohVVQa+2UkzVTvN5Cyyoav9c0EWXeFbAlurjyVWXMS7aIM 7XlLla0uXxRuvS+LZGrJSdvgjk6KCnLS1edn4RxyquisDdWfwU8/ZYX9626Pc+M3d57w aJx6GlZ/dHXpGgsJJHzKZkgLWVvZU+oqTwo+wzwXXAQHmkSibfdVSlUtzoYZiXh2aJWI z6d/WTFwA+gOsweRr+Vkm0fFAwEONDh9OP23ndkAPb7scubWRfs0v611duwWKnfNc76B VSqw== |
| X-Gm-Message-State | AD7BkJK/UXclrkHahBx753C0cMiBykcc+x964E+emsjeAS1w2Mo/+9T+o2QvQl7aHn1EdQ== |
| X-Received | by 10.28.52.197 with SMTP id b188mr29597729wma.77.1459417211289; Thu, 31 Mar 2016 02:40:11 -0700 (PDT) |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=iso-8859-2 |
| Content-Transfer-Encoding | 7bit |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 50 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, Vojtech Pavlik <vojtech@suse.com> |
| X-Original-Date | Thu, 31 Mar 2016 11:40:09 +0200 |
| X-Original-Message-ID | <56FCF079.8070708@suse.cz> |
| X-Original-References | <cover.1458933243.git.jpoimboe@redhat.com> <9de6283945f99958dfd7fac0f24fcce98d5410a6.1458933243.git.jpoimboe@redhat.com> <56FCEEFA.3030309@suse.cz> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1368113 |
Show key headers only | View raw
On 03/31/2016, 11:33 AM, Jiri Slaby wrote:
> On 03/25/2016, 08:35 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.
>>
>> Call it "patch_status" rather than "universe": it's at least more
>> descriptive for the average user.
>>
>> Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
>> ---
>> fs/proc/base.c | 12 ++++++++++++
>> 1 file changed, 12 insertions(+)
>>
>> diff --git a/fs/proc/base.c b/fs/proc/base.c
>> index b1755b2..f90998b 100644
>> --- a/fs/proc/base.c
>> +++ b/fs/proc/base.c
>> @@ -2801,6 +2801,15 @@ static int proc_pid_personality(struct seq_file *m, struct pid_namespace *ns,
>> return err;
>> }
>>
>> +#ifdef CONFIG_LIVEPATCH
>> +static int proc_pid_patch_status(struct seq_file *m, struct pid_namespace *ns,
>> + struct pid *pid, struct task_struct *task)
>> +{
>> + seq_printf(m, "%d\n", task->klp_universe);
>> + return 0;
>> +}
>> +#endif /* CONFIG_LIVEPATCH */
>> +
>> /*
>> * Thread groups
>> */
>> @@ -2900,6 +2909,9 @@ static const struct pid_entry tgid_base_stuff[] = {
>> REG("timers", S_IRUGO, proc_timers_operations),
>> #endif
>> REG("timerslack_ns", S_IRUGO|S_IWUGO, proc_pid_set_timerslack_ns_operations),
>> +#ifdef CONFIG_LIVEPATCH
>> + ONE("patch_status", S_IRUSR, proc_pid_patch_status),
>> +#endif
>
> I think we want to know the state about all tasks, not only group
> leaders. This should go to tid_base_stuff.
Or loop over all tasks here by for_each_thread(task, t) and check them all.
> thanks,
--
js
suse labs
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC PATCH v1.9 00/14] livepatch: hybrid consistency model Josh Poimboeuf <jpoimboe@redhat.com> - 2016-03-25 20:40 +0100
[RFC PATCH v1.9 03/14] x86/asm/head: standardize the bottom of the stack for idle tasks Josh Poimboeuf <jpoimboe@redhat.com> - 2016-03-25 20:40 +0100
[RFC PATCH v1.9 09/14] livepatch: remove unnecessary object loaded check Josh Poimboeuf <jpoimboe@redhat.com> - 2016-03-25 20:40 +0100
[RFC PATCH v1.9 11/14] livepatch: store function sizes Josh Poimboeuf <jpoimboe@redhat.com> - 2016-03-25 20:40 +0100
[RFC PATCH v1.9 13/14] livepatch: add /proc/<pid>/patch_status Josh Poimboeuf <jpoimboe@redhat.com> - 2016-03-25 20:40 +0100
Re: [RFC PATCH v1.9 13/14] livepatch: add /proc/<pid>/patch_status Jiri Slaby <jslaby@suse.cz> - 2016-03-31 11:40 +0200
Re: [RFC PATCH v1.9 13/14] livepatch: add /proc/<pid>/patch_status Jiri Slaby <jslaby@suse.cz> - 2016-03-31 11:50 +0200
[RFC PATCH v1.9 02/14] x86/asm/head: use a common function for starting CPUs Josh Poimboeuf <jpoimboe@redhat.com> - 2016-03-25 20:40 +0100
[RFC PATCH v1.9 07/14] x86/stacktrace: add function for detecting reliable stack traces Josh Poimboeuf <jpoimboe@redhat.com> - 2016-03-25 20:40 +0100
Re: [RFC PATCH v1.9 07/14] x86/stacktrace: add function for detecting reliable stack traces Miroslav Benes <mbenes@suse.cz> - 2016-03-31 15:10 +0200
[RFC PATCH v1.9 12/14] livepatch: create per-task consistency model Josh Poimboeuf <jpoimboe@redhat.com> - 2016-03-25 20:40 +0100
Re: [RFC PATCH v1.9 12/14] livepatch: create per-task consistency model Miroslav Benes <mbenes@suse.cz> - 2016-03-31 15:20 +0200
[RFC PATCH v1.9 08/14] livepatch: separate enabled and patched states Josh Poimboeuf <jpoimboe@redhat.com> - 2016-03-25 20:40 +0100
[RFC PATCH v1.9 04/14] x86: move _stext marker before head code Josh Poimboeuf <jpoimboe@redhat.com> - 2016-03-25 20:40 +0100
Re: [RFC PATCH v1.9 00/14] livepatch: hybrid consistency model Miroslav Benes <mbenes@suse.cz> - 2016-03-31 15:00 +0200
Re: [RFC PATCH v1.9 00/14] livepatch: hybrid consistency model Petr Mladek <pmladek@suse.com> - 2016-04-01 15:40 +0200
Re: [RFC PATCH v1.9 00/14] livepatch: hybrid consistency model Petr Mladek <pmladek@suse.com> - 2016-04-01 17:40 +0200
Re: [RFC PATCH v1.9 00/14] livepatch: hybrid consistency model Miroslav Benes <mbenes@suse.cz> - 2016-04-01 15:40 +0200
csiph-web