Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2130949rda; Tue, 24 Oct 2023 13:19:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEC5/0G+PNhB5TQCexX8mu0JKg0mOVRhoH07YuJ6f6r3qEVSSF8rty0ZwD7M0GdGtGG36Xo X-Received: by 2002:a17:902:e844:b0:1c6:25c3:13d3 with SMTP id t4-20020a170902e84400b001c625c313d3mr14303966plg.6.1698178795197; Tue, 24 Oct 2023 13:19:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698178795; cv=none; d=google.com; s=arc-20160816; b=Gfodm59fGlaSzUZvPxPeOkrPddwucaRdlYkJq0heY+p3KFdBI7Mi9DlPvRrF4RO/HB C3Y9Frik3QXsjluCS8RcpyG+LK7ve6+PUOmR36pMtWcqa9aXhzPIAYCDA5RZiS74jRWc oQxyJ/GM5GWyLduaVUjXIk7/cKHexwfIjf8vyDpV/pfjpZe96KOkEbdrWUcHmXm1PLc2 50AaVlDhONIIbPHmxqB55BwOKkPIkWFj8GyVhl10bbt4//E7Lho6ySCK3TbuwJhKxkNw NhzDpURNFUdf9Gc2qZerMi2YDzjpsVwJ4pTaSwahmjEE9DYdmlrIgruizKUphNDFvLtM +Sag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=xi1FrAT40RHPFjhhihyLKj7fZaVtmze6tTwxLfCqgRQ=; fh=qbvL9rxVg2Dl597X+m8XJfpLyodS/eD90v3/lNJFI54=; b=SwEt5+BZXQf1j+gP7mMTrPZ8/JTljfS2GdZSY5qDccOf8STgLTWx17jHT1NoXJfKpf ePFpJfOlKLiTTXg2qy+Xcdl4DbVHdTS+HLS3E5K88VTwns3ZUwpdIeIKDTgLDRmo9fYq uFLNQER/ATiVnnz8Ow+9VQa3NY5mj/tG3KP8QlVK+ydb78wgd31LlgysBRoXvQYAaG35 Z3G3g+1f9ahTOkgCpkjV9U+fhDTMob0m8DM+yWfSKLSOBSHjUHmrvK2wqp94Eca34PLH huIEUi4TkYdjCFI9ktgpygpYB2wU879nr8MqWZ9TtjrgZZxq+Tv3RhPAc82Z3QVS9Y6P 6tPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=fXFsLbZK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id j12-20020a170903024c00b001c72c893ac9si9126155plh.104.2023.10.24.13.19.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 13:19:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=fXFsLbZK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 19EF880254CE; Tue, 24 Oct 2023 13:19:53 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344345AbjJXUTg (ORCPT + 99 others); Tue, 24 Oct 2023 16:19:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344333AbjJXUTe (ORCPT ); Tue, 24 Oct 2023 16:19:34 -0400 Received: from mail.alien8.de (mail.alien8.de [65.109.113.108]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BACDD7F; Tue, 24 Oct 2023 13:19:31 -0700 (PDT) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id BC07840E01AF; Tue, 24 Oct 2023 20:19:28 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.alien8.de Authentication-Results: mail.alien8.de (amavisd-new); dkim=pass (4096-bit key) header.d=alien8.de Received: from mail.alien8.de ([127.0.0.1]) by localhost (mail.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id CgqfiZwe5MTG; Tue, 24 Oct 2023 20:19:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1698178767; bh=xi1FrAT40RHPFjhhihyLKj7fZaVtmze6tTwxLfCqgRQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fXFsLbZKKz6ukN7WNyw6QrDgkjKNakStAJXc1oM3VsZTP4HNulBrvlKWvIgKGuPjP p5q3PTBsIXonyNyyGyWSvfv5ga6FgxxftVuuK7C7Sy7LHLYqJLGH/HGxhUkNRUG4cN 6KRDqTOjePoKZ+Et3RmL/UQC5CwcbfbDzKR4gVWa/xcZQruRHGN2+0FQYUkBiHCORa 0tRq2ZXfnwegeV/l2iPDfiBOKV+uSpx3CMOp+Gn3pFAB1DfgKlo1ZDFDnsVFEHhA6Y vW83fqBHLDHB2THQk24Ne0RY/wuOpSsLErcnLiupXaG05FojayhNreA1Nx4ubvxWq5 3SZf7hmd6E/zQzIcr306CKa1K2EL/oVkgw0tGKKrBLmE5xVgP87G3OeIFdHYEwFkGw rTNES+Sgih3LlpTwOHtM79g96sKLkJs/6qVsswc5bxIcHbRG4FwWfTljA0jyDdNI7/ BrJ0oYydDq+0XDYYlWP5confc0fSfp0YhyUGNhHIBw5bNVv8pMsGchtPyRCYCry1h0 klIpN8lAWBFnwxjnjVDjL48zEAK0XjdutkIe2pP+3sz7LFX9BvnmKr443lRRtxW86F TRmIf10IGM58UVslUa0577J9FLwI9Iuga6K0Nb1YpbVDWfGSO2uAO+tHBjfZluKegp a+kj1HfIe4ZvghZySYlUZYi0= Received: from zn.tnic (pd95304da.dip0.t-ipconnect.de [217.83.4.218]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id D5B8340E0177; Tue, 24 Oct 2023 20:19:18 +0000 (UTC) Date: Tue, 24 Oct 2023 22:19:13 +0200 From: Borislav Petkov To: Josh Poimboeuf Cc: "Kaplan, David" , Ingo Molnar , "linux-kernel@vger.kernel.org" , "linux-tip-commits@vger.kernel.org" , "Peter Zijlstra (Intel)" , "x86@kernel.org" , David Howells Subject: Re: [tip: x86/bugs] x86/retpoline: Ensure default return thunk isn't used at runtime Message-ID: <20231024201913.GHZTgmwf6QMkX8BGbo@fat_crate.local> References: <20231018151245.GCZS/17QhDGe7q6K+w@fat_crate.local> <20231018155433.z4auwckr5s27wnig@treble> <20231018175531.GEZTAcE2p92U1AuVp1@fat_crate.local> <20231018203747.GJZTBCG7mv5HL4w6CC@fat_crate.local> <20231019063527.iwgyioxi2gznnshp@treble> <20231019065928.mrvhtfaya22p2uzw@treble> <20231019141514.GCZTE58qPOvcJCiBp3@fat_crate.local> <20231019143951.GEZTE/t/wECKBxMSjl@fat_crate.local> <20231019152051.4u5xwhopbdisy6zl@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20231019152051.4u5xwhopbdisy6zl@treble> X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 24 Oct 2023 13:19:53 -0700 (PDT) On Thu, Oct 19, 2023 at 08:20:51AM -0700, Josh Poimboeuf wrote: > GCC doesn't read asm. Even if it did that wouldn't fix things for > callers of custom-ABI return-thunk-using functions. > > The below seems to work. Right, I guess we can do something like that. Linker is not happy here about that symbol, tho: ld: arch/x86/lib/retpoline.o:(.altinstr_replacement+0x95): undefined reference to `warn_thunk_thunk' make[2]: *** [scripts/Makefile.vmlinux:37: vmlinux] Error 1 make[1]: *** [/mnt/kernel/kernel/5th/linux/Makefile:1165: vmlinux] Error 2 make: *** [Makefile:234: __sub-make] Error 2 -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette