From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933646AbbDPKu2 (ORCPT ); Thu, 16 Apr 2015 06:50:28 -0400 Received: from smtprelay0014.hostedemail.com ([216.40.44.14]:46577 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933612AbbDPKuJ (ORCPT ); Thu, 16 Apr 2015 06:50:09 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::,RULES_HIT:41:355:379:541:599:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3865:3867:3868:3872:4321:5007:6261:10004:10400:10848:11026:11232:11658:11914:12043:12050:12296:12517:12519:12663:12740:13019:13069:13311:13357:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: pail23_3b4ea5f4dbd03 X-Filterd-Recvd-Size: 2082 Message-ID: <1429181404.2850.44.camel@perches.com> Subject: Re: [PATCH RESENT] coredump: fix cn_printf formatting warnings From: Joe Perches To: Nicolas Iooss Cc: viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Andrew Morton Date: Thu, 16 Apr 2015 03:50:04 -0700 In-Reply-To: <1429180099-5438-1-git-send-email-nicolas.iooss_linux@m4x.org> References: <1429180099-5438-1-git-send-email-nicolas.iooss_linux@m4x.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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",