Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1313327rbb; Mon, 26 Feb 2024 05:47:47 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVZ+htBgSBa3W6xrQlNLW42Ku/iZO8B431MPVdMxLDoVVU6NRFU6EVFNsxHJOXDk9aPrd/xSVD9NtN7mK90kjw5INhALFxi4hVhsBvL0g== X-Google-Smtp-Source: AGHT+IE1N8noXgTu4ymqPnQqpHPf7z8ngxmG94oSMygFPGusqEV1Jp8AiLhkHyhqffFk6iXJRFuE X-Received: by 2002:a05:6102:1251:b0:471:e36c:daa2 with SMTP id p17-20020a056102125100b00471e36cdaa2mr3233332vsg.32.1708955267535; Mon, 26 Feb 2024 05:47:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708955267; cv=pass; d=google.com; s=arc-20160816; b=gN3o6eQ4P6j7FPY9wH51Q6Kz1UQYMujHB4hSA0kMkjjHk+1fBnk2SuNh693VVpeOKR ZCqogELEPIbD5Y8yrGraGqqXGc267DpHSHQ2rd7hwKQrjc1aEO2EHC6oJKQDA4pC6yZB BKhPDPfkrhLwcaTfqKmOY45MZV2M8bOMx5ZodFQga143hNGsR/LvnkF99U8EZ6Pl2JlS LX6LyJWZSPZU45Qxd0nAjewQUeX657eGSei262lDsQbRAa5fwk98apiu/EOW0/llEGSM uEBH7D/WRo3K6Iomick2fL6bqgElgYAOK/nKczSsMdLrZJ1Ozm78p41kxw0ORmwx5kbW /vwA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=subject:cc:to:from:date:references:in-reply-to:message-id :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:feedback-id:dkim-signature:dkim-signature; bh=a1PSlUV0gCw1dBpXCUcLNWCgd48YCMKuI96VEVuc7N4=; fh=SEU6v+WYnM0Cx8IS33A69+XJmlk7H3mEOKsmZPgq8Mc=; b=RapYv0+uplDZdZ0RP4XKVaxbXi0yAwHNET63sOy1QfJUEhC49TXUHF5/AZ0se/x6sy 49L6HJy7hYBUaBeb3Ee3tT/BhbD//4i3FUyRR631LGGbIYytn+B83UHJvnEfA1C5QXv3 FYM7wMdHwngg7FibqdHvH7Gm5Fw+nNlEacJ+J4oL7FA0mtZAlHrYE4u0I+BvCB15kP4D 8ZNLDMj1rzzRnFzsRbKDDmTa+HBSuZVV8y19RPcGStMO0ZGZ+a8fNttAM8udp7oApRsh +OUzWO+sk/JubZ/1BqmQ7nQ+2M+6wT1DgiemDBXmxULn1uAtNXPg1SLQz2sPINodoBcX pNvw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=acUP74UJ; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=mRfsMFat; arc=pass (i=1 spf=pass spfdomain=arndb.de dkim=pass dkdomain=arndb.de dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=arndb.de); spf=pass (google.com: domain of linux-kernel+bounces-81528-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81528-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id r12-20020ac85c8c000000b0042e820b790fsi2842652qta.269.2024.02.26.05.47.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 05:47:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-81528-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=acUP74UJ; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=mRfsMFat; arc=pass (i=1 spf=pass spfdomain=arndb.de dkim=pass dkdomain=arndb.de dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=arndb.de); spf=pass (google.com: domain of linux-kernel+bounces-81528-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81528-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 4BF491C27AD3 for ; Mon, 26 Feb 2024 13:47:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B44ED12AAC3; Mon, 26 Feb 2024 13:47:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="acUP74UJ"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="mRfsMFat" Received: from fout4-smtp.messagingengine.com (fout4-smtp.messagingengine.com [103.168.172.147]) (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 C27DF129A8F; Mon, 26 Feb 2024 13:47:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.147 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708955233; cv=none; b=Z6K3yXu5OadIBaPm6hHCu7Jvn+u3KI852ZzBEmMarrsS263kmFAma5tNrHkxJmFVbaC9bwSChLEPyIm7P+ZnIk9ZEUxNrx6Q4Hs3aWvaRqPcAXmanMJrVwepvIF9EmHXJC1VrCBPlx/PJaj6PiPcbpIZaP6PlVUZL4+woDkADkk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708955233; c=relaxed/simple; bh=eJjDKWoKh4iQaxPxySS728JDwYFeD/6g1kPRnb36634=; h=MIME-Version:Message-Id:In-Reply-To:References:Date:From:To:Cc: Subject:Content-Type; b=pF7zOiP42pNHrVZ8th0d6deUQekSaeOTK7W27GycrBpS9PZPKK2P/BfVDuUJyGC5TbcTt/hhCWkf0JNhBl+BgPlWvgYqPsvuo3KyRWYOV9zFgVKtm2ktE6JfcIRTN+MYtLjk1xcPAhXlekyhF0b77sBkD8QCwk7owwCffidy2f4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de; spf=pass smtp.mailfrom=arndb.de; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b=acUP74UJ; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=mRfsMFat; arc=none smtp.client-ip=103.168.172.147 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfout.nyi.internal (Postfix) with ESMTP id C35251380059; Mon, 26 Feb 2024 08:47:10 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Mon, 26 Feb 2024 08:47:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1708955230; x=1709041630; bh=a1PSlUV0gC w1dBpXCUcLNWCgd48YCMKuI96VEVuc7N4=; b=acUP74UJ+xsVl9E9SnUTFssEvv hMieduIVj8yuJdaGAFUU9SIfunAb0DIBLbXxah3BtLPd623MJbXj8RoL+/5TC82I NfXlT+Gmk+p8jARsKXRPJFHzzXSKB3r64IxkYjMLR0u9MOIRevWICrM/4b9STQQT 6m+/qUd0gCJhHULjvmNK3AZ3AWIVJWIB5X9ngcJQvN0ncL8cp1IM9lLoI0y1w3qn +3VTPJEWmdXF6pL+6oNiejiUpbnIoX6C36Ix7qilg4D7k/72s3Zj3SQ/4eaCTXi4 ZT2wcDAFPFG7tyQdac9xV9F1nng7ol98rjjXGxxVJ2hw6SpVu42Fimlsex2A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1708955230; x=1709041630; bh=a1PSlUV0gCw1dBpXCUcLNWCgd48Y CMKuI96VEVuc7N4=; b=mRfsMFatDH3J3fLd4ATDIdcusHzpzRiJJTs+97urpncz g5s+p7kls+KFvKm6+SvDHADqwMAK+rrQmaYp9SZ2VYutrviuTd00+iVN1/+gZpRD htk3Ejpk0X2KNHsbgOMZAmpgaHma4d1GE3gTnsaNm4k5b4d218xtWyLV/x5rqz8p HV1tCPLWaglNWl75jQMQZDmXMnZycxJUhrQnxZ9HWzurOSyddel6FcXzglVh72ky 1wsHZC+rJ4yiDucYzjRWmG+xwfy8O6LbpVajks++dDJFcEUwThtglS3IIMYjm2nB J3MxFKvYNSVldPZURXtWQlfpAcaPYeQuYEKJyVjqOA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrgedvgdehgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgesthdtredtreertdenucfhrhhomhepfdetrhhn ugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrghtth gvrhhnpeffheeugeetiefhgeethfejgfdtuefggeejleehjeeutefhfeeggefhkedtkeet ffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrrh hnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id D8D5DB6008D; Mon, 26 Feb 2024 08:47:09 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-153-g7e3bb84806-fm-20240215.007-g7e3bb848 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: In-Reply-To: <20240226-graustufen-hinsehen-6c578a744806@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> <20240226-graustufen-hinsehen-6c578a744806@brauner> Date: Mon, 26 Feb 2024 14:46:49 +0100 From: "Arnd Bergmann" To: "Christian Brauner" Cc: "Xi Ruoyao" , "Icenowy Zheng" , "Huacai Chen" , "WANG Xuerui" , 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? Content-Type: text/plain On Mon, Feb 26, 2024, at 14:32, Christian Brauner wrote: > On Mon, Feb 26, 2024 at 10:20:23AM +0100, Arnd Bergmann wrote: >> On Mon, Feb 26, 2024, at 08:09, Xi Ruoyao wrote: > > What this tells me without knowing the exact reason is that they thought > "Oh, if we just return ENOSYS then the workload or glibc will just > always be able to fallback to fstat() or fstatat()". Which ultimately is > the exact same thing that containers often assume. > > So really, just skipping on various system calls isn't going to work. > You can't just implement new system calls and forget about the rest > unless you know exactly what workloads your architecure will run on. > > Please implement fstat() or fstatat() and stop inventing hacks for > statx() to make weird sandboxing rules work, please. Do you mean we should add fstat64_time64() for all architectures then? Would use use the same structure layout as statx for this, the 64-bit version of the 'struct stat' layout from include/uapi/asm-generic/stat.h, or something new that solves the same problems? I definitely don't want to see a new time32 API added to mips64 and the 32-bit architectures, so the existing stat64 interface won't work as a statx replacement. Arnd