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=-6.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, 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 0B11BC433DB for ; Mon, 25 Jan 2021 22:22:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CA19422511 for ; Mon, 25 Jan 2021 22:22:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732414AbhAYWWG (ORCPT ); Mon, 25 Jan 2021 17:22:06 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:38432 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732332AbhAYWV2 (ORCPT ); Mon, 25 Jan 2021 17:21:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611613202; 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: in-reply-to:in-reply-to:references:references; bh=m3GTxAXy/n7abTboCl2AAMZcR1+hfsyo/eH4M6+Glow=; b=AuSGjzy01EADXifc88twtpR3sJyRK434aQfiGmzVSekSIl+FaWZpYh74pNxdUQY0CM90/j 5x7anXMVYqu0fyeLM8t/WXDXCb03Hf1EQRqNKehyQcNXN02yv6JPjpcGVEPcsy3Hao5RvJ B5Se3L4GxT1dwpyKYqKtQBGVZt4nW1E= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-577-_TXAzB81MEO-MvEgpRfhAA-1; Mon, 25 Jan 2021 17:19:59 -0500 X-MC-Unique: _TXAzB81MEO-MvEgpRfhAA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8C327AFA83; Mon, 25 Jan 2021 22:19:57 +0000 (UTC) Received: from treble (ovpn-120-118.rdu2.redhat.com [10.10.120.118]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 74C7860C62; Mon, 25 Jan 2021 22:19:55 +0000 (UTC) Date: Mon, 25 Jan 2021 16:19:53 -0600 From: Josh Poimboeuf To: Kees Cook Cc: linux-kernel@vger.kernel.org, Masahiro Yamada , Michal Marek , linux-hardening@vger.kernel.org, linux-kbuild@vger.kernel.org, Peter Zijlstra , Justin Forbes , Ondrej Mosnacek Subject: Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules Message-ID: <20210125221953.wng3gk3qc32eahil@treble> References: <202101251401.F18409FDD1@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <202101251401.F18409FDD1@keescook> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 25, 2021 at 02:03:07PM -0800, Kees Cook wrote: > On Mon, Jan 25, 2021 at 02:42:10PM -0600, Josh Poimboeuf wrote: > > When a GCC version mismatch is detected, print a warning and disable the > > plugin. The only exception is the RANDSTRUCT plugin which needs all > > code to see the same struct layouts. In that case print an error. > > I prefer this patch as-is: only randstruct needs a hard failure. The > others likely work (in fact, randstruct likely works too). I'm curious about this last statement, why would randstruct likely work? Even struct module has '__randomize_layout', wouldn't basic module init go splat? -- Josh