Thread (30 messages) 30 messages, 7 authors, 2016-08-11

Re: [Linux-ima-devel] [PATCH 1/7] ima: on soft reboot, restore the measurement list

From: Petko Manolov <hidden>
Date: 2016-08-10 20:14:25
Also in: kexec, lkml

On 16-08-10 14:40:13, David Laight wrote:
From: Linuxppc-dev [mailto:linuxppc-dev-bounces+david.laight=aculab.com@lists.ozlabs.org] On Behalf Of
quoted
quoted
quoted
So given what you have above, you'd use something like:

struct ima_kexec_hdr {
	u16 version;
	u16 _reserved0;
	u32 _reserved1;
	u64 buffer_size;
	u64 count;
};

cheers
Thanks, I'll make this change.
I would suggest:

struct ima_kexec_hdr {
	u64 buffer_size;
	u64 count;
	u16 version;
};

and let the compiler add the proper padding, depending on the architecture.  On
32bit machine we'll have 4 bytes smaller allocations (compared to 64bit) while
retaining the same functionality.
AAAArrrrgggg.....

That doesn't work for 32bit applications on 64bit hosts.
Which part won't work?
The extra bytes will make 0 difference to the allocation cost and lots to the 
processing.
An example?


		Petko
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help