All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Cc: viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH RESENT] coredump: fix cn_printf formatting warnings
Date: Thu, 16 Apr 2015 03:50:04 -0700	[thread overview]
Message-ID: <1429181404.2850.44.camel@perches.com> (raw)
In-Reply-To: <1429180099-5438-1-git-send-email-nicolas.iooss_linux@m4x.org>

(adding Andrew Morton to cc's)

On Thu, 2015-04-16 at 18:28 +0800, Nicolas Iooss wrote:
> Add __printf attributes to cn_*printf functions.

[]

> I sent this patch more than a month ago but go no feedback, so I'm sending it again.
> Comments would be greatly appreciated.

Seems sensible, but trivially, the uid/gid output
should use %u as uid_t/__kernel_uid32_t and
gid_t/__kernel_gid32_t are unsigned int

Also, this would probably be better as 2 patches.

One for the __printf and mismatches fixes,
Another for the _munged use.

> diff --git a/fs/coredump.c b/fs/coredump.c
[]
> @@ -209,11 +211,15 @@ static int format_corename(struct core_name *cn, struct coredump_params *cprm)
>  				break;
>  			/* uid */
>  			case 'u':
> -				err = cn_printf(cn, "%d", cred->uid);
> +				err = cn_printf(cn, "%d",
> +						from_kuid_munged(cred->user_ns,
> +								 cred->uid));
>  				break;
>  			/* gid */
>  			case 'g':
> -				err = cn_printf(cn, "%d", cred->gid);
> +				err = cn_printf(cn, "%d",
> +						from_kgid_munged(cred->user_ns,
> +								 cred->gid));
>  				break;
>  			case 'd':
>  				err = cn_printf(cn, "%d",




  reply	other threads:[~2015-04-16 10:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-16 10:28 [PATCH RESENT] coredump: fix cn_printf formatting warnings Nicolas Iooss
2015-04-16 10:50 ` Joe Perches [this message]
2015-05-03 10:34   ` [PATCH 1/2] coredump: use from_kuid/kgid_munged when formatting corename Nicolas Iooss
2015-05-03 10:34     ` [PATCH 2/2] coredump: add __printf attribute to cn_*printf functions Nicolas Iooss
     [not found]     ` <1430649246-32726-1-git-send-email-nicolas.iooss_linux-oWGTIYur0i8@public.gmane.org>
2015-05-05 19:13       ` [PATCH 1/2] coredump: use from_kuid/kgid_munged when formatting corename Eric W. Biederman
2015-05-05 19:13         ` Eric W. Biederman
     [not found]         ` <87bnhyhm7f.fsf-JOvCrm2gF+uungPnsOpG7nhyD016LWXt@public.gmane.org>
2015-05-06 12:18           ` Nicolas Iooss
2015-05-06 12:18             ` Nicolas Iooss
     [not found]             ` <554A0684.2000400-oWGTIYur0i8@public.gmane.org>
2015-05-15  2:29               ` [PATCH v2 1/2] coredump: use from_kuid/kgid " Nicolas Iooss
2015-05-15  2:29             ` Nicolas Iooss
2015-05-15  2:29               ` [PATCH v2 2/2] coredump: add __printf attribute to cn_*printf functions Nicolas Iooss
     [not found]                 ` <1431656975-3563-2-git-send-email-nicolas.iooss_linux-oWGTIYur0i8@public.gmane.org>
2015-05-15 14:54                   ` Eric W. Biederman
2015-05-15 14:54                 ` Eric W. Biederman
     [not found]               ` <1431656975-3563-1-git-send-email-nicolas.iooss_linux-oWGTIYur0i8@public.gmane.org>
2015-05-15  2:29                 ` Nicolas Iooss
2015-05-15 14:52                 ` [PATCH v2 1/2] coredump: use from_kuid/kgid when formatting corename Eric W. Biederman
2015-05-15 14:52                   ` Eric W. Biederman

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=1429181404.2850.44.camel@perches.com \
    --to=joe@perches.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolas.iooss_linux@m4x.org \
    --cc=viro@zeniv.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.