Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757408Ab3FLRB3 (ORCPT ); Wed, 12 Jun 2013 13:01:29 -0400 Received: from mail-wi0-f178.google.com ([209.85.212.178]:59161 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754631Ab3FLRB1 (ORCPT ); Wed, 12 Jun 2013 13:01:27 -0400 MIME-Version: 1.0 In-Reply-To: References: <20130611185846.GA23707@www.outflux.net> Date: Wed, 12 Jun 2013 20:01:25 +0300 X-Google-Sender-Auth: vKkhi-MqmBIXUX5URwuXHF4sxCg Message-ID: Subject: Re: [PATCH] x86, relocs: move ELF relocation handling to C From: Pekka Enberg To: Kees Cook Cc: LKML , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86 maintainers , David Woodhouse , Yinghai Lu , Matt Fleming , Alexander Duyck Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1719 Lines: 38 On Wed, Jun 12, 2013 at 7:26 PM, Kees Cook wrote: > On Tue, Jun 11, 2013 at 11:27 PM, Pekka Enberg wrote: >> Hello Kees, >> >> On Tue, Jun 11, 2013 at 9:58 PM, Kees Cook wrote: >>> Moves the relocation handling into C, after decompression. This requires >>> that the decompressed size is passed to the decompression routine as >>> well so that relocations can be found. Only kernels that need relocation >>> support will use the code. >>> >>> Based on work by Neill Clift and Michael Davidson. >>> >>> Signed-off-by: Kees Cook >> >> How does the kernel benefit from this? Are there problems with the current >> assembly code? Are you planning to improve the relocation code? > > Yes, this is continuing the work needed for 64-bit relocations, > ultimately needed by KASLR. As part of the work, I was asked to move > the relocation logic from assembly into C. Doing this means that there > isn't any need for duplicating the logic in the 64-bit path (e.g. > head_64.S). > > Since the other relocation work is already in the tree, I wanted to > get these last two pieces in (one was a fix for the __vvar_page -- > separate patch, the other is this one, allowing 64-bit relocations to > operate while also moving the logic into C). OK, that's definitely changelog material. I'm not that familiar with the code your touching but FWIW: Reviewed-by: Pekka Enberg -- 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/