From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 11800 invoked from network); 7 Sep 2020 21:58:51 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 7 Sep 2020 21:58:51 -0000 Received: (qmail 24263 invoked by uid 550); 7 Sep 2020 21:58:49 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 24245 invoked from network); 7 Sep 2020 21:58:49 -0000 X-Gm-Message-State: AOAM533eu96hfHHY/hq4bksEIupEJN0LPBo85wCgRy9tQZVse3Grayoq ZuMh7NHBE526r2sO+h87pzjESDf32Am928mZD0s= X-Google-Smtp-Source: ABdhPJz3TASSuH+zdpLhHsXuitjZS9xhksz8HmcQ7KAT4zlmtf7YC6durv74a3yDHG8tv+PQNd7D4ZanLim9UzvZmeA= X-Received: by 2002:a0c:e38d:: with SMTP id a13mr21651097qvl.26.1599515916493; Mon, 07 Sep 2020 14:58:36 -0700 (PDT) MIME-Version: 1.0 References: <68b5e735-45be-413f-8153-cb97dd5967cd@www.fastmail.com> <20200907180636.GM3265@brightrain.aerifal.cx> <20200907214554.GO3265@brightrain.aerifal.cx> In-Reply-To: <20200907214554.GO3265@brightrain.aerifal.cx> From: Arnd Bergmann Date: Mon, 7 Sep 2020 23:58:20 +0200 X-Gmail-Original-Message-ID: Message-ID: To: musl@lists.openwall.com Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:I3ZZ5PqNFTfps2kYKm8g9DOxtmecmRkbU5Qb7zYDIYfeW1t5fsr /n+yo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v2K8HHBVlgoAbB3T Subject: Re: [musl] riscv32 v2 On Mon, Sep 7, 2020 at 11:46 PM Rich Felker wrote: > On Mon, Sep 07, 2020 at 11:35:45PM +0200, Arnd Bergmann wrote: > > On Mon, Sep 7, 2020 at 8:06 PM Rich Felker wrote: > > > On Mon, Sep 07, 2020 at 06:47:00AM -0400, Stefan O'Rear wrote: > > > > > > * Copy the IPC_TIME64 bits from arch/arm/bits to trigger the musl code > > > > for fixing time64 IPC_STAT results. I'm not super happy with this, > > > > maybe there should be a new mechanism in musl for fixing IPC_STAT for > > > > unconditionally-time64 architectures. > > > > > > If the riscv32 IPC syscalls don't actually provide in-place time64 but > > > require translation, I think it's fairly appropriate as-is. > > > > > > From the definitions in your patch, it looks like all the time fields > > > are fixed-word-order (little endian) and possibly not aligned, so it > > > seems like they can't be used in-place. Is this correct? > > > > Yes, rv32 uses the generic system call arguments, which are > > unfortunately defined this way. In retrospect I wish I had > > replaced the ipc syscalls with a sane version for time64, but at > > the time time it seemed as easy way out to use the fields that > > had been reserved for this purpose despite the broken > > byte order and alignment. > > Thanks for clarifying. BTW does passing IPC_64 produce an error on > rv32? If so, this is another advantage of keeping the IPC_TIME64 bit > -- it would catch programs bypassing libc and making the syscalls > directly. Yes, this is now the generic behavior for the split IPC syscalls (as opposed to sys_ipc on older architectures). The only architectures that parse the version in the split ipc syscalls are the ones that already had these and were interpreting IPC_64 before linux-5.1: alpha, arm32, microblaze, mips-n32, mips-n64, and xtensa. There are additional architectures that require passing IPC_64 in sys_ipc() but reject it in the split syscalls: m68k, mips-o32, powerpc, s390, sh, sparc, and x86. Arnd