Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757244AbdLXDaY (ORCPT ); Sat, 23 Dec 2017 22:30:24 -0500 Received: from mail-it0-f44.google.com ([209.85.214.44]:35375 "EHLO mail-it0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752022AbdLXDaW (ORCPT ); Sat, 23 Dec 2017 22:30:22 -0500 X-Google-Smtp-Source: ACJfBovgw3HUzDFIbZw2SZ59AJnRQhPYUXC2stQnNBplmmpTvxNLe787iejSsm3Yi19Nd0rCW4Rda4csn7wxg8NcPQA= MIME-Version: 1.0 In-Reply-To: <20171224014415.GA5663@chirva-void> References: <20171224014415.GA5663@chirva-void> From: Linus Torvalds Date: Sat, 23 Dec 2017 19:30:21 -0800 X-Google-Sender-Auth: eVcLOq03izDhTdridezvy8n0fwQ Message-ID: Subject: Re: PROBLEM: consolidated IDT invalidation causes kexec to reboot To: Alexandru Chirvasitu Cc: Thomas Gleixner , kernel list , Andy Lutomirski , Borislav Petkov , Brian Gerst , Denys Vlasenko , "H. Peter Anvin" , Josh Poimboeuf , Peter Zijlstra , Steven Rostedt , Ingo Molnar Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 896 Lines: 29 On Sat, Dec 23, 2017 at 5:44 PM, Alexandru Chirvasitu wrote: > > For testing purposes, I've altered machine_kexec_32.c making the > following toy commit. It naively undoes part of e802a51, solely to > confirm that's where it goes awry in my setup. That's really funky. The idt_invalidate() seems to do *exactly* the same thing. It uses "load_idt()" on an IDT with size 0, and the supplied address. Can you disassemble your "set_idt()" code vs the "idt_invalidate()"? > Is this expected behaviour? No. The code literally seems identical. The only difference is (a) where the 0 limit comes from (b) perhaps build flags and whether it is inlined or not due to being in a different file and neither of those should matter, but maybe they do. Which is why I'd like you to actually look at the generated code and see if you can see any difference.. Linus