Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161756Ab3DEHN2 (ORCPT ); Fri, 5 Apr 2013 03:13:28 -0400 Received: from mail-bk0-f49.google.com ([209.85.214.49]:58152 "EHLO mail-bk0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751204Ab3DEHN1 (ORCPT ); Fri, 5 Apr 2013 03:13:27 -0400 Date: Fri, 5 Apr 2013 09:13:22 +0200 From: Ingo Molnar To: Kees Cook Cc: linux-kernel@vger.kernel.org, kernel-hardening@lists.openwall.com, "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , x86@kernel.org, Jarkko Sakkinen , Matthew Garrett , Matt Fleming , Eric Northup , Dan Rosenberg , Julien Tinnes , Will Drewry , Linus Torvalds Subject: Re: [PATCH 2/3] x86: build reloc tool for both 64 and 32 bit Message-ID: <20130405071322.GC26889@gmail.com> References: <1365106055-22939-1-git-send-email-keescook@chromium.org> <1365106055-22939-3-git-send-email-keescook@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1365106055-22939-3-git-send-email-keescook@chromium.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1505 Lines: 37 * Kees Cook wrote: > Add logic for 64-bit kernel relocations. Since there is no need to > handle 32 and 64 bit at the same time, refactor away most of the 32/64 > bit ELF differences and split the build into producing two separate > binaries. Additionally switches to using realloc instead of a two-pass > approach. > > Heavily based on work by Neill Clift and Michael Davidson. > > Signed-off-by: Kees Cook > Cc: Eric Northup > --- > arch/x86/boot/compressed/Makefile | 2 +- > arch/x86/realmode/rm/Makefile | 2 +- > arch/x86/tools/.gitignore | 3 +- > arch/x86/tools/Makefile | 14 +- > arch/x86/tools/relocs.c | 717 ++++++++++++++++++++++++++----------- > arch/x86/tools/relocs_32.c | 1 + > arch/x86/tools/relocs_64.c | 2 + > 7 files changed, 533 insertions(+), 208 deletions(-) > create mode 100644 arch/x86/tools/relocs_32.c > create mode 100644 arch/x86/tools/relocs_64.c This patch too is a bit large and it would be wise to split it into two steps: first the refactoring - which is non-functional and should not cause any problems in theory - then the change that switches to realloc. Thanks, Ingo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/