fix IMA deadlock

Christoph Hellwig hch at lst.de
Wed May 10 06:45:06 UTC 2017


IMA currently tries to read the file to calculate a hash from inside
i_rwsem.  On file system like XFS that also take i_rwsem for reads this
deadlocks.

This patch instead adds a new ->integrity_read method for IMA that can
be used to read data with i_rwsem held.  For XFS it has an implementation
that skips the locking, other file systems can just set it to the default
implementation.

As a side effect this also gets rid of playing with the address limit.
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



More information about the Linux-security-module-archive mailing list