https://github.com/torvalds/linux
Revision 48887e63d6e057543067327da6b091297f7fe645 authored by Al Viro on 06 December 2008, 06:05:50 UTC, committed by Al Viro on 09 December 2008, 07:27:41 UTC
Timestamp in audit_context is valid only if ->in_syscall is set.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 7f0ed77
Raw File
Tip revision: 48887e63d6e057543067327da6b091297f7fe645 authored by Al Viro on 06 December 2008, 06:05:50 UTC
[PATCH] fix broken timestamps in AVC generated by kernel threads
Tip revision: 48887e6
check_signature.c
#include <linux/io.h>
#include <linux/module.h>

/**
 *	check_signature		-	find BIOS signatures
 *	@io_addr: mmio address to check
 *	@signature:  signature block
 *	@length: length of signature
 *
 *	Perform a signature comparison with the mmio address io_addr. This
 *	address should have been obtained by ioremap.
 *	Returns 1 on a match.
 */

int check_signature(const volatile void __iomem *io_addr,
			const unsigned char *signature, int length)
{
	while (length--) {
		if (readb(io_addr) != *signature)
			return 0;
		io_addr++;
		signature++;
	}
	return 1;
}
EXPORT_SYMBOL(check_signature);
back to top