[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151007163659.GB4557@linux>
Date: Wed, 7 Oct 2015 22:06:59 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Russell King - ARM Linux <linux@....linux.org.uk>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Nishanth Menon <nm@...com>, Len Brown <len.brown@...el.com>,
Arnd Bergmann <arnd@...db.de>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
"Rafael J. Wysocki" <rjw@...ysocki.net>, linux-pm@...r.kernel.org,
Stephen Boyd <sboyd@...eaurora.org>,
linux-kernel@...r.kernel.org, Pavel Machek <pavel@....cz>,
Dmitry Torokhov <dtor@...omium.org>,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] PM / OPP: fix debugfs files for 64-bit
On 07-10-15, 17:33, Russell King - ARM Linux wrote:
> Don't you even think about doing that - that's totally broken no matter
> what, and this is a good example of why casts are Bad.
>
> debugfs_create_u64() will create a debugfs object that will want to
> access a 64-bit value, but the value pointed to is only 32-bit. The
> net result is that the debugfs file ends up reading or writing the
> neigbouring 32-bits, which may potentially be unaligned.
Yeah, that's what I was also saying. Its broken.
> The variable pointed to for debugfs_create_u64() must be a 64-bit
> value. No casts allowed.
>
> An alternative would be to have debugfs_create_ulong()
And that's what I suggested.
--
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