From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.10]) by sourceware.org (Postfix) with ESMTPS id 10CF23851406 for ; Thu, 12 May 2022 07:21:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 10CF23851406 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=arndb.de Authentication-Results: sourceware.org; spf=none smtp.mailfrom=arndb.de Received: from mail-yb1-f177.google.com ([209.85.219.177]) by mrelayeu.kundenserver.de (mreue107 [213.165.67.113]) with ESMTPSA (Nemesis) id 1MOAmt-1nRBWU3OCf-00OZiw for ; Thu, 12 May 2022 09:21:32 +0200 Received: by mail-yb1-f177.google.com with SMTP id s30so8127812ybi.8 for ; Thu, 12 May 2022 00:21:31 -0700 (PDT) X-Gm-Message-State: AOAM533N44ekvwzFBssts1UImxdMxyFNoj0FaxrW5ali5uS40yN63vMH x1SqwriL88iuALDwUsp+Z2eHcQMt1dDnWlWuFWw= X-Google-Smtp-Source: ABdhPJx4WfEOUWv2L6bCmWT0mJB6dEDWkNIHboRAE66MHFC+PuQA7c4QPgkOpP2BhGDSQSBJfhNNN89Hg26ByytWHec= 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:K3zCml4CIaLtdReiweIGIaO7u56qevlSSctiA6i2BHILMUM2II1 3C3QtgFeAm+k14lXAvfhD05q0VsNjprnZlMBzb3xem8gUQ4zrVozmQtVPMqPunth2BDJ8xu /gVF8P0p0xDHw1ZjnZv2BylbV5GbJtnv+MUtS1BGnKyiLTwny5BV7aRn2Gru6ZTigxPp8ky jzFOi0wQ6uQ13C0gzMZAQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:qSTYIhS25pI=:Yb1I3bxWRxAuB+JyQnrhd9 U/veZkSFitDjv49PO9uOUB0hPYOYkcYBjcK0WgNVFtVArVtX5Eb74wTFA5MoX+QSj8JzzXOXv DeTymV/WatfEJH3XuXpj4So+SBDoZvXyR8rghoiWKoFgYfiD3BG+boMjg3GdVDqmRKgrYAWYQ i8RUTgwz5SmQ4qbRj2QRo6gdA18ayKJ3Et7fLVdzlPiO+R5rG8dyXgHv/Rcdp0QAxFZ4cvDif KoBYtscCvO1ciJJ6jla1mtGEeb/SGeCuPXckJ8FhfRcDsNXA7bL4bi1YX+nk6+NS1NxABj8s9 ybQBrXT1qdGheK9Rhcl0ah2WkYgNGEBQGg4w92UYK9vlUOyavWXv6n8EhKhYpYRkb1veJXuMW bPczOLS9NInth6YzdOIZpKh8lJ/HYWMjwgy5TZse9VaG10q/rzPL/ReBpqq+wa4pDWPOGj7tX 53gLUi8ziklG5FqyHfJ4tA3EKBBgSNeX+tzNUm8cJQarAGT09YNYGxot3LyQp9BRlPHBExps1 8XXUawGUXDrhNkZ7qwYg9/jEQ5YBpe+sMYDPazSRDOnAjukvaUR3iHd4CZGq39fIzHo2dFdsE JGdeyEwbdd/jRdzUPbUVm7jP2O2xCqz/23VgaoHULTEGhnM2kwCpcfa2k2BC8CU6I3gvNjB2b reDL5PJXBwcozCHe+txr+5+FEcb9GFkhAhGNh1AAbaCh94tpIN1ZNopR2+DbVTofyyRPOnUuQ Quixbp+rKzRVYg+PGA+ot7DSO9oZ+nMd03Y34kEEbHOZtJ45h8PxrFGkpdLSFK1wuwihv3M5i Zh2nwGjST+Mgt3PsIIRkdBBB7Pgpn1QiEuCXVDXGvr2RJ/00Rs= X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP, 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 server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 May 2022 07:21:35 -0000 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