Re: [PATCH] x86/efi: Fix incorrect invocation of PciIo->Attributes()

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

 



On Sun, Jun 24, 2018 at 03:42:19PM +0200, Ard Biesheuvel wrote:
> Considering we had other weird issues involving uint64_t types with
> the TPM code just this week, I wonder if this isn't a fundamental
> problem with the mixed mode thunking, and so I need some help from the
> x86 gurus (Ingo?)

Looks like that's exactly what it does:

	/*
	 * Convert x86-64 ABI params to i386 ABI
	 */
	subq	$32, %rsp
	movl	%esi, 0x0(%rsp)
	movl	%edx, 0x4(%rsp)
	movl	%ecx, 0x8(%rsp)
	movq	%r8, %rsi
	movl	%esi, 0xc(%rsp)
	movq	%r9, %rsi
	movl	%esi,  0x10(%rsp)

I don't think there's a way to find out in thunk_64.S if the register
was populated with a 64-bit or 32-bit value, but it *might* be possible
to do it with a macro that accepts a __VA_ARGS__ argument, iterates
over the parameters, checks whether a parameter is 64-bit and we're
in mixed mode, and if so, passes in the high and low dword separately.

Lukas
--
To unsubscribe from this list: send the line "unsubscribe linux-efi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux