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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 20 Dec 2013 08:47:05 -0800
From:	Greg KH <gregkh@...uxfoundation.org>
To:	Frank Haverkamp <haver@...ux.vnet.ibm.com>
Cc:	fengguang.wu@...el.com, jim.epost@...il.com, sfr@...b.auug.org.au,
	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	kbuild-all@...org
Subject: Re: [PATCH 1/2] GenWQE: Fix endian issues detected by sparse

On Fri, Dec 20, 2013 at 04:26:10PM +0100, Frank Haverkamp wrote:
> Fengguang Wu used CF=-D__CHECK_ENDIAN__ to check the GenWQE driver for
> endian issues. Sparse found a couple of those. Most of them were caused
> by not correctly handling __be64/32 and __u64/32. Those I was able to
> fix with appropriate castings.
> 
> One more serious issue was the ATS entry in struct genwqe_ddcb_cmd.
> The kernel expected it in big-endian, but the type was defined __u64.
> I decided that it is better to keep the interface consistent using
> host endian byte-odering instead of having a mixture. With this change
> the kernel likes to see host endian byte order for the ATS entry. That
> would have been an interface change, if someone would have used the
> driver already. Since this is not the case, I hope it is ok to fix it
> now.
> 
> For the genqwe_readq/writeq/readl/writel functions I enforced the casts.
> 
> It still complains, as far as I can see, about some copy_to/from_user()
> usages:
> 
>   CHECK   char-misc/drivers/misc/genwqe/card_dev.c
> char-misc/arch/x86/include/asm/uaccess.h:625:18: warning: incorrect type in argument 1 (different modifiers)
> char-misc/arch/x86/include/asm/uaccess.h:625:18:    expected void *<noident>
> char-misc/arch/x86/include/asm/uaccess.h:625:18:    got void const *from
> char-misc/arch/x86/include/asm/uaccess.h:625:18: warning: incorrect type in argument 1 (different modifiers)
> char-misc/arch/x86/include/asm/uaccess.h:625:18:    expected void *<noident>
> char-misc/arch/x86/include/asm/uaccess.h:625:18:    got void const *from
> char-misc/arch/x86/include/asm/uaccess.h:625:18: warning: incorrect type in argument 1 (different modifiers)
> char-misc/arch/x86/include/asm/uaccess.h:625:18:    expected void *<noident>
> char-misc/arch/x86/include/asm/uaccess.h:625:18:    got void const *from
> char-misc/arch/x86/include/asm/uaccess.h:625:18: warning: incorrect type in argument 1 (different modifiers)
> char-misc/arch/x86/include/asm/uaccess.h:625:18:    expected void *<noident>
> char-misc/arch/x86/include/asm/uaccess.h:625:18:    got void const *from
>   CC [M]  drivers/misc/genwqe/card_dev.o
>   CHECK   char-misc/drivers/misc/genwqe/card_ddcb.c
> char-misc/arch/x86/include/asm/uaccess.h:625:18: warning: incorrect type in argument 1 (different modifiers)
> char-misc/arch/x86/include/asm/uaccess.h:625:18:    expected void *<noident>
> char-misc/arch/x86/include/asm/uaccess.h:625:18:    got void const *from
> char-misc/arch/x86/include/asm/uaccess.h:625:18: warning: incorrect type in argument 1 (different modifiers)
> char-misc/arch/x86/include/asm/uaccess.h:625:18:    expected void *<noident>
> char-misc/arch/x86/include/asm/uaccess.h:625:18:    got void const *from
>   CC [M]  drivers/misc/genwqe/card_ddcb.o
>   LD [M]  drivers/misc/genwqe/genwqe_card.o
> 
> I appreciate some help from you to figure out what is causig those, and
> making a proposal how to fix them.
> 
> I included the missing header file to fix the
> implicit-function-declaration warning when using dynamic_hex_dump.
> 
> Signed-off-by: Frank Haverkamp <haver@...ux.vnet.ibm.com>

In the future (I missed this as well), please use a "Reported-by:" tag
to document who reported the problem to you.

thanks,

greg k-h
--
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