From: deraadt Date: Thu, 6 Jul 2017 06:17:04 +0000 (+0000) Subject: 0xcc-fill a few more alignments. Not because these ones matter particularily, X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=cb5172cd86ecfdd15866afe79bbbb1afa3dff309;p=openbsd 0xcc-fill a few more alignments. Not because these ones matter particularily, but because elimination highlights more important ones. Cursory review mortimer, ok mlarkin --- diff --git a/sys/arch/amd64/amd64/locore.S b/sys/arch/amd64/amd64/locore.S index e8e90c619ca..dbd2e2fbbaf 100644 --- a/sys/arch/amd64/amd64/locore.S +++ b/sys/arch/amd64/amd64/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.86 2017/06/29 17:17:28 deraadt Exp $ */ +/* $OpenBSD: locore.S,v 1.87 2017/07/06 06:17:04 deraadt Exp $ */ /* $NetBSD: locore.S,v 1.13 2004/03/25 18:33:17 drochner Exp $ */ /* @@ -125,7 +125,7 @@ /* * override user-land alignment before including asm.h */ -#define ALIGN_DATA .align 8 +#define ALIGN_DATA .align 8,0xcc #define ALIGN_TEXT .align 16,0x90 #define _ALIGN_TEXT ALIGN_TEXT diff --git a/sys/arch/amd64/amd64/locore0.S b/sys/arch/amd64/amd64/locore0.S index 350b57c6644..e6ddddb4d0f 100644 --- a/sys/arch/amd64/amd64/locore0.S +++ b/sys/arch/amd64/amd64/locore0.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore0.S,v 1.1 2017/05/31 19:18:18 deraadt Exp $ */ +/* $OpenBSD: locore0.S,v 1.2 2017/07/06 06:17:04 deraadt Exp $ */ /* $NetBSD: locore.S,v 1.13 2004/03/25 18:33:17 drochner Exp $ */ /* @@ -125,7 +125,7 @@ /* * override user-land alignment before including asm.h */ -#define ALIGN_DATA .align 8 +#define ALIGN_DATA .align 8,0xcc #define ALIGN_TEXT .align 16,0x90 #define _ALIGN_TEXT ALIGN_TEXT diff --git a/sys/arch/i386/i386/apicvec.s b/sys/arch/i386/i386/apicvec.s index 26454e44033..6459b5af250 100644 --- a/sys/arch/i386/i386/apicvec.s +++ b/sys/arch/i386/i386/apicvec.s @@ -1,4 +1,4 @@ -/* $OpenBSD: apicvec.s,v 1.32 2016/07/16 06:04:29 mlarkin Exp $ */ +/* $OpenBSD: apicvec.s,v 1.33 2017/07/06 06:17:05 deraadt Exp $ */ /* $NetBSD: apicvec.s,v 1.1.2.2 2000/02/21 21:54:01 sommerfeld Exp $ */ /*- @@ -58,7 +58,7 @@ XINTR(ipi): INTRFASTEXIT .globl XINTR(ipi_invltlb) - .p2align 4,0x90 + .p2align 4,0xcc XINTR(ipi_invltlb): pushl %eax pushl %ds @@ -78,7 +78,7 @@ XINTR(ipi_invltlb): iret .globl XINTR(ipi_invlpg) - .p2align 4,0x90 + .p2align 4,0xcc XINTR(ipi_invlpg): pushl %eax pushl %ds @@ -98,7 +98,7 @@ XINTR(ipi_invlpg): iret .globl XINTR(ipi_invlrange) - .p2align 4,0x90 + .p2align 4,0xcc XINTR(ipi_invlrange): pushl %eax pushl %edx @@ -124,7 +124,7 @@ XINTR(ipi_invlrange): iret .globl XINTR(ipi_reloadcr3) - .p2align 4,0x90 + .p2align 4,0xcc XINTR(ipi_reloadcr3): pushl %eax pushl %ds diff --git a/sys/arch/i386/i386/locore.s b/sys/arch/i386/i386/locore.s index fdcb6ba6d61..1f149f31487 100644 --- a/sys/arch/i386/i386/locore.s +++ b/sys/arch/i386/i386/locore.s @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.s,v 1.177 2017/06/30 06:17:47 mlarkin Exp $ */ +/* $OpenBSD: locore.s,v 1.178 2017/07/06 06:17:05 deraadt Exp $ */ /* $NetBSD: locore.s,v 1.145 1996/05/03 19:41:19 christos Exp $ */ /*- @@ -80,9 +80,8 @@ * override user-land alignment before including asm.h */ -#define ALIGN_DATA .align 4 +#define ALIGN_DATA .align 4,0xcc #define ALIGN_TEXT .align 4,0x90 /* 4-byte boundaries, NOP-filled */ -#define SUPERALIGN_TEXT .align 16,0x90 /* 16-byte boundaries better for 486 */ #define _ALIGN_TEXT ALIGN_TEXT #include @@ -347,7 +346,7 @@ ENTRY(kcopy) #endif ret - ALIGN_TEXT + .align 4,0xcc 1: addl %ecx,%edi # copy backward addl %ecx,%esi std @@ -1233,7 +1232,7 @@ ENTRY(i686_pagezero) movl 12(%esp), %edi movl $1024, %ecx - ALIGN_TEXT + .align 4,0x90 1: xorl %eax, %eax repe @@ -1244,8 +1243,7 @@ ENTRY(i686_pagezero) popl %edi ret - ALIGN_TEXT - + .align 4,0x90 2: incl %ecx subl $4, %edi