From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Perches Subject: Re: [PATCH RESENT] coredump: fix cn_printf formatting warnings Date: Thu, 16 Apr 2015 03:50:04 -0700 Message-ID: <1429181404.2850.44.camel@perches.com> References: <1429180099-5438-1-git-send-email-nicolas.iooss_linux@m4x.org> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Cc: viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Andrew Morton To: Nicolas Iooss Return-path: In-Reply-To: <1429180099-5438-1-git-send-email-nicolas.iooss_linux@m4x.org> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.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",