lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 6 Nov 2014 13:59:22 -0800 (PST)
From:	David Rientjes <rientjes@...gle.com>
To:	Andrey Ryabinin <a.ryabinin@...sung.com>
cc:	akpm@...ux-foundation.org, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, Christoph Lameter <cl@...ux.com>,
	Pekka Enberg <penberg@...nel.org>,
	Joonsoo Kim <iamjoonsoo.kim@....com>
Subject: Re: [PATCH v2] mm: slub: fix format mismatches in slab_err()
 callers

On Thu, 6 Nov 2014, Andrey Ryabinin wrote:

> Adding __printf(3, 4) to slab_err exposed following:
> 
> mm/slub.c: In function ‘check_slab’:
> mm/slub.c:852:4: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 4 has type ‘const char *’ [-Wformat=]
>     s->name, page->objects, maxobj);
>     ^
> mm/slub.c:852:4: warning: too many arguments for format [-Wformat-extra-args]
> mm/slub.c:857:4: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 4 has type ‘const char *’ [-Wformat=]
>     s->name, page->inuse, page->objects);
>     ^
> mm/slub.c:857:4: warning: too many arguments for format [-Wformat-extra-args]
> 
> mm/slub.c: In function ‘on_freelist’:
> mm/slub.c:905:4: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘long unsigned int’ [-Wformat=]
>     "should be %d", page->objects, max_objects);
> 
> Fix first two warnings by removing redundant s->name.
> Fix the last by changing type of max_object from unsigned long to int.
> 
> Signed-off-by: Andrey Ryabinin <a.ryabinin@...sung.com>
> Cc: Christoph Lameter <cl@...ux.com>
> Cc: Pekka Enberg <penberg@...nel.org>
> Cc: David Rientjes <rientjes@...gle.com>
> Cc: Joonsoo Kim <iamjoonsoo.kim@....com>

Acked-by: David Rientjes <rientjes@...gle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ