[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1296087309.2448.33.camel@Joe-Laptop>
Date: Wed, 26 Jan 2011 16:15:09 -0800
From: Joe Perches <joe@...ches.com>
To: Kees Cook <kees.cook@...onical.com>
Cc: linux-kernel@...r.kernel.org,
Rusty Russell <rusty@...tcorp.com.au>,
Tejun Heo <tj@...nel.org>, Marcus Meissner <meissner@...e.de>,
Jason Wessel <jason.wessel@...driver.com>,
Eugene Teo <eugeneteo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Bjorn Helgaas <bjorn.helgaas@...com>,
Len Brown <len.brown@...el.com>,
Changli Gao <xiaosuo@...il.com>,
Dan Rosenberg <drosenberg@...curity.com>
Subject: Re: [PATCH] use %pK for /proc/kallsyms and /proc/modules
On Tue, 2011-01-25 at 10:10 -0800, Kees Cook wrote:
> Note that when compiling with -Wformat, these harmless warnings will
> be emitted, and can be ignored:
> warning: '0' flag used with ā%pā gnu_printf format
> diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c
[]
> @@ -477,11 +477,11 @@ static int s_show(struct seq_file *m, void *p)
> */
> type = iter->exported ? toupper(iter->type) :
> tolower(iter->type);
> - seq_printf(m, "%0*lx %c %s\t[%s]\n",
> + seq_printf(m, "%0*pK %c %s\t[%s]\n",
> (int)(2 * sizeof(void *)),
> iter->value, type, iter->name, iter->module_name);
You can change this to
seq_printf(m, "%pK %c %s\t[%s]\n",
iter->value, type, iter->name, iter->module_name);
as that's the normal size.
Presto. No warnings. Same output.
> } else
> - seq_printf(m, "%0*lx %c %s\n",
> + seq_printf(m, "%0*pK %c %s\n",
> (int)(2 * sizeof(void *)),
Here too.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists