Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp11181ybh; Mon, 20 Jul 2020 09:11:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzYqeF+ByCYQs8U4nJlubmRQbAC/2JM7+3rEh18PzL4CiQF3naEE6cSbWp/pBd31mMiVsgl X-Received: by 2002:a17:906:6d4d:: with SMTP id a13mr20724757ejt.146.1595261509522; Mon, 20 Jul 2020 09:11:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595261509; cv=none; d=google.com; s=arc-20160816; b=onZkWtSL/XLc3VK5e1X78RPNVrnNoRuixfPDqSwSRyUbPpumFW57xA0oU/tfh2xuF4 MQ8LI6UoY0TNeOX95WE2tVVJsRnuGn+Gel9jX6vW+3V0fINPK27f47fywOGeUHTh0BcM GLE6Iz+BgIeODuRXNWFCEzpPE2dgLnD1CMwZX99D9LPoHaYAWC4tJOmvQjvK02LVPWbq M9AEQ3aNClJyCCtwqgI7l0VDMgUs0dztlED3Uo+7fYrGzi3tzlG3ypBsbatYGua2YUkU znB9yrb8tbyPYgJVwgBr86dEa9aW+75gjybp8kttGLHJTKyqDCXhN3PJ3/+43kpaB0QG gOCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=XUoBla8Od059emwJ6P/TXubtarC5dp6nq4dk4xQf8JM=; b=zNsOod7nzdPzqH84UYKH/UBjuAOa6JlIHNzWJIJdgT9Y4ESNAkGz8sjnRB6g+sBnpS yuAx8W2w4sx945k9eJ8ji4ZVHXZsGm/2s8QvyautqLEQ0febXt08GawlUff/sXaP1VoM NTC0Jy1QoJujSiC4j00byLAxeuIIes/wNYpl6jCE0TS2/KfVjDcxoqv6B3Y714QVkfY+ 9Bqul9WPW1a5ol7Ts+gEJslQ3myYkulLFWpD4vs91xnFsxBIAjKwoF7Uc2Aog+3h5JND LT4gV0ZEc8k5YVn4IUCZO/lDT/jlIvgdA4BooRPRfidCZE4ojRUaRgQWEb7o+VgyA7y1 dDZg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gg26si10785613ejb.128.2020.07.20.09.11.26; Mon, 20 Jul 2020 09:11:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387778AbgGTQLS (ORCPT + 99 others); Mon, 20 Jul 2020 12:11:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733093AbgGTQLR (ORCPT ); Mon, 20 Jul 2020 12:11:17 -0400 Received: from theia.8bytes.org (8bytes.org [IPv6:2a01:238:4383:600:38bc:a715:4b6d:a889]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99302C0619D2 for ; Mon, 20 Jul 2020 09:11:16 -0700 (PDT) Received: by theia.8bytes.org (Postfix, from userid 1000) id 9012C344; Mon, 20 Jul 2020 18:11:13 +0200 (CEST) Date: Mon, 20 Jul 2020 18:11:12 +0200 From: Joerg Roedel To: Thomas Gleixner Cc: Arvind Sankar , hpa@zytor.com, Andy Lutomirski , Ingo Molnar , Borislav Petkov , x86@kernel.org, Andy Lutomirski , Peter Zijlstra , Joerg Roedel , linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86/idt: Make sure idt_table takes a whole page Message-ID: <20200720161112.GB620@8bytes.org> References: <0CEC6A66-FD50-4B6B-9521-A40E5B9DA10F@zytor.com> <7FB389D0-77D4-482E-8A21-8662DDB00268@amacapital.net> <0B7CF270-EC04-4907-821A-A01F24BEF156@zytor.com> <20200719023405.GA564835@rani.riverdale.lan> <87pn8rokjz.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87pn8rokjz.fsf@nanos.tec.linutronix.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jul 19, 2020 at 12:39:44PM +0200, Thomas Gleixner wrote: > The right fix is trivial. See below. > > Thanks, > > tglx > ---- > arch/x86/kernel/vmlinux.lds.S | 1 + > include/asm-generic/vmlinux.lds.h | 1 + > 2 files changed, 2 insertions(+) > > --- a/arch/x86/kernel/vmlinux.lds.S > +++ b/arch/x86/kernel/vmlinux.lds.S > @@ -358,6 +358,7 @@ SECTIONS > .bss : AT(ADDR(.bss) - LOAD_OFFSET) { > __bss_start = .; > *(.bss..page_aligned) > + . = ALIGN(PAGE_SIZE); > *(BSS_MAIN) > BSS_DECRYPTED > . = ALIGN(PAGE_SIZE); > --- a/include/asm-generic/vmlinux.lds.h > +++ b/include/asm-generic/vmlinux.lds.h > @@ -738,6 +738,7 @@ > .bss : AT(ADDR(.bss) - LOAD_OFFSET) { \ > BSS_FIRST_SECTIONS \ > *(.bss..page_aligned) \ > + . = ALIGN(PAGE_SIZE); \ > *(.dynbss) \ > *(BSS_MAIN) \ > *(COMMON) \ I thougt about that too (and doing the same for .data..page_aligned), but decided that 'page_aligned' does not imply 'page_sized', so that putting other variables on the same page is fine in general and saves some memory. The problem why it breaks here is only because x86 maps a variabe which is not page-sized RO, so my thinking was that it should be fixed right there, at the variable. But if the above is fine too I prepare a patch which also aligns the end of .data..page_aligned. Thanks, Joerg