From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from albireo.enyo.de (albireo.enyo.de [37.24.231.21]) by sourceware.org (Postfix) with ESMTPS id 715B2385DC14 for ; Sat, 11 Apr 2020 10:01:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 715B2385DC14 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=deneb.enyo.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=fw@deneb.enyo.de Received: from [172.17.203.2] (helo=deneb.enyo.de) by albireo.enyo.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) id 1jNCwm-0004NS-7O; Sat, 11 Apr 2020 10:01:08 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.92) (envelope-from ) id 1jNCwm-0004dp-4n; Sat, 11 Apr 2020 12:01:08 +0200 From: Florian Weimer To: "H.J. Lu via Libc-alpha" Subject: Re: [PATCH] Add SYSCALL_LONG/SYSCALL_ULONG to pass long to syscall [BZ #25810] References: <20200410212249.3529885-1-hjl.tools@gmail.com> Date: Sat, 11 Apr 2020 12:01:08 +0200 In-Reply-To: <20200410212249.3529885-1-hjl.tools@gmail.com> (H. J. Lu via Libc-alpha's message of "Fri, 10 Apr 2020 14:22:49 -0700") Message-ID: <87k12m9w9n.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Sat, 11 Apr 2020 10:01:11 -0000 * H. J. Lu via Libc-alpha: > For inline syscalls, SYSCALL_LONG and SYSCALL_ULONG are introduced as > wrappers for long and unsigned long arguments. Do the arguments have the correct types? Then I think you can do the adjustment in the guts of INLINE_SYSCALL machinery, and we do not have to remember to annotate each and every call site with the new macros. Changes to sysdeps/unix/make-syscalls.sh and syscalls.list appear unavoidable, but I think tget should be made to the global Linux version, not the x32 variant, so that other targets with the same issue can benefit from them. (I have not reviewed the make-syscalls.sh changes.) The core problem is that the psABI has a different calling convention than the syscall interface, right? This looks like a cautionary tale that one should not do this.