From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42ED5C433EF for ; Fri, 10 Sep 2021 13:24:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 23149611EF for ; Fri, 10 Sep 2021 13:24:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233520AbhIJNZv (ORCPT ); Fri, 10 Sep 2021 09:25:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231963AbhIJNZt (ORCPT ); Fri, 10 Sep 2021 09:25:49 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1594C061574 for ; Fri, 10 Sep 2021 06:24:38 -0700 (PDT) Received: from zn.tnic (p200300ec2f0f070059e5c0f8ed8d1239.dip0.t-ipconnect.de [IPv6:2003:ec:2f0f:700:59e5:c0f8:ed8d:1239]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id EFC3B1EC013E; Fri, 10 Sep 2021 15:24:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1631280273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=VwIDjvSAEZcyShtXbaCUqIqB8YqpksxdGrjyPfc0M+Q=; b=hWQszuVONK6ITVdzvuOgAbbDT+dwusyPMFU3IAHV4nF7XO6Q1ZyvCGljXrj8DbTyuJL9JT RNuywXZJukC67yctMwOl6naqV70fvD8tVlw77YitmSO9QnlRmkXaofBxv0/+wtAfMHnP/q MQLRWAZXu+MyXigyb/fZ5LcElOxaif0= Date: Fri, 10 Sep 2021 15:24:30 +0200 From: Borislav Petkov To: "H. Peter Anvin (Intel)" Cc: Thomas Gleixner , Ingo Molnar , Andy Lutomirski , Linux Kernel Mailing List , x86@kernel.org Subject: Re: [PATCH v2 0/2] x86/asm: avoid register pressure from static_cpu_has() Message-ID: References: <20210908171716.3340120-1-hpa@zytor.com> <20210909220818.417312-1-hpa@zytor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 10, 2021 at 11:16:47AM +0200, Borislav Petkov wrote: > Right, maybe I'm missing something but what is wrong with the immediate > addressing variant, i.e., that thing: > > testb $0x8,0xffffffff89346eea > > and you need to *force* %rip-relative? To answer my own question after peterz asked: that hardcoded address won't work with KASLR, ofc. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette