From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753040AbeAJVFM (ORCPT + 1 other); Wed, 10 Jan 2018 16:05:12 -0500 Received: from mail-it0-f50.google.com ([209.85.214.50]:36545 "EHLO mail-it0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752970AbeAJVFK (ORCPT ); Wed, 10 Jan 2018 16:05:10 -0500 X-Google-Smtp-Source: ACJfBotyodG95lE8KuIA4N1qiWiMGglcL5PwtiGmbKA9WpURYndiqhxalFSVtP35ooVGUVTlt5Wyq6SWGIkMR7Z4hNk= MIME-Version: 1.0 In-Reply-To: <20180110205544.k2e534nkk27lkpjc@pd.tnic> References: <20180110003139.10531-1-andi@firstfloor.org> <1515568506.22302.72.camel@infradead.org> <1515578735.22302.91.camel@infradead.org> <20180110112815.mgciyf5acwacphkq@pd.tnic> <20180110201532.5jnji6ypfl6slzvb@treble> <20180110205544.k2e534nkk27lkpjc@pd.tnic> From: Linus Torvalds Date: Wed, 10 Jan 2018 13:05:08 -0800 X-Google-Sender-Auth: TABKvBcVm5dhlpPdZJLkD9Yk5Kg Message-ID: Subject: Re: [PATCH] x86/alternatives: Fix optimize_nops() checking To: Borislav Petkov Cc: Josh Poimboeuf , Thomas Gleixner , David Woodhouse , Andi Kleen , "the arch/x86 maintainers" , Linux Kernel Mailing List , Paul Turner , Andrew Lutomirski , Peter Zijlstra , Tom Lendacky , Tim Chen , Greg Kroah-Hartman , Dave Hansen , Jiri Kosina , Andi Kleen Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Wed, Jan 10, 2018 at 12:55 PM, Borislav Petkov wrote: > > Ok, so the problem was: how to fixup jumps which are not the first > instruction which is being replaced but a following one in the > instruction bytes with which we replace. What jumps do you have that need to be fixed up? I really think we should avoid having things like that. Any jumps *within* the alternatives should have been handled by the assembler already. And jumps between the alternatives and other places? Why do they exist? Linus