Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3958522imu; Fri, 30 Nov 2018 08:37:20 -0800 (PST) X-Google-Smtp-Source: AFSGD/XTJSnpVr3vzclsqKWKrx8K/aXbWmjYxFMzMQcmMbNeKaRNub2xnWwBiktk3nM6cjmHWAuf X-Received: by 2002:a62:520b:: with SMTP id g11mr6382001pfb.53.1543595840723; Fri, 30 Nov 2018 08:37:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543595840; cv=none; d=google.com; s=arc-20160816; b=FMXZSnMfEsVYBKeFEeCVCzZhLZWHtCRkTWNlhwHTN/DbokMQDkJreRnFNIG1w13nmS LRqtwBXrkvh4YPoEHoBbfzZoqSR7GD4bdpewyEQlDP+y0sxmwwkiiWzLD4dwzLvxawjD kmQi3fr9+7mRbOvKE9MqzzAtEVhIBixJsNdI/bGfzyP/cYpp5StkiDfvsxud+7bTyrrZ UPeFj2G+wLqcFtAolutaWeDxrZSMkMeDRlgE331VnVV0VFCik2pgm0CwTZemaumqpCkX wY6ZH3Bs4DBwQWlPoJ4G09GWgUS2f24T2lSIzMvtqRwxBNl79pEBWVqdqWQpNKCo/44n x0Kg== 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=NUX4TvpYws6G6U5JD/8JtwEGwSzsGXUkEuMHMKSOCSI=; b=jeEk5gPTwH46jXkdD5WIG+oUPrEt6IFN9JBbKxhESdnuf0YTKtKe3S58G7t7+qYXZb z/uF0kvx6Z82jKQvWilVQYuMjAssscNXRrM5l1SAXhLiSR0Xy5uQhC+ZpdB0ZTH9jOMV r89hVskrWnZfg2/YWQoDTl81Ee0k7nw+RZYiovvqJVPnVPUbLKDmDsbk0qxFQqRKDy8T vuAI8GfN4XrOTFVKnOk93sxBriuTaNrwG9yKWlYKayZflabyvofseqCQe5O1psFKyLz3 w6E+qpcS15Nwd3CCBQ/7lrhJAl0OlLmutPxIzgDjfhMxNLz2Zl2tahE68V/0SAr7uJy7 2gzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=gNA8vZbO; 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 x186si5221840pgb.33.2018.11.30.08.37.05; Fri, 30 Nov 2018 08:37:20 -0800 (PST) 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=gNA8vZbO; 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 S1727556AbeLADpw (ORCPT + 99 others); Fri, 30 Nov 2018 22:45:52 -0500 Received: from mail.kernel.org ([198.145.29.99]:32820 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726830AbeLADpw (ORCPT ); Fri, 30 Nov 2018 22:45:52 -0500 Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) (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 84636214C1 for ; Fri, 30 Nov 2018 16:35:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543595759; bh=4Gac/Vhr2TC3XRK5vvjmEJW6+Ymq3jRJY1l0TE4OGQE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=gNA8vZbONlpPsLbIejimZ3mdYbXqWHekUsW0E69IsZOz6vmYzUvZCavKEkwgCVUTC Nns+tlX1FmCIsVx1twEmyhu3sJvMoDHOyDG2XXsY1jvUFh4csOUE1VYRqVnVlxWcEt mxYKyikHsVsv+vl3s2lEKJxrC+lSucMjF7eKnWUg= Received: by mail-wr1-f54.google.com with SMTP id x10so5874289wrs.8 for ; Fri, 30 Nov 2018 08:35:59 -0800 (PST) X-Gm-Message-State: AA+aEWaDRNltB1pac1vrvhbIptq7+B+lCi3s5Y7A2td48LmtMqpjyepO IDezaf6DTSeeXAfJ7Udg5iTM1sZLLkNtY0oH6C2Y5g== X-Received: by 2002:adf:8323:: with SMTP id 32mr5328377wrd.176.1543595757875; Fri, 30 Nov 2018 08:35:57 -0800 (PST) MIME-Version: 1.0 References: <20181120105124.14733-1-christian@brauner.io> <87in0g5aqo.fsf@oldenburg.str.redhat.com> <36323361-90BD-41AF-AB5B-EE0D7BA02C21@amacapital.net> <993B98AC-51DF-4131-AF7F-7DA2A7F485F1@brauner.io> <20181129195551.woe2bl3z3yaysqb6@brauner.io> <6E21165F-2C76-4877-ABD9-0C86D55FD6AA@amacapital.net> <87y39b2lm2.fsf@xmission.com> <20181130065606.kmilbbq46oeycjp5@brauner.io> In-Reply-To: From: Andy Lutomirski Date: Fri, 30 Nov 2018 08:35:45 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] signal: add procfd_signal() syscall To: Arnd Bergmann Cc: Christian Brauner , "Eric W. Biederman" , Andrew Lutomirski , Florian Weimer , LKML , "Serge E. Hallyn" , Jann Horn , Andrew Morton , Oleg Nesterov , Aleksa Sarai , Al Viro , Linux FS Devel , Linux API , Daniel Colascione , Tim Murray , linux-man , Kees Cook 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, Nov 30, 2018 at 3:41 AM Arnd Bergmann wrote: > siginfo_t as it is now still has a number of other downsides, and Andy in > particular didn't like the idea of having three new variants on x86 > (depending on how you count). His alternative suggestion of having > a single syscall entry point that takes a 'signfo_t __user *' but interprets > it as compat_siginfo depending on in_compat_syscall()/in_x32_syscall() > should work correctly, but feels wrong to me, or at least inconsistent > with how we do this elsewhere. If everyone else is okay with it, I can get on board with three variants on x86. What I can't get on board with is *five* variants on x86, which would be: procfd_signal via int80 / the 32-bit vDSO: the ia32 structure syscall64 with nr == 335 (presumably): 64-bit syscall64 with nr == 548 | 0x40000000: x32 syscall64 with nr == 548: 64-bit entry but in_compat_syscall() == true, behavior is arbitrary syscall64 with nr == 335 | 0x40000000: x32 entry, but in_compat_syscall() == false, behavior is arbitrary This mess isn't really Christian's fault -- it's been there for a while, but it's awful and I don't think we want to perpetuate it. Obviously, I'd prefer a variant where the structure that's passed in is always the same. BTW, do we consider siginfo_t to be extensible? If so, and if we pass in a pointer, presumably we should pass a length as well.