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]
Message-ID: <20120723111757.GC4352@mwanda>
Date:	Mon, 23 Jul 2012 14:17:57 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	wei_wang@...lsil.com.cn
Cc:	gregkh@...uxfoundation.org, devel@...uxdriverproject.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] drivers/misc: Add realtek card reader core driver

On Mon, Jul 23, 2012 at 05:42:38PM +0800, wei_wang@...lsil.com.cn wrote:
> +
> +#define wait_timeout_x(task_state, msecs)			\
> +do {								\
> +	set_current_state((task_state));			\
> +	schedule_timeout(msecs_to_jiffies(msecs));		\
> +} while (0)
> +
> +#define wait_timeout(msecs)	wait_timeout_x(TASK_INTERRUPTIBLE, (msecs))
> +
> +#define GET_BE32(ptr)	(((u32)((ptr)[0]) << 24) | ((u32)((ptr)[1]) << 16) | \
> +				((u32)((ptr)[2]) << 8) | (ptr)[3])
> +

This will break on big endian systems.  Use be32_to_cpu().

Use Sparse to check your work:
http://lwn.net/Articles/205624/

regards,
dan carpenter
--
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