Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1050316iob; Fri, 13 May 2022 21:07:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPt5Njbvg4ljNGvwxm051v9pd1DsW6F3FTQCyJ1BBT3o0QsZ0WgjjhqLrK13IHZZs2cZaE X-Received: by 2002:a5d:4e8f:0:b0:20c:dc46:9848 with SMTP id e15-20020a5d4e8f000000b0020cdc469848mr6205411wru.268.1652501251021; Fri, 13 May 2022 21:07:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652501251; cv=none; d=google.com; s=arc-20160816; b=GIlL8QlUDT3KjQwG2l9ZDD3C70McK/sYtUIq67k4+LbPShr91CFsjDd1ACZdEqzeYh FmQXycJSIt5gp8UyskqayBZ3fvlziBLME3U7wpIilRpjv2bx78GSFC/fsfyklsZc+fwf Aw7/cQ5kdNtEK3bpZxwka7u+9TIYY7+niuOFZa1TDvXN4COdFASOsjVd1koNm4HXMWmx A1cnQYOKnviYvDKu0afG5aKBhT1Xq1qje/T1QG9SF0r9eXVM9CwmiRIX4SMw4RWB2N5Z KTjMu7qfgEGqMrFFvM9VbLfUCqh8YAKBzIWnxuYpmmx2TAgkmGl/guaY+85RwewFvw6e NaEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=Dp/2ZdHmVEOr+Pb9jKObZsX02ShPr544c/Zw1GKP15Y=; b=k6VQAmFPml0pjEMPCQCymkmR6zCQeN8Md7xdboVobNCTcpkJHX/bjl3MIx1kmBP341 QlDEjyGR9L+LkvszL5TMXSolWowOIOdOAxk/AdeOmnBJH4hEgdOZQfAD5heqXXD01ML1 t6IzKa29ng/jAnCZ+w//M3GYEdmgDL4pfVaI9OtNR3NPVbQH/2JaloAOOHmx/pmGfwym UuASu6GLAysfdDPI4TOo3rzC4ksfDizG8WSLe4koxrqbbX87lezhYVYVXcmcAwWNj7TR P2Rl0v5FwwdzuETHBclZbCaXragF+jzOSA542A28PnXCxvBFGU/lfFTD2oIcCMyXREsH hCqw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id m20-20020a05600c3b1400b00393ed7486bdsi4572385wms.46.2022.05.13.21.07.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 21:07:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BC9904C3703; Fri, 13 May 2022 17:39:03 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350914AbiELHVo (ORCPT + 99 others); Thu, 12 May 2022 03:21:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350972AbiELHVg (ORCPT ); Thu, 12 May 2022 03:21:36 -0400 Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 030E42C10C; Thu, 12 May 2022 00:21:33 -0700 (PDT) Received: from mail-yb1-f173.google.com ([209.85.219.173]) by mrelayeu.kundenserver.de (mreue009 [213.165.67.97]) with ESMTPSA (Nemesis) id 1M2fDr-1nma1s3mxT-004CAf; Thu, 12 May 2022 09:21:32 +0200 Received: by mail-yb1-f173.google.com with SMTP id v59so8108983ybi.12; Thu, 12 May 2022 00:21:31 -0700 (PDT) X-Gm-Message-State: AOAM532m7bhsqYseq6xznso3H2LCu9NoI7jZNTium6OFgIlUc1uKAlzh 8EBUuGE/I+ym1RYNT6C2OEeWGFGN9qQIBgmT950= X-Received: by 2002:a25:cdc7:0:b0:648:f57d:c0ed with SMTP id d190-20020a25cdc7000000b00648f57dc0edmr26571261ybf.480.1652340090303; Thu, 12 May 2022 00:21:30 -0700 (PDT) MIME-Version: 1.0 References: <20220430090518.3127980-1-chenhuacai@loongson.cn> <20220430090518.3127980-14-chenhuacai@loongson.cn> <20220507121104.7soocpgoqkvwv3gc@wittgenstein> <20220509100058.vmrgn5fkk3ayt63v@wittgenstein> <20220511211231.GG7074@brightrain.aerifal.cx> In-Reply-To: <20220511211231.GG7074@brightrain.aerifal.cx> From: Arnd Bergmann Date: Thu, 12 May 2022 09:21:13 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [musl] Re: [PATCH V9 13/24] LoongArch: Add system call support To: musl@lists.openwall.com Cc: Arnd Bergmann , Christian Brauner , Huacai Chen , Huacai Chen , Andy Lutomirski , Thomas Gleixner , Peter Zijlstra , Andrew Morton , David Airlie , Jonathan Corbet , Linus Torvalds , linux-arch , "open list:DOCUMENTATION" , Linux Kernel Mailing List , Xuefeng Li , Yanteng Si , Guo Ren , Xuerui Wang , Jiaxun Yang , Linux API , GNU C Library Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:i280+8Sy6Wd4KatTn+RAGMJYY6bd4l+X6Q9g41wB0EzV5X30OO5 4F/E9HIw9rH3XsYfsgDXkv8wVRdhceF7dTDTOWUf+b6zI7JZrCl1L2eHs24DhecUt0pCEbQ ukUdWPXSgzAJX9qnvbH+D6DTGPfESuYxFs9qVcsdWMUjMnxleuzfZaG3jSfOI80dHooHwRL ANBM/AtA2m0eggx/7I5iA== X-UI-Out-Filterresults: notjunk:1;V03:K0:YhzFAH8uXKs=:InJy6ZucBe+dh6L7ckj11f WzhmjMZMraPlGFvP/YSsCywqfrtchUusNsSgyCdGxFrItN0vcro3UmkaEC68tugzAoBJBv9SV buDkGAGUv9mHuod3qaSDHjtBNWOHkg32FiZshWt71YhZMHkZqs6t3tFddTUMo6GvkjHCa3B3p 1NdQRyuHfL8sytpzGoni1yWoKkKf5AVF51+qQIwDrQuv/9KCTfIpChFshB19HptGnTNrt7gXc qRF6RA3EItn8/4dxLLYOZYUss6273Io/sWYp+akYxRkpENMtboT26fZwZsIX1JgXVESnkCdE6 mZDiejsgESRTx/P8lVkMf3x1eLvVSTiHLidh1IDaH8FDauWiJIrGB3mqe7wP+BKQM+D1DcJ5m aCcaTS88zzIQqnaX78s3QEA3IEozae65oXP0k882cEc4nyQPYaWEna6T6f0gbvEEMpN7LFO41 mhR43WsPBpVYS2G89k8l1Moq1+VJMvHOtVDCj6HG0hni8YSxoFkZfQzNfYUcagppRtFlDXfmj o8eomH+CvzOpFhB21d13cNvMmcf/3E0XtK6ipRbWZgRfQ0b9HvBl+r4z3mp/gzUT7vd2Pmbmq pjciDZRJlzngfCvuEXrfJVp6ojFbLOqaG91GZWqADrw4BKEoM2tOAsPBwVPV0fsovGHR9Gtjq 9FTVn1vErqylEXHGPNKTlEvuxZRmJK4Z93J0KVZiVb/6hUQO794P0IyfuvnobVUnd7FBgDbW1 a0v5Ca15cWEg8+Fpvq2OwqZMtNa1rl5IgoSyRNW7EBH81aQdyXDET2v4IPGxsSfOg+/x/LQI8 tctzVxDP3o0Imqw+j6YmjuZmYAJ/t0FceQ03cxuBiBRK2MyNvuPobmlgwVE/uAxrqEmoNsgM8 Mp21AeuMcp/vIrPJm6QQ== X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 11, 2022 at 11:12 PM Rich Felker wrote: > On Wed, May 11, 2022 at 09:11:56AM +0200, Arnd Bergmann wrote: > > On Mon, May 9, 2022 at 12:00 PM Christian Brauner wrote: > > ..... > > > I can try and move a poc for this up the todo list. > > > > > > Without an approach like this certain sandboxes will fallback to > > > ENOSYSing system calls they can't filter. This is a generic problem > > > though with clone3() being one promiment example. > > > > Thank you for the detailed reply. It sounds to me like this will eventually have > > to get solved anyway, so we could move ahead without clone() on loongarch, > > and just not have support for Chrome until this is fully solved. > > > > As both the glibc and musl ports are being proposed for inclusion right > > now, we should try to come to a decision so the libc ports can adjust if > > necessary. Adding both mailing lists to Cc here, the discussion is archived > > at [1]. > > > > Arnd > > > > [1] https://lore.kernel.org/linux-arch/20220509100058.vmrgn5fkk3ayt63v@wittgenstein/ > > Having read about the seccomp issue, I think it's a very strong > argument that __NR_clone should be kept permanently for all future > archs. Ok, let's keep clone() around for all architectures then. We should probably just remove the __ARCH_WANT_SYS_CLONE macro and build the code into the kernel unconditionally, but at the moment there are still private versions for ia64 and sparc with the same name as the generic version. Both are also still lacking support for clone3() and don't have anyone actively working on them. In this case, we probably don't need to change clone3() to allow the zero-length stack after all, and the wrapper that was added to the musl port should get removed again. For the other syscalls, I think the latest musl patches already dropped the old-style stat() implementation, but the glibc patches still have those and need to drop them as well to match what the kernel will get. Arnd