From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752846Ab3GOSKI (ORCPT ); Mon, 15 Jul 2013 14:10:08 -0400 Received: from terminus.zytor.com ([198.137.202.10]:43374 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751444Ab3GOSKG (ORCPT ); Mon, 15 Jul 2013 14:10:06 -0400 Message-ID: <51E43ACD.9080307@zytor.com> Date: Mon, 15 Jul 2013 11:09:17 -0700 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Kees Cook CC: Yinghai Lu , Ingo Molnar , Linux Kernel Mailing List , pageexec@gmail.com, Thomas Gleixner , "H. Peter Anvin" , "linux-tip-commits@vger.kernel.org" Subject: Re: [tip:x86/urgent] x86: Make sure IDT is page aligned References: <20130712225017.GA5366@www.outflux.net> In-Reply-To: X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/13/2013 02:34 PM, Yinghai Lu wrote: > > can we use put all idt_table related in to __bss.aligned section ...? > > like > gate_desc idt_table[NR_VECTORS] __page_aligned_bss; > I think this is the best solution all around... it not only solves the initializer problem but also reduces the size of data. A long, long time ago in a galaxy far, far away I believe the IDT got set up before we cleared bss, but that is no longer the case as we now clear bss very, very early (on 32 bits before paging is even enabled.) Still, it would seem that the minimal solution, if we need something for 3.11/stable, is to simply fix the alignment statement in head_64.S (optionally move to .bss..page_aligned) and then do the proper cleanup for 3.12. If you could prepare a patch for the former (please include the descriptions we discussed over IRC) and a patchset for the latter it would be good. Thanks, -hpa