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:	Sun, 23 Sep 2007 11:14:30 +0800
From:	WANG Cong <xiyou.wangcong@...il.com>
To:	Gerhard Mack <gmack@...erfire.net>
Cc:	WANG Cong <xiyou.wangcong@...il.com>,
	Dave Haywood <tla@....selfip.net>, linux-kernel@...r.kernel.org
Subject: Re: linux 2.6.23-rc7 - 14 compile warnings

On Sat, Sep 22, 2007 at 10:23:59PM -0400, Gerhard Mack wrote:
>On Sat, 22 Sep 2007, WANG Cong wrote:
>
>> >Summary:
>> >  CC      mm/slub.o
>> >mm/slub.c: In function 'kfree':
>> >mm/slub.c:2491: warning: passing argument 3 of 'slab_free' discards
>> >qualifiers from pointer target type
>
>static void __slab_free(struct kmem_cache *s, struct page *page,
>                                        void *x, void *addr)
>but ..
>
>void kfree(const void *x)
>
>void is not the same as const void.
>					
>> >  CC      fs/autofs4/symlink.o
>> >fs/autofs4/symlink.c: In function 'autofs4_follow_link':
>> >fs/autofs4/symlink.c:18: warning: passing argument 2 of 'nd_set_link'
>> >discards qualifiers from pointer target type
>
>Once again ino->u.symlink is a const char and it's dropping the const.
>

slab_free(s, page, (void *)x, __builtin_return_address(0));
                   ^^^^^^^^^
I knew these things. But the explicit casts, such as the above one, mean
that we are intended to discard to qualifiers and I think gcc shouldn't
warn about this.

Regards.


WANG Cong

-
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ