efi_loader: efi_allocate_pages is too restrictive
When running on the sandbox the stack is not necessarily at a higher memory address than the highest free memory. There is no reason why the checking of the highest memory address should be more restrictive for EFI_ALLOCATE_ANY_PAGES than for EFI_ALLOCATE_MAX_ADDRESS. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> [agraf: use -1ULL instead] Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
		
							parent
							
								
									62f3757870
								
							
						
					
					
						commit
						aa909462d0
					
				|  | @ -295,7 +295,7 @@ efi_status_t efi_allocate_pages(int type, int memory_type, | ||||||
| 	switch (type) { | 	switch (type) { | ||||||
| 	case EFI_ALLOCATE_ANY_PAGES: | 	case EFI_ALLOCATE_ANY_PAGES: | ||||||
| 		/* Any page */ | 		/* Any page */ | ||||||
| 		addr = efi_find_free_memory(len, gd->start_addr_sp); | 		addr = efi_find_free_memory(len, -1ULL); | ||||||
| 		if (!addr) { | 		if (!addr) { | ||||||
| 			r = EFI_NOT_FOUND; | 			r = EFI_NOT_FOUND; | ||||||
| 			break; | 			break; | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue