From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by sourceware.org (Postfix) with ESMTPS id 2E04D385829F for ; Fri, 5 Aug 2022 17:28:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2E04D385829F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dabbelt.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=dabbelt.com Received: by mail-pg1-x52b.google.com with SMTP id r186so3226235pgr.2 for ; Fri, 05 Aug 2022 10:28:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:from:to:cc; bh=22PYo+2iQXUem+fXPgR165xanaH7tjgSazoxuHywaeY=; b=7gI++Nvawwr5X1t7E8K1BF/gKq+U1mHvEd9X2Mwn0PvFl45NN0npzF3zzSgNpP2KNA LFIEArf2XT+T9HJsBj6K70Z1PjlmYA9fz9BkYIafti6ZSSQg1XLK9B686O7PHPqR024x sZ5aCEXYmL8wdeF/ssDISzbgUannoWfM5bzyVOqYxjcE9TT5tY86kVXCHDEFW+qmAMd3 zhtc1InBpHxXdgMQ595gM7LBWWkDzzAc08SI45WCtiIbnuaH1uxp+Sf0kGtuJZcTtJ+J jEhagzD1rqqzuIugmlHhUywY6/TLIwPz/fetv91DpK2QvlidDxA3f7jL5a00V4hMo34m KW3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:x-gm-message-state:from:to:cc; bh=22PYo+2iQXUem+fXPgR165xanaH7tjgSazoxuHywaeY=; b=3YcE1osgJoWJNy54GlYxq/HE6r698OeRlgRceajURSjubCCjrYTGYOKjHRGhGZI2zF e8cfx8tcAhR6qUiUEXxrUTNzIR6gmFUNtyG5gv+davsDqBV/7zIRKYrl+XtaJve2fSlV S0VCeSUpe4M6PynwPAn9ilbguG/nv36rhjW1/G89LzvmKqxSRNwS6Hm0WGxpv19QyfLA RWW9bvFwZl274NZ2rFjO4dzlCnAvkv/Vp4C4A4NiVOiqZHDDwVNOxh2eVyhfC07WXfFq h0xVl7slTe715QFFvCLjzGJ+nfwkk/nBUaNZ6a6kY2XcJ5qTCbTJJdCTh+tMdkiZdSpp MUaA== X-Gm-Message-State: ACgBeo0QFl2575HL1zxFXGJoRHQ7kSWBavdebFX+rmemqY12gV4d0F1g cDv8feOKmR3F4b0wfM/B71jP8U9shaRcvg== X-Google-Smtp-Source: AA6agR6stQRsMG9aQl8cJm0Z2Ry3DWFfCGAx8EiVuUpU7zkPZYu9c44vw+dTEN6bSBp3xGMyCkZVtw== X-Received: by 2002:a05:6a00:2282:b0:52b:bab:16a4 with SMTP id f2-20020a056a00228200b0052b0bab16a4mr7730662pfe.17.1659720523972; Fri, 05 Aug 2022 10:28:43 -0700 (PDT) Received: from localhost (76-210-143-223.lightspeed.sntcca.sbcglobal.net. [76.210.143.223]) by smtp.gmail.com with ESMTPSA id mp6-20020a17090b190600b001f24dc56b72sm3283294pjb.23.2022.08.05.10.28.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Aug 2022 10:28:42 -0700 (PDT) Date: Fri, 05 Aug 2022 10:28:42 -0700 (PDT) X-Google-Original-Date: Fri, 05 Aug 2022 10:28:41 PDT (-0700) Subject: Re: Update syscall lists for Linux 5.19 In-Reply-To: CC: joseph@codesourcery.com, libc-alpha@sourceware.org From: Palmer Dabbelt To: aurelien@aurel32.net Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham 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: Fri, 05 Aug 2022 17:28:47 -0000 On Fri, 05 Aug 2022 07:42:48 PDT (-0700), aurelien@aurel32.net wrote: > On 2022-08-03 17:36, Palmer Dabbelt wrote: >> On Tue, 02 Aug 2022 12:23:42 PDT (-0700), joseph@codesourcery.com wrote: >> > Linux 5.19 has no new syscalls, but enables memfd_secret in the uapi >> > headers for RISC-V. Update the version number in syscall-names.list >> > to reflect that it is still current for 5.19 and regenerate the >> > arch-syscall.h headers with build-many-glibcs.py update-syscalls. >> > >> > Tested with build-many-glibcs.py. >> > >> > diff --git a/sysdeps/unix/sysv/linux/riscv/rv32/arch-syscall.h b/sysdeps/unix/sysv/linux/riscv/rv32/arch-syscall.h >> > index bf4be80..202520e 100644 >> > --- a/sysdeps/unix/sysv/linux/riscv/rv32/arch-syscall.h >> > +++ b/sysdeps/unix/sysv/linux/riscv/rv32/arch-syscall.h >> > @@ -122,6 +122,7 @@ >> > #define __NR_mbind 235 >> > #define __NR_membarrier 283 >> > #define __NR_memfd_create 279 >> > +#define __NR_memfd_secret 447 >> > #define __NR_migrate_pages 238 >> > #define __NR_mincore 232 >> > #define __NR_mkdirat 34 >> > diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h b/sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h >> > index d656aed..4e65f33 100644 >> > --- a/sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h >> > +++ b/sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h >> > @@ -127,6 +127,7 @@ >> > #define __NR_mbind 235 >> > #define __NR_membarrier 283 >> > #define __NR_memfd_create 279 >> > +#define __NR_memfd_secret 447 >> > #define __NR_migrate_pages 238 >> > #define __NR_mincore 232 >> > #define __NR_mkdirat 34 >> > diff --git a/sysdeps/unix/sysv/linux/syscall-names.list b/sysdeps/unix/sysv/linux/syscall-names.list >> > index 6c7b2f7..028ad31 100644 >> > --- a/sysdeps/unix/sysv/linux/syscall-names.list >> > +++ b/sysdeps/unix/sysv/linux/syscall-names.list >> > @@ -21,8 +21,8 @@ >> > # This file can list all potential system calls. The names are only >> > # used if the installed kernel headers also provide them. >> > >> > -# The list of system calls is current as of Linux 5.18. >> > -kernel 5.18 >> > +# The list of system calls is current as of Linux 5.19. >> > +kernel 5.19 >> > >> > FAST_atomic_update >> > FAST_cmpxchg >> >> Thanks, this was just a bug in the uapi headers: the syscall itself was has >> been implemented since 7bb7f2ac24a0 ("arch, mm: wire up memfd_secret system >> call where relevant"), which IIUC was first released in 5.14. The fix >> should get backported. > > It got backported in 5.18.3. Sorry if that was the wrong thing to do, I thought this was safe because it was just making the number availiable in the headers. >> I don't think any of that matters so much here, though. > > The backport causes the misc/tst-glibcsyscalls test to fail on the > stable branches (tested on 2.35, but I guess it's the same on 2.36): > > | original exit status 1 > | error: kernel syscall 'memfd_secret' (447) not known to glibc > | info: glibc tables are based on kernel version 5.18 > | info: installed kernel headers are version 5.18 > > So I wonder if we should just backport this commit to the stable > branches to fix this failure. That works for me. Another option would be to revert the backport in Linux. Either way we're stuck with some combination of releases that fail, so I'm not sure which is better. Sorry for the headaches!