Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp5010384pxb; Thu, 14 Oct 2021 17:02:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/hL3mtOEQbDumTjRUN3Wpz56EV5bAUkcVIgoUsBKUFVktyUvu8iZdgt0mGQuMD+93lYaJ X-Received: by 2002:a17:906:17d5:: with SMTP id u21mr2794438eje.16.1634256169850; Thu, 14 Oct 2021 17:02:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634256169; cv=none; d=google.com; s=arc-20160816; b=y6WixrdSpuNnH7hH1D56ZWhE0ABP+yovOVWfV6xpdBm64WJAlNPjdGlDgIEq/rTlvk j2EhslCZcA5QPT8nU3bTjXnS2OaarIAYfl8rs1SjW6ypIX8nw9DE7wT6NphjttOXQuHY ZKFQZfqI7DYpxg0wVEjPFAIW7APmRc9/rmu19GZzQYG47HCGxWLCnUBqCgM3XsMXQ+Ae d5k8XmIpzbNHBIxk/LEkmZlZeZISHefp0JCgeQZymhGQFdfL5OeJCCjktSecAfTqnuqU Njg3kE6S1NAb3dcmqc4dDdZQSKOKpuXGukYmfYQqL2asyHRyXh/FjcW9stLxp3b0Oh9m UG5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=N65pshGMOSWSb7ytdKQXKm+0kQotiHH1u3g8XlS6SNw=; b=VgMssB/pLFKmmLBQQPwxLoKWwwtyHkwCZYq1ElF23UnFlbUaEOBWvY5Kyq7IJl/q9L XpfAvwTdXIezes3LC0QjTjkrr8kB0FxDetjYahPFt/iCuQTuSLmDktfw63AR3bQfBTYr w1mdi+i4OUbc8kaWW3h8z5CcbxTsHL2hII4tfg6u2RxPW6Tkw8QmOch4b+P92YkdrN6r Zv/nuBEbiDA7heQl+OdRIFgzlUTqNeuoTR7k1xUZhVNPJG1ZGFomWceyPB/eCHZ6hmni 4i2ID98gG8CkFR15pNYs2DpLsg4Vu7v2J5lNPNKgggq+U8Lp22q3UqtSiO7laTeUS5J0 ejVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=MurAIBhA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bi15si5673803edb.457.2021.10.14.17.02.24; Thu, 14 Oct 2021 17:02:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=MurAIBhA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232535AbhJNTDF (ORCPT + 99 others); Thu, 14 Oct 2021 15:03:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232468AbhJNTDE (ORCPT ); Thu, 14 Oct 2021 15:03:04 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60DB4C061570 for ; Thu, 14 Oct 2021 12:00:59 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id y15so31255817lfk.7 for ; Thu, 14 Oct 2021 12:00:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=N65pshGMOSWSb7ytdKQXKm+0kQotiHH1u3g8XlS6SNw=; b=MurAIBhAyWvppT1gcNnRicRI9zIENGp8xMMvTyFCuc/Ed0okX64APsncB/biZCuK/W YkbhQnbgtIVSbavZyNTA6MaswMyeo76MVVreGHF5lgKUd1Id+FiJuiUwqNeQ6gkiRgJK EGbBBUD90fzEUuim+zdEiYSIgfnlmIBH8/VqVRkiHMMu6EtzF/G6soZ8egpcYoDxiJgq eJ3lV7IewaWCU8j0LPzOhVLYCRGvzxL1KgHDj10F1AxTAyjKLXZRb7dyg8odmI7bsN6D KoGgXsWQ2CA3ZUwikn3n5UuyGQxdOq1v6hSIwdSlMlv5cKIvgZl0x0ihmPu8V09Bz+FO H6ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=N65pshGMOSWSb7ytdKQXKm+0kQotiHH1u3g8XlS6SNw=; b=haZutRc4rS9wcEDv4jW5+q4DBqClFXmo7kz7HUQRh6bytNAoS7P+LE5H4gRXUG+UZS lfW23yCVlL2uJqmsXlbIZAafMfWD/i1CugESz7h3eh56F5FkuGOy9CHYisWyBcQvOXTE gPIlGaQEPSOexS9gIt99BbaCau9L6ymZWIr5aWlLjFw6m9buVHMfa/7LvkyvMtS6fyMu c59wMBiF7aEdGi0wwBSNZfMJbhb9s226bkIc4zgDCPiMX6R/o8mCuSNwDUF59Un6Gk/T MJYXZUGGRSLRGyFRZwwzytLVDFnQngDwn5jVeP4Waz+gJ+tqJrL6ReQYp8NbZeSJDCqD inXQ== X-Gm-Message-State: AOAM533JMDGmpqRJ11j6mE+PjtKPSQAyfaPzmvk+7fV+mAvhU4hMxFFz CrqDIrGisy4hz6k5LILg7awU0BzLMlIPY/+bfoohbg== X-Received: by 2002:a05:6512:2284:: with SMTP id f4mr6823396lfu.489.1634238057524; Thu, 14 Oct 2021 12:00:57 -0700 (PDT) MIME-Version: 1.0 References: <20211013181658.1020262-1-samitolvanen@google.com> <20211013181658.1020262-10-samitolvanen@google.com> <202110140904.41B5183E@keescook> In-Reply-To: From: Nick Desaulniers Date: Thu, 14 Oct 2021 12:00:46 -0700 Message-ID: Subject: Re: [PATCH v5 09/15] x86: Use an opaque type for functions not callable from C To: Sami Tolvanen Cc: Borislav Petkov , Kees Cook , X86 ML , Josh Poimboeuf , Peter Zijlstra , Nathan Chancellor , Sedat Dilek , Steven Rostedt , linux-hardening@vger.kernel.org, LKML , llvm@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 14, 2021 at 11:24 AM Sami Tolvanen wrote: > > Anyway, I thought using a macro would make the code easier to > understand. I'm happy to rename it to something that makes more sense, > but also fine with switching to a simple extern u8[] if that's > preferable. Perhaps `extern u8 []`s with a comment that these symbols are functions that aren't meant to be called from C, only asm (or compiler generated code) would suffice? -- Thanks, ~Nick Desaulniers