Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2185799rdb; Tue, 20 Feb 2024 22:37:25 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW7kzN+0RTzLD96a9U4TwBRHMZIRtBY7F+KMRGOTKEFYdXHfeubywFyH4OL0SCfcdxfFEFl+czoGoOSQFx6lcry3r/PNpaw95JIR+eW9Q== X-Google-Smtp-Source: AGHT+IEHYxbYlEwqR9Nsz4pPrabPZAufgm1t1VUmyW8+ZtW/pphlRJYBeU1hCoIpr+nMA2lBQTzg X-Received: by 2002:a25:26ca:0:b0:dcb:bff0:72b with SMTP id m193-20020a2526ca000000b00dcbbff0072bmr13065278ybm.31.1708497445468; Tue, 20 Feb 2024 22:37:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708497445; cv=pass; d=google.com; s=arc-20160816; b=BfQL02YQC7DSTrGWrJPbuvMyvClovZ+K8I9ec0+f5keVikLNKVpk1KQYKWhg18bgHm tkmaEmzlvM2BEBBG+mFAVPB0MSUP6uQ9guo6CGorS6DeL5HgdQGFjdg93ssujhE0Suz7 B28u0QBxPMC6aXun5eyjHjRvccDcQZS+jJ/CIj0EWeA6tYhlxeeuceFLKV25x26CsO3f ZDfAWjZ/IHzdBY3QxiIjQt/bFFnoxLuGcQRQcITR1cV1B3F/X3vS8eskQ1es6Jt4j4Lc NehZUfrcjGyzAUvyJDwD0NTUFpb++VNevLPIRSF/7XBbqxqwd5JgI47tMsDWLItp9Wve uogw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:autocrypt:references :in-reply-to:date:cc:to:from:subject:message-id:dkim-signature; bh=KO4flMh+zrqxxuFBt5evlA5ead2rlCK560AURbnKrQU=; fh=fhV//srzOv8VbDPCaec7Ec617YHQdCHM/iyJQrw0Ngg=; b=r0dcUdBh79dmQWR/4GmS/gktR+lbiaVGvVXkeqQ9kncZ/mFiq8EdJ+THrHDowU91c7 ovA+1WlDflk01soOV12IMeG2L1DzCntFOzYFUo8yMHLjhaNk38m5NOjNaOguJprILgY4 aOxqdaxAWTCtp024TKxm/nPl1EUOPyaB4HiDjknKsE5xz6rsaQFMW/s95M9RxCfpt4uI SUV7VAhjU1/HiSK6PGkeecgV9Ot4dcz5zgCiFxf3HOeJx9It0APrgSiTcFpNd03EMget p9+NsMaA693JmtHjwmbD0HuV/4KpFTHowdjxi7chAVWjh+1KCvD0h0lQhRmz6KGDKovE nClQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b=dqrHdjnV; arc=pass (i=1 spf=pass spfdomain=xry111.site dkim=pass dkdomain=xry111.site dmarc=pass fromdomain=xry111.site); spf=pass (google.com: domain of linux-kernel+bounces-74153-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74153-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=xry111.site Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id o15-20020ac8698f000000b0042c7c50dbefsi9417914qtq.84.2024.02.20.22.37.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 22:37:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-74153-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=@xry111.site header.s=default header.b=dqrHdjnV; arc=pass (i=1 spf=pass spfdomain=xry111.site dkim=pass dkdomain=xry111.site dmarc=pass fromdomain=xry111.site); spf=pass (google.com: domain of linux-kernel+bounces-74153-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74153-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=xry111.site 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 3C5961C23C78 for ; Wed, 21 Feb 2024 06:37:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B1CB3364CC; Wed, 21 Feb 2024 06:37:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=xry111.site header.i=@xry111.site header.b="dqrHdjnV" Received: from xry111.site (xry111.site [89.208.246.23]) (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 660EE8464; Wed, 21 Feb 2024 06:37:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=89.208.246.23 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708497437; cv=none; b=W+g4sXcWtumS0ihpg0SOzSIQ7XwRpmMqicdc4N6kIa/VMlPWyVKvGon1xqi11KTkQychbDrDi/XrlQsUMGDNnsBSGYqhuHjEoiYVS+Pe4CC7+E0goQ7ayJ2xe9Mf6s+AstidfnVGD1wiv1z/gCfyn7fkCROUqVg4vc5n+t1kUG8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708497437; c=relaxed/simple; bh=cMPrnGzN+ogkgu90StJkUN75mH793GVfs2DsMEIqQBw=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=jsnKL3WlBjX4Ktkt52cgr0PN3v/EVTP0OHdK8+Aj2fI/231/KJzZVaWLaPx/QWhEONiuUu3hXyahpKoC7zWJW2DUHGw3AplU+k9Qtf9FrCS91wU/bEUvaFThsXl3lwzjvLjAKQ5B+Jfxcd5nnpknQltVYp2+DtJlcKKAW3Sdx94= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=xry111.site; spf=pass smtp.mailfrom=xry111.site; dkim=pass (1024-bit key) header.d=xry111.site header.i=@xry111.site header.b=dqrHdjnV; arc=none smtp.client-ip=89.208.246.23 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=xry111.site DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1708497085; bh=cMPrnGzN+ogkgu90StJkUN75mH793GVfs2DsMEIqQBw=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=dqrHdjnVqPyK89vn3kkQkzW2lVhL0QNWJ4PsjLlB/34Pos4Dx/HCA9zLywbogIoYM wb0KbhaC+Nnx9JmLkJi/CTmGiMfeN1G+2mEL1nzXBDurpWS2SMrP3YWWL0ZX0mjef7 k3Y+Oh+OKywb/R/09Sk/Y/ouTw3NXbGxySqMVGcg= Received: from [IPv6:240e:454:8210:4ef6:8084:b400:afd2:c12] (unknown [IPv6:240e:454:8210:4ef6:8084:b400:afd2:c12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 5D42366F2E; Wed, 21 Feb 2024 01:31:12 -0500 (EST) Message-ID: Subject: Re: Chromium sandbox on LoongArch and statx -- seccomp deep argument inspection again? From: Xi Ruoyao To: WANG Xuerui , linux-api@vger.kernel.org Cc: Arnd Bergmann , Christian Brauner , Kees Cook , Huacai Chen , Xuefeng Li , Jianmin Lv , Xiaotian Wu , WANG Rui , Miao Wang , Icenowy Zheng , "loongarch@lists.linux.dev" , linux-arch , Linux Kernel Mailing List Date: Wed, 21 Feb 2024 14:31:02 +0800 In-Reply-To: <599df4a3-47a4-49be-9c81-8e21ea1f988a@xen0n.name> References: <599df4a3-47a4-49be-9c81-8e21ea1f988a@xen0n.name> Autocrypt: addr=xry111@xry111.site; prefer-encrypt=mutual; keydata=mDMEYnkdPhYJKwYBBAHaRw8BAQdAsY+HvJs3EVKpwIu2gN89cQT/pnrbQtlvd6Yfq7egugi0HlhpIFJ1b3lhbyA8eHJ5MTExQHhyeTExMS5zaXRlPoiTBBMWCgA7FiEEkdD1djAfkk197dzorKrSDhnnEOMFAmJ5HT4CGwMFCwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQrKrSDhnnEOPHFgD8D9vUToTd1MF5bng9uPJq5y3DfpcxDp+LD3joA3U2TmwA/jZtN9xLH7CGDHeClKZK/ZYELotWfJsqRcthOIGjsdAPuDgEYnkdPhIKKwYBBAGXVQEFAQEHQG+HnNiPZseiBkzYBHwq/nN638o0NPwgYwH70wlKMZhRAwEIB4h4BBgWCgAgFiEEkdD1djAfkk197dzorKrSDhnnEOMFAmJ5HT4CGwwACgkQrKrSDhnnEOPjXgD/euD64cxwqDIqckUaisT3VCst11RcnO5iRHm6meNIwj0BALLmWplyi7beKrOlqKfuZtCLbiAPywGfCNg8LOTt4iMD Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.4 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Wed, 2024-02-21 at 14:09 +0800, WANG Xuerui wrote: > - just restore fstat and be done with it; > - add a flag to statx so we can do the equivalent of just fstat(fd,=20 > &out) with statx, and ensuring an error happens if path is not empty in= =20 > that case; It's worse than "just restore fstat" considering the performance. Read this thread: https://sourceware.org/pipermail/libc-alpha/2023-September/151320.html > - tackle the long-standing problem of seccomp deep argument inspection (!= ). Frankly I'm never a fan of syscall blocklisting. When I develop the Online Judge system for the programming contest training in Xidian University I deliberately avoid using seccomp. This thing is very likely to break innocent programs with some system change innocent as well (for example Glibc or libstdc++ update). --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University