WSL2-Linux-Kernel/drivers/rtc
David Brownell a4b1d50e61 RTCs: handle NVRAM better
Several of the RTC drivers are exporting binary "nvram" files in sysfs.  Such
NVRAM (or on many systems, EEPROM) data is often initialized during system
manufacture to hold data about identity (serial numbers, Ethernet addresses,
etc), configuration, calibration, and so forth.

This patch improves integrity and security of those files:

  - Correctly initializes the size in one of the two cases where
    that was not yet being done.

  - Improves system security/integrity by making this state not
    be world-writable by default.

Letting arbitrary userspace code mangle such state by default is at least Not
A Good Thing; and it could sometimes be worse, depending on the particular
data that might be corrupted.  (I disregard the paranoiac "don't let anyone
read it either" approach.  Anyone storing passwords in such memory doesn't
really care about security.)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Torsten Ertbjerg Rasmussen <tr@newtec.dk>
Cc: Mark Zhan <rongkai.zhan@windriver.com>
Cc: Thomas Hommel <thomas.hommel@gefanuc.com>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14 18:45:36 -08:00
..
Kconfig rtc_hctosys expects RTCs in UTC (doc) 2007-11-14 18:45:36 -08:00
Makefile rtc: RTC class driver for the ds1374 2007-10-16 09:43:13 -07:00
class.c RTC: periodic irq fix 2007-10-16 09:43:13 -07:00
hctosys.c rtc_hctosys expects RTCs in UTC (doc) 2007-11-14 18:45:36 -08:00
interface.c rtc: fix readback from /sys/class/rtc/rtc?/wakealarm 2007-10-16 09:43:13 -07:00
rtc-at32ap700x.c Driver for the Atmel on-chip RTC on AT32AP700x devices 2007-07-17 10:23:09 -07:00
rtc-at91rm9200.c
rtc-bfin.c
rtc-cmos.c rtc: ignore msb when reading back mday from alarm 2007-11-04 13:13:09 -08:00
rtc-core.h
rtc-dev.c rtc: allow validated RTC_PIE_ON for non-root 2007-10-16 09:43:13 -07:00
rtc-ds1216.c RTC driver for DS1216 chips 2007-07-17 10:23:09 -07:00
rtc-ds1307.c rtc-ds1307: typo fix found by coverity 2007-07-26 11:35:16 -07:00
rtc-ds1374.c rtc: RTC class driver for the ds1374 2007-10-16 09:43:13 -07:00
rtc-ds1553.c RTCs: handle NVRAM better 2007-11-14 18:45:36 -08:00
rtc-ds1672.c
rtc-ds1742.c RTCs: handle NVRAM better 2007-11-14 18:45:36 -08:00
rtc-ep93xx.c
rtc-isl1208.c
rtc-lib.c
rtc-m41t80.c correct name for rtc-m41t80 2007-08-22 19:52:45 -07:00
rtc-m48t59.c RTCs: handle NVRAM better 2007-11-14 18:45:36 -08:00
rtc-m48t86.c
rtc-max6900.c rtc: update and use the MAX6900 century byte 2007-07-21 17:49:17 -07:00
rtc-max6902.c rtc-max6902 minor fixes 2007-08-22 19:52:47 -07:00
rtc-omap.c
rtc-pcf8563.c
rtc-pcf8583.c rtc-pcf8583: Check for i2c adapter functionality 2007-10-16 09:43:13 -07:00
rtc-pl031.c remove asm/bitops.h includes 2007-10-19 11:53:41 -07:00
rtc-proc.c
rtc-rs5c313.c
rtc-rs5c348.c [PATCH] rtc: Make rtc-rs5c348 driver hotplug-aware 2007-08-27 02:16:58 +01:00
rtc-rs5c372.c rtc-rs5c372 becomes a new-style i2c driver 2007-07-17 10:23:08 -07:00
rtc-s3c.c s3c-rtc: remove unused variable 2007-10-30 08:06:55 -07:00
rtc-sa1100.c remove asm/bitops.h includes 2007-10-19 11:53:41 -07:00
rtc-sh.c rtc: rtc-sh: Zero out tm value for invalid rtc states. 2007-11-07 20:13:24 +09:00
rtc-stk17ta8.c RTCs: handle NVRAM better 2007-11-14 18:45:36 -08:00
rtc-sysfs.c Add missing newlines to some uses of dev_<level> messages 2007-10-18 14:37:28 -07:00
rtc-test.c
rtc-v3020.c RTC v3020 fixes 2007-09-11 17:21:20 -07:00
rtc-vr41xx.c
rtc-x1205.c