Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp3191775rwb; Mon, 7 Aug 2023 09:30:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGBQT7wsfjQ7EcV4c1LfxOrdiM5ppykgfwcHQdFw3UfXPmXvRHW4Lht3HnSxT0LSB+TLBzc X-Received: by 2002:a17:903:1cb:b0:1bb:8931:ee94 with SMTP id e11-20020a17090301cb00b001bb8931ee94mr8911050plh.67.1691425813318; Mon, 07 Aug 2023 09:30:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691425813; cv=none; d=google.com; s=arc-20160816; b=hsuXOhgGOHoEWnvD+UumFX+HbNgKWR5TIoRXsWiJHbD98JOgc0vnQ+tohedaIgzxh7 JMeyUBfbd9RrioGuPeBXpgih5I/5dNgxQf9m92A8lW20ScL9c4uqXrGcFu8tv/tzab0B M+nU7CxFgTTY+ceJRDkwcxNS0JwaJsWcuJL1WzPtJUlfSJCsOzryYswRCSPfD28tCZel USyi9jNU9glGilwAvVEOUDz4T/ABs5Cezzdw7jA5zG7lbUMpkDZwoDE5YZMM/FH6OE6N /287p2J+5LDMOVxM58zeMrJCT6SGYZWGHejJ9ExfomzCEhucQcGnLSu8LkSBaeFb9gkB nJxA== 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=zOz2Sl6sETEspUjEfHGN0Doq9IKMqDh9com1ZKQ2ccQ=; fh=3T48dBajmuzuZqkU7TBWQfXJzDUTzUOImv3KVSY0ZcY=; b=uToJwVH54F0RlchbNgEFMXZo8sWNLsvpwZOZC+wf0jZ9TSUdREQ55QWDoiI+GMuLq9 e2DT5lgdb0lsCokF2cEm+ZCtRyKNPg33faBQQwZN5cJpw7/Da+8OfJM4NjjFD0hBhAjy rJkWmniviffBC8cZ5njdgWXbzsRT0DOR3oj+erVmq7GLat3p7ARWaq6mRIGVYf2TZmOR BVgG3yQXDT9CMpKFta7FFBZyyHScNPRSd71EwAUKjGzJFl53aZ+9YhmT5D6gHIyztqeU ze21zfLSDU0g0IQ4jk/XKnB/dXmtbMikGQFvGtaq2omgd8RHS6vuv/6IHV/pqBrup6Mi X/Lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=L84dIEOG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a15-20020a170902710f00b001b9d203659dsi5717820pll.14.2023.08.07.09.30.01; Mon, 07 Aug 2023 09:30:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=L84dIEOG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229478AbjHGPHl (ORCPT + 99 others); Mon, 7 Aug 2023 11:07:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229624AbjHGPHk (ORCPT ); Mon, 7 Aug 2023 11:07:40 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A637D1BC8; Mon, 7 Aug 2023 08:07:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=zOz2Sl6sETEspUjEfHGN0Doq9IKMqDh9com1ZKQ2ccQ=; b=L84dIEOGbchqXHanFmF61ALhon HTWLrRNFiG+i4OH+sZd6IzaTjVs+X08wTRaG4WbHVcPFUkStJ0VR4FmmWq3yvmQrDyiDSu7t8tALr exouGMBNLEgZ/RkcFRxuAgG0xD3zMAPNH33IuJHyyZ1AMUkM74PWftDLKPgQJdBaWtARbr/k+jncm 61WcqynycYOSanAel3SSyem+JxNGHNErJu5tPC6tLnrhAH0AtnGZ3OVSTZyRM/ZqW7pFALUCczdMN TLr6fnqW213OqECH5Z8FjGXOEYmfuFb0j+yJKe+QdQRho8yrtPhLfOk5fjTrtp5WfbXpmuwO669i4 EP0Y5+zA==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qT1oI-003w69-37; Mon, 07 Aug 2023 15:06:19 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 6B7E7300473; Mon, 7 Aug 2023 17:06:17 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 4840C2028F056; Mon, 7 Aug 2023 17:06:17 +0200 (CEST) Date: Mon, 7 Aug 2023 17:06:17 +0200 From: Peter Zijlstra To: Florian Weimer Cc: Marco Elver , Andrew Morton , Kees Cook , Guenter Roeck , Mark Rutland , Steven Rostedt , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Zenghui Yu , Catalin Marinas , Will Deacon , Nathan Chancellor , Nick Desaulniers , Tom Rix , Miguel Ojeda , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Dmitry Vyukov , Alexander Potapenko , kasan-dev@googlegroups.com, linux-toolchains@vger.kernel.org Subject: Re: [PATCH v2 1/3] compiler_types: Introduce the Clang __preserve_most function attribute Message-ID: <20230807150617.GB569857@hirez.programming.kicks-ass.net> References: <20230804090621.400-1-elver@google.com> <87il9rgjvw.fsf@oldenburg.str.redhat.com> <87pm3zf2qi.fsf@oldenburg.str.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87pm3zf2qi.fsf@oldenburg.str.redhat.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 07, 2023 at 02:36:53PM +0200, Florian Weimer wrote: > I think the GCC vs Clang thing is expected to work today, isn't it? > Using the Clang-based BPF tools with a GCC-compiled kernel requires a > matching ABI. Nope, all bets are off. There is no module ABI, in the widest possible sense. There's all sorts of subtle breakage, I don't remember the exact details, but IIRC building the kernel with a compiler that has asm-goto-output and modules with a compiler that doesn't have it gets you fireworks. We absolutely do even bother tracking any of this. There's also things like GCC plugins, they can randomly (literally in the case of struct randomization) change things around that isn't compatible with what the other compiler does -- or perhaps even a later version of the same compiler.