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] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 9 May 2015 18:24:04 +0200
From:	Greg KH <gregkh@...uxfoundation.org>
To:	Peter Senna Tschudin <peter.senna@...il.com>
Cc:	alan@...ux.intel.com, dan.carpenter@...cle.com,
	geert@...ux-m68k.org, devel@...verdev.osuosl.org,
	jun.j.tian@...el.com, linux-kernel@...r.kernel.org,
	schwab@...ux-m68k.org, garret.kelly@...il.com,
	octavian.purdila@...el.com, nnk@...gle.com
Subject: Re: [PATCH V5] staging: goldfish: Fix pointer cast for 32 bits

On Mon, May 04, 2015 at 03:11:18PM +0200, Peter Senna Tschudin wrote:
> As the first argument of gf_write64() was of type unsigned long, and as
> some calls to gf_write64() were casting the first argument from void *
> to u64 the compiler and/or sparse were printing warnings for casts of
> wrong sizes when compiling for i386.
> 
> This patch changes the type of the first argument of gf_write64() to
> void *, and update calls to the function. This change fixed the
> warnings and allowed to remove casts from 6 calls to gf_write64().
> 
> In addition gf_write64() was renamed to gf_write_ptr() as the name was
> misleading because it only writes 32 bits on 32 bit systems.
> 
> gf_write_dma_addr() was added to handle dma_addr_t values which is
> used at drivers/staging/goldfish/goldfish_audio.c.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
> Signed-off-by: Peter Senna Tschudin <peter.senna@...il.com>
> ---
> Tested by compilation only for x86 and for x86_64.

This adds two build warnings:

drivers/tty/goldfish.c: In function ‘goldfish_tty_do_write’:
drivers/tty/goldfish.c:62:15: warning: passing argument 1 of ‘gf_write_ptr’ discards ‘const’ qualifier from pointer target type
  gf_write_ptr(buf, base + GOLDFISH_TTY_DATA_PTR,
               ^
In file included from drivers/tty/goldfish.c:24:0:
include/linux/goldfish.h:6:20: note: expected ‘void *’ but argument is of type ‘const char *’
 static inline void gf_write_ptr(void *ptr, void __iomem *portl,
                    ^

So I can't take this.  Please fix up and resend, and always test build your
patches...

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