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: <20150914153102.GE32551@linux>
Date:	Mon, 14 Sep 2015 21:01:02 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	linaro-kernel@...ts.linaro.org, gregkh@...uxfoundation.org,
	sboyd@...eaurora.org, Rafael Wysocki <rjw@...ysocki.net>,
	open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] debugfs: don't access 4 bytes for a boolean

On 14-09-15, 17:25, Arnd Bergmann wrote:
> I'd say that the argument to debugfs_create_bool() has to match the
> access in the functions you are modifying, as well as whatever
> gets passed into it by callers.
> 
> By accessing only the first byte, you break all drivers that
> call debugfs_create_bool() with a four-byte argument, at least
> on big-endian systems!
> 
> If we change any part of this, we need to audit the existing 31 callers
> of the function and change them all to use a bool type.

Right, so I have already sent a new version of this patch which should
be able to take care of stuff you pointed out.

> In the problem that you saw, what prevented gcc from printing a
> compile-time warning about debugfs_create_bool() being called with
> a bool argument?

A forced cast to u32 * :)

-- 
viresh
--
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