From: Rui Xiang <leo.ruixiang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: "Serge E. Hallyn" <serge-A9i7LUbDfNHQT0dZR+AlfA@public.gmane.org>
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
"Eric W. Biederman"
<ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH RFC 3/5] printk: modify printk interface for syslog_namespace
Date: Wed, 21 Nov 2012 17:41:58 +0800 [thread overview]
Message-ID: <50ACA1E6.2040404@gmail.com> (raw)
In-Reply-To: <20121119142926.GB4453-7LNsyQBKDXoIagZqoN9o3w@public.gmane.org>
From: Libo Chen <clbchenlibo.chen-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
On 2012-11-19 22:29, Serge E. Hallyn wrote:> Quoting Rui Xiang (leo.ruixiang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org):
>> From: Libo Chen <clbchenlibo.chen-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
>>
>> We re-implement printk by additional syslog_ns.
>>
>> The function include printk, /dev/kmsg, do_syslog and kmsg_dump should be modifyed
>> for syslog_ns. Previous identifier *** such as log_first_seq should be replaced
>> by syslog_ns->***.
>>
>> Signed-off-by: Libo Chen <clbchenlibo.chen-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
>> Signed-off-by: Xiang Rui <rui.xiang-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
>> ---
.......
>> lockdep_on();
>> @@ -1624,7 +1618,8 @@ EXPORT_SYMBOL(vprintk_emit);
>>
>> asmlinkage int vprintk(const char *fmt, va_list args)
>> {
>> - return vprintk_emit(0, -1, NULL, 0, fmt, args);
>> + return vprintk_emit(0, -1, NULL, 0, fmt, args,
>> + current_syslog_ns());
>> }
>> EXPORT_SYMBOL(vprintk);
>>
>> @@ -1636,7 +1631,8 @@ asmlinkage int printk_emit(int facility, int level,
>> int r;
>>
>> va_start(args, fmt);
>> - r = vprintk_emit(facility, level, dict, dictlen, fmt, args);
>> + r = vprintk_emit(facility, level, dict, dictlen, fmt, args,
>> + current_syslog_ns());
>> va_end(args);
>>
>> return r;
>> @@ -1678,7 +1674,7 @@ asmlinkage int printk(const char *fmt, ...)
>> }
>> #endif
>> va_start(args, fmt);
>> - r = vprintk_emit(0, -1, NULL, 0, fmt, args);
>> + r = vprintk_emit(0, -1, NULL, 0, fmt, args, current_syslog_ns());
>
> Current is meaningless here. The default should be using init_syslog_ns.
Thank for your attention.
I understand what you mean.
printk -> init_syslog_log
nsprintk(ns) -> container syslog
I think it makes sense.
thanks
Libo Chen
next prev parent reply other threads:[~2012-11-21 9:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-19 8:16 [PATCH RFC 3/5] printk: modify printk interface for syslog_namespace Rui Xiang
2012-11-19 14:29 ` Serge E. Hallyn
2012-11-19 14:53 ` Joe Perches
[not found] ` <20121119142926.GB4453-7LNsyQBKDXoIagZqoN9o3w@public.gmane.org>
2012-11-21 9:41 ` Rui Xiang [this message]
[not found] ` <50A9EAF0.4000902-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-11-21 17:49 ` Serge E. Hallyn
-- strict thread matches above, loose matches on Subject: below --
2012-11-24 11:22 Libo Chen
[not found] ` <50B0ADDB.4000303-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-11-25 4:28 ` Serge E. Hallyn
[not found] ` <20121125042802.GB4523-7LNsyQBKDXoIagZqoN9o3w@public.gmane.org>
2012-11-27 13:25 ` Libo Chen
[not found] ` <50B4BF64.6010707-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-11-27 13:58 ` Serge Hallyn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50ACA1E6.2040404@gmail.com \
--to=leo.ruixiang-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=serge-A9i7LUbDfNHQT0dZR+AlfA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).