From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 3191 invoked from network); 25 May 2022 20:55:24 -0000 Received: from 9front.inri.net (168.235.81.73) by inbox.vuxu.org with ESMTPUTF8; 25 May 2022 20:55:24 -0000 Received: from mail-pj1-f45.google.com ([209.85.216.45]) by 9front; Wed May 25 16:53:42 -0400 2022 Received: by mail-pj1-f45.google.com with SMTP id n10so20758703pjh.5 for <9front@9front.org>; Wed, 25 May 2022 13:53:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-transfer-encoding; bh=XYgzwNo73viDA5rPGGvnU9QUjNtPk1ufP2mP90FugbM=; b=aN/hiP588YMFTjtCq/2OGIlPN332IwrVt5ovSVyW0jZLwnIf8h2Y5UXn1ufaiBBmas /YPeT0rVPHMNE0QJ0xZEqFunuxM7FfEbgcBVOyoqVrQi5AfYuWS1sAu0DphZC6e23aSj jkexK1dQ4nxA4R/8VacKJ8MpRylqv4uwd++o+jwKJ1rEHgf7JIWG6GYIJhzKED3aR2Ju wpdPiBG2yCJhwjhRz8xh8vsTWeb0h/WYVfDPXMx7PfVLH6MI211CTpU7gNOALgwgiNd2 geSgjMEmMhcgnujQDGngBcO7WtOCmClKMQQ5hD3rUGxBR6o3iCU47uosHpvrYo9LyGlZ W71Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-transfer-encoding; bh=XYgzwNo73viDA5rPGGvnU9QUjNtPk1ufP2mP90FugbM=; b=wOTZTJYp8ekgZ/+/OR9GAkEAPNcU4aHMV7gP2tXvqE6PT1kDZkj5Oaz0yck97yxHp4 Di/SJqp2gR14qqY8IH+34LwQp+IsV7on23wEAwkEBQv60pKd3KjXTVPYdLvxtEfESxVW jDOWNRrngfkgdF4UPU6tbNA3h+TfuQUQ8pJpsOMEqK6JlPWgMBsAPR8NInBwGpAEUGc4 iCnlw50mm/k8gtBgP23wk8i7nvniRX9yZ8gjsb+Bh43IwO9Azb5gCqtk91waGe2qLsD6 CQpBR2K5qhTJcKsQo0nHdkHFiMoPGK5nkuSGt4WmfvcwbFRUT+pddEo/w3rJ5c64E3gL c9fQ== X-Gm-Message-State: AOAM530EewmayddJLvkNy/Qf2IthbshxK0gIhhl1adt9klJv1cIWcTa/ G0KwCXEevlY4oelecHzbRZwG8qQJ8XnPnFQzA2EQ0Lqy X-Google-Smtp-Source: ABdhPJwIEPIc97lxuKhe4m28YWEhH4yRPtCtlV1RLvB4+TX+3x3UeCqkjRzYV0uws+pz7x1wbF5PpImMrzGEI52210s= X-Received: by 2002:a17:902:f607:b0:161:5f47:b213 with SMTP id n7-20020a170902f60700b001615f47b213mr34085698plg.4.1653512018779; Wed, 25 May 2022 13:53:38 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:7300:64cc:b0:60:be3a:16c2 with HTTP; Wed, 25 May 2022 13:53:37 -0700 (PDT) In-Reply-To: <236719d3-a3de-fed1-bb31-8cae0ce16ea0@posixcafe.org> References: <360D31817B067471414B1C6D6DF6DF92@felloff.net> <236719d3-a3de-fed1-bb31-8cae0ce16ea0@posixcafe.org> From: hiro <23hiro@gmail.com> Date: Wed, 25 May 2022 22:53:37 +0200 Message-ID: To: 9front@9front.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: private API-oriented interface Subject: Re: [9front] [PATCH] Unmount to remove sharp devices. Reply-To: 9front@9front.org Precedence: bulk hating those runes. did you consider: chdev REGEXP could be the expanded version that allows driverA|driverB|driver[CDE] could also allow ! or -v for reversing the meaning. alternatively, why not use 0 instead of =E2=88=85 and '!' instead of =E2=88= =89 ? On 5/25/22, Jacob Moody wrote: > On 5/23/22 11:37, Jacob Moody wrote: >> There was some followup discussion for this on irc that I want to >> make sure is captured here: >> >> The command written to /dev/drivers will change to be one of: >> chdev DEVS >> chdev -DEVS > > I am having some second thoughts about this. While this syntax does > replicate > chmod, I am not entirely convinced that is what we want. When > being added to /sys/src/libauth/newns:/^nsop/ you have to special case > around > the ARGBEGIN block. Combine that with the fact that this decision would > lock > chdev(1) from ever accepting it's own flags, it felt like this was > introducing special case cruft. > Another consideration was what the syntax would be for removing all > drivers, > currently it would just be chdev '' or something similar. Which is fine b= ut > fat fingering that would be an annoying way to kill your current namespac= e. > These caveats may be entirely acceptable, but I was bothered enough to > attempt to find another way. > > Instead, I thought perhaps a rune prefix might be best. So you end up wit= h: > > chdev =E2=88=85 > for removing all drivers. > > chdev =E2=88=89DEVS > For removing just the specified drivers. > > chdev =E2=88=88DEVS > For removing access to all but the specified drivers. > > If a prefix is not given, =E2=88=88 is assumed. > > I did implement this idea, to field it for quirks, > but wanted to get some feedback before redoing man page changes. > > The downsides I see here are: > > 1. Deviation from chmod > 2. This steals three runes that could have otherwise been used for driver= s > 3. =E2=88=89 is a bit more involved to type then '-' > > With that said, I do much prefer this interface. Another option may be > to use rune prefixes, but also provide flag synonyms to the prefixes in > chdev(1). > > There is also an unrelated quirk I stumbled across when reviewing changes= . > As is currently, devshr checks for if the noattach has been set before > allowing a process to post a fd. I have changed this to check for access = to > devmnt/'#M', > which is what replicates the 'can mount' knob that RFNOMNT tweaks. This > seems fine to me, > but should we also replicate this check over in to devsrv for consistency= ? > > Thanks, > moody >