lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 1 Jun 2018 11:44:07 -0400
From:   Boris Ostrovsky <boris.ostrovsky@...cle.com>
To:     Thomas Garnier <thgarnie@...gle.com>,
        kernel-hardening@...ts.openwall.com
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
        Juergen Gross <jgross@...e.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Kate Stewart <kstewart@...uxfoundation.org>,
        "H.J. Lu" <hjl.tools@...il.com>, linux-kernel@...r.kernel.org,
        xen-devel@...ts.xenproject.org
Subject: Re: [PATCH v4 18/27] xen: Adapt assembly for PIE support

On 05/29/2018 06:15 PM, Thomas Garnier wrote:
> diff --git a/arch/x86/xen/xen-pvh.S b/arch/x86/xen/xen-pvh.S
> index ca2d3b2bf2af..82ba89ba8bb3 100644
> --- a/arch/x86/xen/xen-pvh.S
> +++ b/arch/x86/xen/xen-pvh.S
> @@ -114,8 +114,8 @@ ENTRY(pvh_start_xen)
>  	call xen_prepare_pvh
>  
>  	/* startup_64 expects boot_params in %rsi. */
> -	mov $_pa(pvh_bootparams), %rsi
> -	mov $_pa(startup_64), %rax
> +	movabs $_pa(pvh_bootparams), %rsi
> +	movabs $_pa(startup_64), %rax
>  	jmp *%rax
>  
>  #else /* CONFIG_X86_64 */
> @@ -161,10 +161,15 @@ END(pvh_start_xen)
>  
>  	.section ".init.data","aw"
>  	.balign 8
> +	/*
> +	 * Use a quad for _pa(gdt_start) because PIE does not understand a
> +	 * long is enough. The resulting value will still be in the lower long
> +	 * part.
> +	 */
>  gdt:
>  	.word gdt_end - gdt_start
> -	.long _pa(gdt_start)
> -	.word 0
> +	.quad _pa(gdt_start)


With this becoming .quad 32-bit compilation fails:

/data/root/linux/arch/x86/xen/xen-pvh.S: Assembler messages:
/data/root/linux/arch/x86/xen/xen-pvh.S:147: Error: cannot represent
relocation type BFD_RELOC_64


-boris


> +	.balign 8
>  gdt_start:
>  	.quad 0x0000000000000000            /* NULL descriptor */
>  #ifdef CONFIG_X86_64

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ