Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B89C2C433FE for ; Fri, 29 Apr 2022 13:23:34 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7D80083F06; Fri, 29 Apr 2022 15:23:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="t8F0zsuA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EF52383F0F; Fri, 29 Apr 2022 15:23:30 +0200 (CEST) Received: from mail-qk1-x729.google.com (mail-qk1-x729.google.com [IPv6:2607:f8b0:4864:20::729]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1EE9A83F05 for ; Fri, 29 Apr 2022 15:23:28 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qk1-x729.google.com with SMTP id a22so2736978qkl.5 for ; Fri, 29 Apr 2022 06:23:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=w15PNtXPQ2zCExq71WWDjQoaUrbl5KaXA9AOKhAYzFY=; b=t8F0zsuAMjNTFdK1ZgHZQFIdw7zEtARfpHgBfBkTyKtQqXnn93vOoEp3y56p2RGqEd En0H9lDQrgaZ88xFMgwrCOyIH5JQzpcSSsHJyctR8OwI3eC2jsaY7Ew+i99D3yavxCno 3xj7SE/nOZEBawVDfcBt9GBQYh2zD+EcPOGvc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=w15PNtXPQ2zCExq71WWDjQoaUrbl5KaXA9AOKhAYzFY=; b=kr/Eijp+k+FTg1f2yGRa79SM1FNyJM0xABLdHIAxyGwYojKIXfauReR+c6eUa1T9xx J/n0DIve4XjE0eOr6Oq7dwpORv8n1hRqqZ+Ld+mbxuRO9zR4TcDWKTr6BjHbo1wp5G+F 3NEujEZLsk2Oil9Sd1w995BiE6IZ8hdcerMDodSUl2urzrhPbFsCn3RHc4tr4jWr5Goq 8sIH3lQ6Qkc+OnUZG8iEFPAPJ85eVZ4pukpXpWoJIT7ghjNPI/gQ0xAW0Pi3BMNhzsKx hA3tpOy4Rw8icAsVAEMOzX3T4KT4quKAb9TWspyhB+9Su3dCBRYNAJknI7gHAIqpgnb3 9ucw== X-Gm-Message-State: AOAM533RsNnz/XSBEm7/1xOYp4IQFOY+mk/JQUk0wPbr6Doy3h8+SM3j h3D1RXNNyR+oLxo39RJ6f0tAeeD1f2M36w== X-Google-Smtp-Source: ABdhPJxjdtOEGj719+N4ysTl25Nby1f/rPp1nQhsNseXTLM2YMs3rTw7vxTLsialenRwLVkh5HrHYg== X-Received: by 2002:a05:620a:4041:b0:69f:b9f7:e043 with SMTP id i1-20020a05620a404100b0069fb9f7e043mr973446qko.735.1651238606772; Fri, 29 Apr 2022 06:23:26 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-4500-41c8-9db8-25be-eadf.res6.spectrum.com. [2603:6081:7b01:4500:41c8:9db8:25be:eadf]) by smtp.gmail.com with ESMTPSA id a1-20020a05622a02c100b002f342ccc1c5sm1757344qtx.72.2022.04.29.06.23.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 06:23:25 -0700 (PDT) Date: Fri, 29 Apr 2022 09:23:24 -0400 From: Tom Rini To: Michael Nazzareno Trimarchi Cc: u-boot@lists.denx.de Subject: Re: root access and u-boot-test-hooks scripts Message-ID: <20220429132324.GP1182808@bill-the-cat> References: <20220429130350.GO1182808@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="TRkqPRiqIDKgfg/F" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean --TRkqPRiqIDKgfg/F Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 29, 2022 at 03:19:00PM +0200, Michael Nazzareno Trimarchi wrote: > Hi Tom >=20 > On Fri, Apr 29, 2022 at 3:04 PM Tom Rini wrote: > > > > Hey all, > > > > I'm looking for some feedback and ideas. Today, in our > > u-boot-test-hooks repository we have 2 cases that use sudo, imx_usb and >=20 > I'm not a super expert but is it sufficient to use udev and insert the ri= ght > on a group for a particular vendor and product id? You can do some mount-based rules there as well, but that gets trickier still to document / make portable. > > L4T-based flashing. Other places that may require root access, such as > > mounting a filesystem instead assume an /etc/fstab entry exists and has > > "user" as one of the attributes. >=20 > If you have a docker container --previlege should not be possible to mount > but stay in a different name space? I honestly don't know how well all of the tooling would work containerized, especially since we're talking about dynamically appearing/disappearing devices (ie we run sd-mux-ctrl to tell the sd-mux board via USB to present the SD card to us as a mass storage device, mount it via UUID, copy things, unmount, tell the sd-mux board to present it to the device under test now instead). --=20 Tom --TRkqPRiqIDKgfg/F Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmJr5skACgkQFHw5/5Y0 tyybzwwAuLksbXjdemSEX6rWRO4uPaKYNxJ0GSIjtCpmXKRFIxQHlZ09p1RA8IAR HMxc1AUThF+AYLGgpW55RB/ZkRFoKd28at2V5Sdlb06FbKWOVyZtJw7D7Ko8t2/N uIH/U69CZA3yAJJIypMMoVr/HHmO/dz2GmxgzhjLEtThJ5ZS76PhEW4frU6vCMnz xtfQCvsXpNPdRlbM8GfzEcCQj9YHVAzKPqJbTnEFEnZsb5cieUMt92CPAc1ieFP7 g52JZNq2MGGsigy5OcjGK9/ymTZa9zeTVeekvQ4JY9RMHTp5ChcT+rmr4j2EG0SU WNoZBH7HyJfNdjLWUZEZx/gbilxkdx/4nuJnTErfKe+28IVuwyVX9d94q3m/b14v zAACh0+By4/TtwzjC4qF8mGRCl+SyeONWcgJc2n97nc7ZqYGYvItoQMA0Xa/oWuM ZT/fkBESKqjI/78feA489kRV9RaZPFGxa79154o0OeRyEGpEuYiSASzTULD9i5Vi FXuJIJFU =Kwta -----END PGP SIGNATURE----- --TRkqPRiqIDKgfg/F--