hpwdt: clean up set_memory_x call for 32 bit

From: Maxim Uvarov
Date: Sun Jan 15 2012 - 23:06:34 EST


Hello,

Please find clean up patch for hpwdt.

There were 2 patches for the issue. Both do the same
but in different ways:

commit 0305d4e376508720be61a6500ded9b9390c9a136
Author: Maxim Uvarov <maxim.uvarov@xxxxxxxxxx>
Date: Thu Dec 22 16:03:34 2011 +1100

drivers/watchdog/hpwdt.c: mark page executable

commit e67d668e147c3b4fec638c9e0ace04319f5ceccd
Author: Mingarelli, Thomas <Thomas.Mingarelli@xxxxxx>
Date: Mon Nov 7 10:59:00 2011 +0100

watchdog: hpwdt: Changes to handle NX secure bit in 32bit path

We decided to drop my patch(0305d4e37) and add author's (e67d668e1).
Both patches do the same things. But we missed that e67d668e1 calls
set_memory_x with wrong parameters. Right parameters are address aligned to
page and number of pages. Not address and size. First parameter with be auto-aligned
and set_memory_x() print WARN, but second parameter is serious error.

We need to think how to avoid changing NX for not our pages in future and add additional
warning or call panic() in set_memory_x(). Maybe try to read the latest byte or all bytes
for that memory.

Best regards,
Maxim Uvarov.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/