android_kernel_motorola_sm6225/Documentation/ABI/testing
Mimi Zohar 66dbc325af evm: re-release
EVM protects a file's security extended attributes(xattrs) against integrity
attacks.  This patchset provides the framework and an initial method.  The
initial method maintains an HMAC-sha1 value across the security extended
attributes, storing the HMAC value as the extended attribute 'security.evm'.
Other methods of validating the integrity of a file's metadata will be posted
separately (eg. EVM-digital-signatures).

While this patchset does authenticate the security xattrs, and
cryptographically binds them to the inode, coming extensions will bind other
directory and inode metadata for more complete protection.  To help simplify
the review and upstreaming process, each extension will be posted separately
(eg. IMA-appraisal, IMA-appraisal-directory).  For a general overview of the
proposed Linux integrity subsystem, refer to Dave Safford's whitepaper:
http://downloads.sf.net/project/linux-ima/linux-ima/Integrity_overview.pdf.

EVM depends on the Kernel Key Retention System to provide it with a
trusted/encrypted key for the HMAC-sha1 operation. The key is loaded onto the
root's keyring using keyctl.  Until EVM receives notification that the key has
been successfully loaded onto the keyring (echo 1 > <securityfs>/evm), EVM can
not create or validate the 'security.evm' xattr, but returns INTEGRITY_UNKNOWN.
Loading the key and signaling EVM should be done as early as possible. Normally
this is done in the initramfs, which has already been measured as part of the
trusted boot.  For more information on creating and loading existing
trusted/encrypted keys, refer to Documentation/keys-trusted-encrypted.txt.  A
sample dracut patch, which loads the trusted/encrypted key and enables EVM, is
available from http://linux-ima.sourceforge.net/#EVM.

Based on the LSMs enabled, the set of EVM protected security xattrs is defined
at compile.  EVM adds the following three calls to the existing security hooks:
evm_inode_setxattr(), evm_inode_post_setxattr(), and evm_inode_removexattr.  To
initialize and update the 'security.evm' extended attribute, EVM defines three
calls: evm_inode_post_init(), evm_inode_post_setattr() and
evm_inode_post_removexattr() hooks.  To verify the integrity of a security
xattr, EVM exports evm_verifyxattr().

Changelog v7:
- Fixed URL in EVM ABI documentation

Changelog v6: (based on Serge Hallyn's review)
- fix URL in patch description
- remove evm_hmac_size definition
- use SHA1_DIGEST_SIZE (removed both MAX_DIGEST_SIZE and evm_hmac_size)
- moved linux include before other includes
- test for crypto_hash_setkey failure
- fail earlier for invalid key
- clear entire encrypted key, even on failure
- check xattr name length before comparing xattr names

Changelog:
- locking based on i_mutex, remove evm_mutex
- using trusted/encrypted keys for storing the EVM key used in the HMAC-sha1
  operation.
- replaced crypto hash with shash (Dmitry Kasatkin)
- support for additional methods of verifying the security xattrs
  (Dmitry Kasatkin)
- iint not allocated for all regular files, but only for those appraised
- Use cap_sys_admin in lieu of cap_mac_admin
- Use __vfs_setxattr_noperm(), without permission checks, from EVM

Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
2011-07-18 12:29:40 -04:00
..
configfs-spear-pcie-gadget ST SPEAr: PCIE gadget suppport 2011-03-22 17:44:10 -07:00
debugfs-ec Documentation: Add new /sys/kernel/debug/ec/* files to ABI 2010-08-03 09:49:07 -04:00
debugfs-pktcdvd doc: use correct debugfs mountpoint 2009-04-13 15:04:33 -07:00
evm evm: re-release 2011-07-18 12:29:40 -04:00
ima_policy ima: rename PATH_CHECK to FILE_CHECK 2010-02-07 03:06:23 -05:00
procfs-diskstats tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
pstore pstore: use mount option instead sysfs to tweak kmsg_bytes 2011-03-21 13:50:05 -07:00
sysfs-ata [libata] Add ATA transport class 2010-10-21 20:21:03 -04:00
sysfs-block block: Add sysfs documentation for the discard topology parameters 2011-05-18 10:37:39 +02:00
sysfs-block-zram Staging: zram: Document sysfs entries 2010-08-31 15:34:36 -07:00
sysfs-bus-bcma bcma: add Broadcom specific AMBA bus driver 2011-05-10 15:54:54 -04:00
sysfs-bus-css Fix common misspellings 2011-03-31 11:26:23 -03:00
sysfs-bus-i2c-devices-hm6352 hmc6352: add driver for the HMC6352 compass 2010-08-09 20:45:10 -07:00
sysfs-bus-media [media] media: Media device 2011-03-22 04:53:09 -03:00
sysfs-bus-pci PCI: add rescan to /sys/.../pci_bus/.../ 2011-05-21 12:17:12 -07:00
sysfs-bus-pci-devices-cciss cciss: export resettable host attribute 2011-03-11 20:06:09 +01:00
sysfs-bus-rbd rbd: update email address in Documentation 2011-03-21 15:06:50 -07:00
sysfs-bus-umc uwb: document UWB and WUSB sysfs files 2008-09-17 16:54:35 +01:00
sysfs-bus-usb USB: deprecate the power/level sysfs attribute 2010-05-20 13:21:37 -07:00
sysfs-bus-usb-devices-usbsevseg USB: Added driver for a Delcom USB 7-segment LED Display 2008-10-17 14:40:51 -07:00
sysfs-c2port Add c2 port support 2008-11-12 17:17:18 -08:00
sysfs-class [PATCH] Add kernel<->userspace ABI stability documentation 2006-06-21 12:40:47 -07:00
sysfs-class-backlight-driver-adp8870 backlight: new driver for the ADP8870 backlight devices 2011-06-15 20:03:59 -07:00
sysfs-class-bdi fuse: fix bdi naming conflict 2008-05-24 09:56:07 -07:00
sysfs-class-lcd video/lcd: document sysfs interface 2009-08-28 15:21:12 -04:00
sysfs-class-led Fix common misspellings 2011-03-31 11:26:23 -03:00
sysfs-class-mtd Documentation: add MTD sysfs docs 2009-05-29 15:13:04 +01:00
sysfs-class-net-batman-adv net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
sysfs-class-net-mesh net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
sysfs-class-pktcdvd [PATCH] pktcdvd: cleanup 2007-02-11 10:51:28 -08:00
sysfs-class-power ds2760_battery: Document ABI change 2010-05-19 12:25:39 +04:00
sysfs-class-regulator regulator: add get_status() 2009-03-31 09:56:20 +01:00
sysfs-class-uwb_rc uwb: add basic radio manager 2008-11-19 14:46:33 +00:00
sysfs-class-uwb_rc-wusbhc USB: wusb: add wusb_phy_rate sysfs file to host controllers 2009-12-11 11:55:16 -08:00
sysfs-dev sysfs: add /sys/dev/{char,block} to lookup sysfs path by major:minor 2008-07-21 21:54:40 -07:00
sysfs-devices [PATCH] Add kernel<->userspace ABI stability documentation 2006-06-21 12:40:47 -07:00
sysfs-devices-memory Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
sysfs-devices-mmc mmc: export eMMC4.4 enhanced area details to sysfs 2011-03-15 13:48:01 -04:00
sysfs-devices-node mm: compaction: add /sys trigger for per-node memory compaction 2010-05-25 08:06:59 -07:00
sysfs-devices-platform-_UDC_-gadget USB: gadget: storage: optional SCSI WRITE FUA bit 2010-08-10 14:35:42 -07:00
sysfs-devices-power PM: Do not create wakeup sysfs files for devices that cannot wake up 2011-03-15 00:43:14 +01:00
sysfs-devices-system-cpu Documentation, ABI: Update L3 cache index disable text 2011-05-16 11:24:30 -07:00
sysfs-devices-system-ibm-rtl IBM Real-Time "SMI Free" mode driver -v7 2010-10-21 10:10:46 -04:00
sysfs-driver-hid HID: Add HID Report Descriptor to sysfs 2011-02-17 13:23:14 +01:00
sysfs-driver-hid-picolcd HID: split picolcd's operation_mode sysfs attribute 2010-04-27 15:31:26 +02:00
sysfs-driver-hid-prodikeys HID: Prodikeys PC-MIDI HID Driver 2010-05-12 15:18:59 +02:00
sysfs-driver-hid-roccat-arvo HID: roccat: Add 'Users:' tag to sysfs documentation 2011-02-03 17:29:49 +01:00
sysfs-driver-hid-roccat-kone Documentation: fix minor typos/spelling 2011-04-04 17:51:47 -07:00
sysfs-driver-hid-roccat-koneplus Merge branch 'master' into upstream. 2011-05-18 17:06:49 +02:00
sysfs-driver-hid-roccat-kovaplus Documentation: fix minor typos/spelling 2011-04-04 17:51:47 -07:00
sysfs-driver-hid-roccat-pyra Documentation: fix minor typos/spelling 2011-04-04 17:51:47 -07:00
sysfs-driver-samsung-laptop Platform: add Samsung Laptop platform driver 2011-03-28 06:28:12 -04:00
sysfs-firmware-acpi ACPI: add /sys/firmware/acpi/interrupts/sci_not counter 2009-04-21 00:35:47 -04:00
sysfs-firmware-dmi firmware: Fix grammar in sysfs-firmware-dmi doc 2011-04-19 16:45:51 -07:00
sysfs-firmware-gsmi driver: Google EFI SMI 2011-04-29 18:09:34 -07:00
sysfs-firmware-log driver: Google Memory Console 2011-04-29 18:09:34 -07:00
sysfs-firmware-memmap Bernhard has moved 2009-02-18 15:37:56 -08:00
sysfs-firmware-sfi SFI: add sysfs interface for SFI tables. 2010-05-27 12:46:20 -04:00
sysfs-firmware-sgi_uv sysfs: document files in /sys/firmware/sgi_uv/ 2008-09-02 19:21:40 -07:00
sysfs-fs-ext4 ext4: update ext4 documentation 2011-02-21 20:16:21 -05:00
sysfs-gpio gpiolib: allow poll() on value 2009-09-23 07:39:48 -07:00
sysfs-i2c-bmp085 drivers/misc: support for the pressure sensor BMP085 from Bosch Sensortec 2010-08-09 20:45:05 -07:00
sysfs-ibft Firmware: add iSCSI iBFT Support 2008-04-19 19:10:28 -07:00
sysfs-kernel-fscaps kernel/ksysfs.c: expose file_caps_enabled in sysfs 2011-04-19 16:45:51 -07:00
sysfs-kernel-mm mm: create /sys/kernel/mm 2008-07-24 10:47:17 -07:00
sysfs-kernel-mm-cleancache mm/fs: cleancache documentation 2011-05-26 10:00:56 -06:00
sysfs-kernel-mm-hugepages hugetlb: new sysfs interface 2008-07-24 10:47:17 -07:00
sysfs-kernel-slab slub: allow stats to be cleared 2009-10-15 21:34:12 +03:00
sysfs-kernel-uids Documentation: create new scheduler/ subdirectory 2008-02-07 08:42:17 -08:00
sysfs-memory-page-offline HWPOISON: Add soft page offline support 2009-12-16 12:20:00 +01:00
sysfs-module add Packet hub driver for Topcliff Platform controller hub 2010-10-22 10:16:42 -07:00
sysfs-ocfs2 ocfs2: Document /sys/fs/ocfs2 2008-04-18 08:56:07 -07:00
sysfs-platform-asus-laptop Documentation: fix minor typos/spelling 2011-04-04 17:51:47 -07:00
sysfs-platform-asus-wmi eeepc-wmi: asus generic asus-wmi.ko module 2011-03-28 06:07:20 -04:00
sysfs-platform-at91 can: at91_can: make can_id of mailbox 0 configurable 2011-01-24 14:56:37 +01:00
sysfs-platform-eeepc-laptop eeepc-laptop: set the right paths in the documentation 2010-02-28 19:30:57 +01:00
sysfs-platform-ideapad-laptop ideapad: let camera power control entry under platform driver 2011-01-07 17:03:46 -05:00
sysfs-platform-kim drivers:misc: ti-st: move from rfkill to sysfs 2011-02-04 12:41:20 -08:00
sysfs-power PM / Hibernate: Add sysfs knob to control size of memory for drivers 2011-05-17 23:19:19 +02:00
sysfs-pps LinuxPPS: core support 2009-06-18 13:04:04 -07:00
sysfs-profiling profiling: dynamically enable readprofile at runtime 2008-10-16 11:21:31 -07:00
sysfs-ptp ptp: Added a brand new class driver for ptp clocks. 2011-05-23 13:01:00 -07:00
sysfs-tty tty: add 'active' sysfs attribute to tty0 and console device 2010-12-16 16:15:34 -08:00
sysfs-wacom HID: wacom: add ABI doc entry for speed attribute 2010-04-23 02:14:10 +02:00
sysfs-wusb_cbaf uwb: document UWB and WUSB sysfs files 2008-09-17 16:54:35 +01:00