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]
Message-Id: <20090104.224239.64637126.davem@davemloft.net>
Date:	Sun, 04 Jan 2009 22:42:39 -0800 (PST)
From:	David Miller <davem@...emloft.net>
To:	roel.kluin@...il.com
Cc:	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: fix SONIC_READ definition

From: Roel Kluin <roel.kluin@...il.com>
Date: Sat, 03 Jan 2009 19:43:24 +0100

> drivers/net/jazzsonic.c:56:
> #define SONIC_READ(reg) (*((volatile unsigned int *)dev->base_addr+reg))
> 
> drivers/net/sonic.h:53:
> #define SONIC_CAP0             0x24
> 
> so drivers/net/jazzsonic.c:143:
> val = SONIC_READ(SONIC_CAP0-i);
> 
> becomes
> 
> val = (*((volatile unsigned int *)dev->base_addr+0x24-i));
> 
> That is wrong, isn't it?

The expression, both with and without the parentheses around "reg",
evaluate to the same final pointer value.

Compile a test program and look at the assembler output if you
don't believe me :-)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ