From nobody Thu Aug 26 15:50:01 2021 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2F310179D0B2 for ; Thu, 26 Aug 2021 15:50:13 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oi1-f175.google.com (mail-oi1-f175.google.com [209.85.167.175]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GwS3T0gWzz3m2J; Thu, 26 Aug 2021 15:50:13 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-oi1-f175.google.com with SMTP id r26so5494616oij.2; Thu, 26 Aug 2021 08:50:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WgY3W4a3IWNg51+RAQ+Y+k4YyIfeIRwgQTQ3Yv0uSHM=; b=ggXcxU9y9dEVETobtjnjoXd7BXn4nghdrvaW35E+jXocNn+3TS0F6mF3TOiMmNt1sS 6TAPud1UVr3BRUZVcJAjEX9d1+FKjm7JYnDZO3eRa1j9h9sHauUw/mKXGllMhGmePrDi vG5Ks4Y7aA/3GQoyy1jb1+XWfFWWPBlSe2FLt79UHH8H1yr/YPvwDdv3kVW/TUJnraRd TZz8LSgpxLSb2uLAj2vrvGeaa53L6DENnwepckKFODjd0J6AHa6w58ZzayGSuoXPQq1g AMzJvQdiR4k+rp9B4xbdahOL6FoDOB71wzgJ+U5OJypJJOPY6aaaFjubAXc8OQU1IoIj +XMw== X-Gm-Message-State: AOAM531RSD7IuspFNRoXwRy4QIlwqLESn+fdPz0Tx8l/A6E4xOR7m4xv G0Z4Y8+HdyvB2xI5wc1SeRRAZMYPZuu+XbGyw9MnTUNa X-Google-Smtp-Source: ABdhPJyByIEW0qjdRgGJU/6lAH4VfpGge9M5mp7Miype4hs6z2DpTsHaPL6FFVrMBEoB//6ws9ajO55hLwdigl7CmV4= X-Received: by 2002:a54:4812:: with SMTP id j18mr11364190oij.55.1629993012330; Thu, 26 Aug 2021 08:50:12 -0700 (PDT) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 References: <3e491c4f-0c86-a860-d0ed-b657ce653e74@FreeBSD.org> In-Reply-To: <3e491c4f-0c86-a860-d0ed-b657ce653e74@FreeBSD.org> From: Alan Somers Date: Thu, 26 Aug 2021 09:50:01 -0600 Message-ID: Subject: Re: ses ioctl API/ABI stability To: David Chisnall Cc: FreeBSD CURRENT Content-Type: multipart/alternative; boundary="0000000000007c83bd05ca785245" X-Rspamd-Queue-Id: 4GwS3T0gWzz3m2J X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: Y --0000000000007c83bd05ca785245 Content-Type: text/plain; charset="UTF-8" On Thu, Aug 26, 2021 at 2:21 AM David Chisnall wrote: > On 25/08/2021 22:19, Alan Somers wrote: > > We usually try to maintain backwards compatibility forever. But is that > > necessary for the ses(4) ioctls? There are several problems with them as > > currently defined. They lack type safety, lack automatic copyin/copyout > > handling, and one of them can overrun a user buffer. I would like to fix > > them, but adding backwards-compatibility versions would almost negate the > > benefit. Or, can we consider this to be an internal API, changeable at > > will, as long as sesutil's CLI remains the same? > > -Alan > > I've been pondering for a little while the possibility of using CUSE for > compat ioctls (particularly for jails, but potentially in general). > This might be a good candidate. If you rename ses and provide a CUSE > implementation of ses that runs in a Capsicum sandbox with access to the > new device then the worst that a type-safety bug can do is issue the > wrong ioctl (but not an invalid one, because the kernel will catch that > with the new interfaces). sesutil can move to the new interface and so > only things that want to directly talk to the old interface (for > example, sesutil in a FreeBSD 12 jail) will need to load the userspace > compat interface. > > David > Wild. I never thought about doing it that way. In this case though, ses isn't terribly useful for jails. I'm going to use imp's gone_in API instead, which I only discovered just this morning. --0000000000007c83bd05ca785245--