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]
Message-Id: <1244814040-5810-6-git-send-email-ptesarik@suse.cz>
Date:	Fri, 12 Jun 2009 15:40:37 +0200
From:	Petr Tesarik <ptesarik@...e.cz>
To:	LKML <linux-kernel@...r.kernel.org>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>, Andi Kleen <andi@...stfloor.org>,
	Roland McGrath <roland@...hat.com>,
	Petr Tesarik <ptesarik@...e.cz>
Subject: [PATCH v2 5/8] x86: mark altinstr-related sections in vDSO as broken

There are several reasons why this does not work for the vDSO.

1. The alt_instr records are not processed by anybody.

The .altinstruction sections end up in the vDSO binary, which
is then incorporated verbatim inside a completely different
section, so it is not seen by the main kernel.

There is no code to interpret them during vDSO setup either.

2. The pointers in the alt_instr records are wrong.

They point to the instructions and replacements at the prelinked
addresses, but that's neither where the vDSO blob is located at
startup, nor where it is copied to by the vDSO setup.

The .altinstr_replacement section is not broken per se, but it is
useless dead code without the accompanying .alt_instr section.

Signed-off-by: Petr Tesarik <ptesarik@...e.cz>
---
 arch/x86/vdso/vdso-layout.lds.S |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/arch/x86/vdso/vdso-layout.lds.S b/arch/x86/vdso/vdso-layout.lds.S
index 7a76159..fc2ad07 100644
--- a/arch/x86/vdso/vdso-layout.lds.S
+++ b/arch/x86/vdso/vdso-layout.lds.S
@@ -56,13 +56,6 @@ SECTIONS
 		*(.gnu.linkonce.b.*)
 	}
 
-	.altinstructions : {
-		*(.altinstructions)
-	}
-	.altinstr_replacement : {
-		*(.altinstr_replacement)
-	}
-
 	/*
 	 * Align the actual code well away from the non-instruction data.
 	 * This is the best thing for the I-cache.
@@ -80,6 +73,11 @@ SECTIONS
 	 * if they get used by accident.
 	 */
 	.broken : {
+		/* The vDSO setup code does not handle alternative
+		 * instructions.
+		 */ 
+		*(.altinstructions)
+		*(.altinstr_replacement)
 	}
 }
 
-- 
1.6.0.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ