Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1377328ybe; Fri, 13 Sep 2019 15:51:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqxp54/1HrrMBP7+aKdk4fAjNBCmeOtogGtez/mu88/x0bBzsBjwXg6Caie/IcDgk52m9Y9c X-Received: by 2002:a50:f78a:: with SMTP id h10mr696702edn.161.1568415101818; Fri, 13 Sep 2019 15:51:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568415101; cv=none; d=google.com; s=arc-20160816; b=zWVSzmGO52HlJ0o72DGOjev8N1zK2ri1874vlFxWU8Mah387Ha6cH1vrRT4EJtAAul F5p51MUwvG7N1FTw8cda5dOY7DLwoeEE8MzKjCxF0pkCKnCrrB7FxeJHGxoxctimkswi RVuATcxrqqWbY6a4fUOEoBakDvPHvn7/HlYQ5ns/+PCagYI0XJD292FXfvUs7juMi1gB yrwmDVQ4JsZlMSt7iO0I7sfyBT80LhOu2arb2xKRaNREWEhF+0o+0LzXXQ4LCR2q8ZL1 KRS8ez7V/fq9luwB4vte9c11S+Ij8m/a+W/T7h0hkRX8CAuiPrvpGSzhrXFzKhdA/eg4 ui6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=5kHcDT+/lMWk2Yfr7UlJgTmDMoGBPwYExpjJlYhvdQ8=; b=uWP3Gl0Jd0T1bnwRhoureG0YyAbqhChApb2GKW9XqelDBAvrqWqxlGTtJbzMJZnecU IY925LRBOi6G+ov64b322ns7gf+0PkMu722GJOlNEke9B2pT/XWtIJTXUHmGOeMSD3gB 4kaDmkeR4GbzFOHGm6yNg9djPLZdNpQ2FY7nA+WH4ghLqEmESExnUp5iZEqCJQlt0HAO bdNBbY83dhEHI3iWI6TUBymtCRSBKJofK/1A8gIJU2rlmhdzUN8E9P/Xe4eRafZh2iHB dvBk5FagAMrJr0D3274HX+9p1uEivJzbx642obYSpn3KpBSi9YixgpgAWgWHWZaGTt/d nlGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BoNjEodS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b50si17738302ede.28.2019.09.13.15.51.18; Fri, 13 Sep 2019 15:51:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BoNjEodS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404151AbfIMWqp (ORCPT + 99 others); Fri, 13 Sep 2019 18:46:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:54436 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404024AbfIMWqp (ORCPT ); Fri, 13 Sep 2019 18:46:45 -0400 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5C59B214DE for ; Fri, 13 Sep 2019 22:46:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1568414804; bh=AUQO8d9VJ4RK51BExwpPz05dLMQ/YQtJhgMZREkUBFk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=BoNjEodSpg4W5JjE5PixENkat8hk/T/F8P5COcIWRKMgKmRjkf5lQ69wkRqSYKbLl Y+fUQ0sW7u2XKQ3Qi69AlDyCbyxuno0guXJz0QlTre74OGxjKTKLN7SXUzC72WTRyk JGAeVci2sX4Zc1O7TVRcxZ5D3x48lv/t+1zgVK7c= Received: by mail-wm1-f43.google.com with SMTP id v17so3784501wml.4 for ; Fri, 13 Sep 2019 15:46:44 -0700 (PDT) X-Gm-Message-State: APjAAAWixg1TzNpk27Qc17h7iD7q69+I/RCu3R0r5B/lkYmmZhNljFS0 0pw8k1RdNFVD27uIOfJl3yaFyCwOX3reRHrTqDi5OQ== X-Received: by 2002:a1c:7a05:: with SMTP id v5mr4810174wmc.173.1568414802878; Fri, 13 Sep 2019 15:46:42 -0700 (PDT) MIME-Version: 1.0 References: <20190913210018.125266-1-samitolvanen@google.com> <20190913210018.125266-5-samitolvanen@google.com> In-Reply-To: <20190913210018.125266-5-samitolvanen@google.com> From: Andy Lutomirski Date: Fri, 13 Sep 2019 15:46:31 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 4/4] x86: fix function types in COND_SYSCALL To: Sami Tolvanen Cc: Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , Kees Cook , X86 ML , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 13, 2019 at 2:00 PM Sami Tolvanen wrote: > > Define a weak function in COND_SYSCALL instead of a weak alias to > sys_ni_syscall, which has an incompatible type. This fixes indirect > call mismatches with Control-Flow Integrity (CFI) checking. > Didn't you just fix the type of sys_ni_syscall? What am I missing here?