Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3447821imu; Mon, 19 Nov 2018 16:29:35 -0800 (PST) X-Google-Smtp-Source: AFSGD/UrTx3QwHus7v3o6i808F5YSjxYVbO2z40K7z/IkEEjy4vXr4hZcL4M1YklC8uhWshFWxBP X-Received: by 2002:a17:902:42e4:: with SMTP id h91mr5948030pld.18.1542673775812; Mon, 19 Nov 2018 16:29:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542673775; cv=none; d=google.com; s=arc-20160816; b=yD9mYkctNYGH5OL+H79lk8LlpLhSXv64H0C4gZJJQxot/o430z6zfW0qUSlMruI3JF e673hFcuM2v4rKpa5F7XxEmbETYyjQKNZ84h7HVpacumdIOd2+/VXD8hw7Kr88TiIgwX O4rR17jDvQobtjNRee6lzcnLbBsB8cjXgPecJMFnyg4qkp7klTzl4eXfs0GBzFK68KNR NSt4DcFa0bVPP69C3sTafnZsrPWxbaRsgJq9i2ik5WXqzoN2BnqjhQ3wig+LxWYmdtwi SxMQfGwytFCw0r1Nk3zy3vNOGnBi3eekTw4mR3LC1I2xO2KXWFQMPvastSmf6yBrLtZj 5djQ== 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=2o7N5gI2KpqW/7AJrPMzmTUMeZ/ht9WoS+3WbjePJgw=; b=S+3xXDlirefME/IpU7AHx2tAPZSs9oc3hBAKlDuQwMimCnUFuXhr1y5bSYyXqmoIhg 2hSQng6pqcdiRjx1VWin10KAzXy6HKawCNFPld9kfxszdQ4y2lLIEf9LAV2CdJ5Vb0VT Fkl2ThXtToyGibrCkImtW+q4j/5npKWcbe6xTf8qxrqFVnlP11DFxinSZG858fB7RslI 1vx7rhKsNRur8oF7v4XkpJrCdMxiCEo28x0B4mUpQpeik5BxxTVaZDRlm1HDSqJeUure Da8qMOc4ldspIa6MFO8E9pbT1o7SjuoH8QtvpYBy+GAooD6cD2GR1i1ldCUH7nj1YeSJ dH4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lGWdi3ry; 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 e7si2070020pgi.263.2018.11.19.16.29.20; Mon, 19 Nov 2018 16:29:35 -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=lGWdi3ry; 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 S1732517AbeKTKyV (ORCPT + 99 others); Tue, 20 Nov 2018 05:54:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:44894 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732399AbeKTKyU (ORCPT ); Tue, 20 Nov 2018 05:54:20 -0500 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 C3BB5214D9 for ; Tue, 20 Nov 2018 00:28:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542673683; bh=0ABb1ctiMdVdAeLz1lt0xVWTc4C/BrpsdWdE+q1CLOk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=lGWdi3ryESna+rIZjNw9nG3Re8wls5EtFRIaTpTSIthnYpda5y7RAoHMTIRijP5sA ZQfgeMNWlmkW+PIaXfJmUMZsSkyfipgy4py/aHT/Yuau0FGD1zOjZiOoPyHrjFPan3 fsmNmrDK342VhXBB/DOVr8/K3V0ewma0R4sMud9w= Received: by mail-wm1-f43.google.com with SMTP id g131so455838wmg.3 for ; Mon, 19 Nov 2018 16:28:02 -0800 (PST) X-Gm-Message-State: AGRZ1gKzdz5upgRqVQp7ThjpVEBH7oPAKlB9bzwYkprenozQIFjE1tK2 /Z9IuXZKiAg4yRS1/vuPtK9F4gY7nC+3XFOZYb2jAA== X-Received: by 2002:a1c:bb42:: with SMTP id l63-v6mr232252wmf.32.1542673681110; Mon, 19 Nov 2018 16:28:01 -0800 (PST) MIME-Version: 1.0 References: <20181119103241.5229-1-christian@brauner.io> <20181119103241.5229-3-christian@brauner.io> <20181119223954.GA4992@cisco> <20181119230709.GB4992@cisco> In-Reply-To: <20181119230709.GB4992@cisco> From: Andy Lutomirski Date: Mon, 19 Nov 2018 16:27:49 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v1 2/2] signal: add procfd_signal() syscall To: Tycho Andersen Cc: Daniel Colascione , Christian Brauner , "Eric W. Biederman" , LKML , "Serge E. Hallyn" , Jann Horn , Andrew Lutomirski , Andrew Morton , Oleg Nesterov , Aleksa Sarai , Al Viro , Linux FS Devel , Linux API , 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 Mon, Nov 19, 2018 at 3:07 PM Tycho Andersen wrote: > > These tools also care about ioctls. Adding a system call is a pain, > > but the solution is to make adding system calls less of a pain, not to > > permanently make the Linux ABI worse. > > For user-defined values of "worse" :) > I tend to agree with Tycho here. But I'm wondering if it might be worth considering a better ioctl. /me dons flame-proof hat We could do: long better_ioctl(int fd, u32 nr, const void *inbuf, size_t inlen, const void *outbuf, size_t outlen); and have a central table in the kernel listing all possible nr values along with which driver they belong to. We could have a sane signature and get rid of the nr collision problem. The major problem I see is that u32 isn't really enough to have a sane way to allow out-of-tree drivers to use this, and that we can't readily use anything bigger than u32 without indirection because we're out of syscall argument space.