Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1285067rbb; Mon, 26 Feb 2024 04:58:59 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXfcWSWF9oHJkCDCS+NjOWoWnH5BtDkDm3Ba34wvH9e/zKbUCEWAeG596f/qTMNWnRqPs0eaDYU2HzGoiWBOoWAcxyFn0T4L7Z6sOEq/Q== X-Google-Smtp-Source: AGHT+IElG5e7iIAidRtN1EVty/1upqS9Itw9gBmE0RrxMVqH+Fsxu1z8Agwot6eAuxZ2GluDO26S X-Received: by 2002:a05:6871:4310:b0:21f:c7a8:e0ab with SMTP id lu16-20020a056871431000b0021fc7a8e0abmr6562035oab.49.1708952338894; Mon, 26 Feb 2024 04:58:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708952338; cv=pass; d=google.com; s=arc-20160816; b=d8duKEoaLJzJFW0g5+wMxyckYWk6k1vkw6hlmjyAPPOGC0YOsGbZCm8AJ3Cnj9HHKA SGGa1geXyLLDTqVozAdTwtJxGeEkmRg/XenNvxFyiMJtguEOv6rMp9msNdBqY8eoZSyZ lCsIAjGtEmEeVlLVB3+lVuFe/Jw47zJJ2XjN/utr4Ke94KNr/3RfNdEdGrj0bflX7+d/ WZcfTYBA9Ip75pACGyBfPrBebyC/2B1mRZz/MpLlgvyPeSb4mXv+YDSJn/uyr7AFBqsn g/i5BzhhUmtlXO87Iw+eiyU3i9Hm96eLzQrR+2+7PrrbVQ1NV9YJWUeSRc2tClek+Ui7 KlBg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=tOKnE3NFaC6nfqK8spdMN7z/0108aC2DNm9+OLsfZ1U=; fh=m5nsWGo8WqsCfr02upLSvLbGbKv898A3VaUhkgX/dKo=; b=BshRty5CHqeILqrPv2ZVfNwx93pLnb1/jugDkUGkaYFPfdSfWsMy0DWmku+kE6vEjF Rq9lCT4lHbPvfXog3aoMv2xDVutAyxpVT+bZZBns0G0ZLdDeJansJFbBbZSJmlEYuJjK aIWPF0orcwH2up3xbKyEd3pyi3alXkEBBR3NN6/+DTrl3/1zfswWv7DcJy2NlHbGmAaJ A0M8VnkTkBmDyDovmTZr/oADNZ/0sLiXE8G+ftMWttHRX1Lm3F5jmthax2JoECXe1n96 24sjV6Lc2fr5dmxNsUd5qZ4hOh8K7733rivPddYSgrfBAbki+TsAHFnwc0D2atPX5Ez3 d0aQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eK1+HtAK; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-81427-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81427-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id p6-20020a634f46000000b005c625d44bd5si3595884pgl.281.2024.02.26.04.58.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 04:58:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-81427-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eK1+HtAK; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-81427-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81427-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 7AA55285EB3 for ; Mon, 26 Feb 2024 12:58:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E33B180611; Mon, 26 Feb 2024 12:58:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="eK1+HtAK" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0832760860; Mon, 26 Feb 2024 12:58:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708952283; cv=none; b=CX83Haseh1tTacA4ZWB8l0l4s0jIpWa7cJnqjSWCvJzCjQgUE8bKfingE46xYw7Mby3ukCutoQNdDZbY3qQujY/oVjAHAOq7cz9r6GgDrsWMmwff1I5LtpagKzpt7nJA88gnMw6w7444/EAxgOKwey7ixxI0dtmS7VNlCexCFAE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708952283; c=relaxed/simple; bh=CjFIPUkkS+Qt/prOonASRo/mzH/YIL1BtI+UQyUBfKc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=TiQNbWh3fTiugEKjonYT9fkAHDYebZWi06DbMRLHJkcPrLc8TfpMfvEnwc5e/CDYkhJrLaSHOSeHB6CKdgDHK2uszuWmXsrCs95UKgrqq94KNhAj96lKEw8JpHojnovOvvJN4b4Ydl2w38hGXUk73Rxgn9WbNwx5ME7xoHTOpDU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=eK1+HtAK; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51F1CC433C7; Mon, 26 Feb 2024 12:57:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708952282; bh=CjFIPUkkS+Qt/prOonASRo/mzH/YIL1BtI+UQyUBfKc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eK1+HtAKtz9XUQba3ay0uwssAFD/GYurbGeO9bMf94k18HC61N+8sMd5TvNV9VTwO V17qqAOyGjMk+Y6Sh3PodVeaLk5X4F97eq7uO2cJLcIMrwrfBmdfy5kVisuE6ZMBOD a0bD3zSECVXQEH9OOXxWmq1iwRE7yYY6w0CfA7L/tttXQpLXeslaDfAVPlZAZw0PHj nIjP/hhlB4UhtRwY9mhTGnWVa7GTMBhhys4NdsyVHT0PmiZxxnBcAxQ5pqSZx5GjR2 LnvKcV1ODtrNB66zzhGzMsP5FFFsVu8CE8Jxhzt0G4Xpcs4t4b2SvG2umy+79defWF d4HERxjAX8vvg== Date: Mon, 26 Feb 2024 13:57:55 +0100 From: Christian Brauner To: Xi Ruoyao Cc: Arnd Bergmann , Icenowy Zheng , Huacai Chen , WANG Xuerui , Adhemerval Zanella , Rich Felker , linux-api@vger.kernel.org, Kees Cook , Xuefeng Li , Jianmin Lv , Xiaotian Wu , WANG Rui , Miao Wang , "loongarch@lists.linux.dev" , Linux-Arch , Linux Kernel Mailing List Subject: Re: Chromium sandbox on LoongArch and statx -- seccomp deep argument inspection again? Message-ID: <20240226-siegen-desolat-49d1e20ba2cd@brauner> References: <599df4a3-47a4-49be-9c81-8e21ea1f988a@xen0n.name> <24c47463f9b469bdc03e415d953d1ca926d83680.camel@xry111.site> <61c5b883762ba4f7fc5a89f539dcd6c8b13d8622.camel@icenowy.me> <3c396b7c-adec-4762-9584-5824f310bf7b@app.fastmail.com> <6f7a8e320f3c2bd5e9b704bb8d1f311714cd8644.camel@xry111.site> <6bf460d17b9f44326497ffb41e03363b112d6927.camel@xry111.site> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <6bf460d17b9f44326497ffb41e03363b112d6927.camel@xry111.site> On Mon, Feb 26, 2024 at 07:57:56PM +0800, Xi Ruoyao wrote: > On Mon, 2024-02-26 at 10:20 +0100, Arnd Bergmann wrote: > > /* snip */ > > > > > > Or maybe we can just introduce a new AT_something to make statx > > > completely ignore pathname but behave like AT_EMPTY_PATH + "". I'm not at all convinced about doing custom semantics for this. > > I think this is better than going back to fstat64_time64(), but > > it's still not great because > > > > - all the reserved flags on statx() are by definition incompatible > >   with existing kernels that return -EINVAL for any flag they do > >   not recognize. > > Oops, we are deeming passing undefined flags in "mask" undefined > behavior but not "flags", thus "wild software" may be relying on EINVAL > for invalid flags... We *might* make this new AT_xxx a bit in mask > instead of flags but it would be very dirty IMO. Uhm, no. AT_* flags have nothing to do in statx()'s mask argument at all.