[PATCH v5 10/14] efi: only print saved efi runtime maps instead of all memmap ranges for kexec

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/16/13 at 12:33pm, Borislav Petkov wrote:
> On Mon, Dec 16, 2013 at 10:00:10AM +0800, Dave Young wrote:
> > > > -	print_efi_memmap();
> > > > +	if (efi_setup) {
> > > > +		int s;
> > > > +		struct efi_setup_data *data;
> > > > +
> > > > +		s = sizeof(*data) + nr_efi_runtime_map * sizeof(data->map[0]);
> > > > +		data = early_memremap(efi_setup, s);
> > > > +		if (!data)
> > > > +			return;
> > > > +		print_efi_memmap(data->map, nr_efi_runtime_map,
> > > > +				 sizeof(data->map[0]));
> > > > +		early_memunmap(data, s);
> > > 
> > > Well, if you call print_efi_memmap() in parse_efi_setup() you can save
> > > yourself that map/unmaping no?
> > 
> > In parse_efi_setup, I need map twice as well:
> 
> Well, your v6 has a something completely different:
> 
> void __init parse_efi_setup(u64 phys_addr)
> {
>         efi_setup = phys_addr;
> }
> 
> There's no mapping at all anymore. So please redo your reply against v6.

They are moved to efi.c efi_setup_init(), I'm not sure if I expained clear
enough, in current code parse_efi_setup only accept one argument phys_addr
so I will mapping it with sizeof(struct setup_data) to get the payload size
then get the nr_efi_runtime_map. This is a simplification from the old 
implementation.

Based on current implementation, yes, I can add back another argument data_len
to avoid the 1st mapping thus I can print efi memmap as you said.

In this way I need export another extern for the data_len though.

> 
> > Another where what I print in this patch is same position what
> > non-kexec kernel does, it looks better that print them only if earlier
> > init is ok.
> 
> -ENOPARSE.

What do you mean about NOPARSE, do you want another function name like
save_efi_setup()?

> 
> All I'm saying is, if you're going to memremap/memunmap efi_setup,
> then do it once in efi_setup_init() as you do already and call
> print_efi_memmap from there - no need to do work twice for no reason.
> 
> -- 
> Regards/Gruss,
>     Boris.
> 
> Sent from a fat crate under my desk. Formatting is fine.
> --



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux