Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2179551ybe; Sat, 14 Sep 2019 09:19:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqzFkap23Fl8VUBaVk62WeypGsRC9wd/ZHPx20YnmwRzrNYccbUnn5YrRSNH4yYQ/iynwfDq X-Received: by 2002:a17:906:6403:: with SMTP id d3mr34421566ejm.99.1568477944178; Sat, 14 Sep 2019 09:19:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568477944; cv=none; d=google.com; s=arc-20160816; b=N8YrYdzGZK2OriKM40f9xqRGRijtT9sAKzblhLsiD7D4IFQi3tYCH+D2SY1ecyr5qC 4tC80ec0OUtLcdU/fwsHa0XjbTMVwKlSrqseWzIxZZx8K8NXa1uJRcougsyJAICDfN+o PPscbR8m2Dka81HsFrYvKVruIxi9UkSfLahq1N6w/SYX9+//KYjE6DSU2QrLDFVkYyoO TPIqr5UTujW5DRBtdjPQKznvKPvxDij78K7pVqC+/Y6lf8l5+wtP9r9j3yjSbEaOJVMg CRp6dE/8UbUizCUEI5bDQaOq/IOOdfnDQTZedNkeUX4DAf2VEyhgxDfnS6kqoOww0qEK 6UUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=NhResPHYpP/yD3FC59wZU8T2o/WD8zkKy81BphaMHGY=; b=SU5J7uzivj2OqmO95oiMTEOGTR01c//gtW1xGi+pftRXEJon7e4upGJQqs+PdGgvHG 4ojzEZhAgJsmjhkydrlIa9ucILhB9L6cTL7BK7fPaY6nWZ4490rHAFba9MM9AUXzfN+N dKqRnaSQsP4wXxusxXh5yEah/Oc1PrFW47AXxl8WGVgRc3dPLTRMxg74AwETSKQ/gJcm wlh5Sy95bnnZGxFZOr1iBZn43BZYgrjO8A/trzevV2rUTnhe2jlg0d9H0jQv20KNy2i+ AwEK/rcUCdWtkeI6mYrYrKkdzPza0+JzfySGL5OqVUvkwPnBr1+UZV0Au6eRi8zb65ec 37Lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=tsPo2G7q; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id sd1si16262166ejb.342.2019.09.14.09.18.40; Sat, 14 Sep 2019 09:19:04 -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=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=tsPo2G7q; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390814AbfINA2y (ORCPT + 99 others); Fri, 13 Sep 2019 20:28:54 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:34119 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388132AbfINA2y (ORCPT ); Fri, 13 Sep 2019 20:28:54 -0400 Received: by mail-pf1-f193.google.com with SMTP id b128so175418pfa.1 for ; Fri, 13 Sep 2019 17:28:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=NhResPHYpP/yD3FC59wZU8T2o/WD8zkKy81BphaMHGY=; b=tsPo2G7qPhUMN1GHLYb3GBYUf0TykP2AIuJHtThMvgCMQTL7f4KBIK2x9vyObnXBxU faNocgNcD8J8DZo8IpWost4dv6WY388zXivFpweU4Tik8V+uQgi0bW8Bq7EdyXjfE5UB zVLRqVxviFk2JsartqxT32sO6afsW3SgtVK0yGG+1wz+m9uTwlOK3otqXD2tk/dBIKqe BXixY50EgsKppXs+a0yh1P08/nLHcye7iI2oNmBmyycgEYE/JnBQppGhb6LABS4LrJd6 vQwIRBhhJP3yR+vWgvGvwScP8dOeIaL3R5FjDLOO4ke1lsNy7YdfSsabOWEWRsXucoaN E8wQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=NhResPHYpP/yD3FC59wZU8T2o/WD8zkKy81BphaMHGY=; b=ZlX2oSaJ7PJZTLUxycuG+iNn6YdcFgRvxHKIPq8BCCVrxBEJFcNWcfXrLZdTQ/k9lg fg5/BZwpX+6VcIiXtPZMRKfQQu+BLhG6CwGegSJneESPQu9PBRaAlIg6rmP1sB8fT7Wm nwTU/bQl/FujjZb905ydTigOgcaDZaJ6vpT+slCecOc6pN6NPSwQMGcOndnp0ztuR4Cg G5r6h29BWx1wlheTWxLhXgKhQN8LhHINo1kC6/w9K+hqCAsjvlM2Nccc41NfRBKw48HJ GNc61XSmJX+ccUYESWXkiokcs3faf0jupZKp+Zup/cvOxv/zH/b+n+dEagm0O3ddCk/j OUaw== X-Gm-Message-State: APjAAAWpl5qETHqF311xRv2OWXj9im71qVVoCYiXypmcFG/KvnbaFLif M2k04xPAmU1juM/8fpy7VplmAQ== X-Received: by 2002:a63:5c06:: with SMTP id q6mr46177252pgb.45.1568420933196; Fri, 13 Sep 2019 17:28:53 -0700 (PDT) Received: from ?IPv6:2600:1010:b020:48a9:95f9:675c:ced:7824? ([2600:1010:b020:48a9:95f9:675c:ced:7824]) by smtp.gmail.com with ESMTPSA id o22sm2602170pjq.21.2019.09.13.17.28.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Sep 2019 17:28:52 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) Subject: Re: [PATCH 4/4] x86: fix function types in COND_SYSCALL From: Andy Lutomirski X-Mailer: iPhone Mail (16G102) In-Reply-To: Date: Fri, 13 Sep 2019 17:28:51 -0700 Cc: Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , Kees Cook , X86 ML , LKML Content-Transfer-Encoding: quoted-printable Message-Id: References: <20190913210018.125266-1-samitolvanen@google.com> <20190913210018.125266-5-samitolvanen@google.com> To: Sami Tolvanen Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Sep 13, 2019, at 4:28 PM, Sami Tolvanen wrote= : >=20 >> On Fri, Sep 13, 2019 at 3:46 PM Andy Lutomirski wrote: >> Didn't you just fix the type of sys_ni_syscall? What am I missing here? >=20 > The other patch fixes indirect call type mismatches when the function > is called through the syscall table. However, cond_syscall creates an > alias to the actual sys_ni_syscall function defined in > kernel/sys_ni.c, which still has the wrong type. >=20 Ah, I get it. Doesn=E2=80=99t this cause a little bit of code bloat, though?= What if you made __x86_ni_syscall, etc (possibly using the *DEFINE_SYSCALL= 0 macros) and then generate weak aliases to those?=