From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752803AbcFVPve (ORCPT ); Wed, 22 Jun 2016 11:51:34 -0400 Received: from foss.arm.com ([217.140.101.70]:48805 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751505AbcFVPvd (ORCPT ); Wed, 22 Jun 2016 11:51:33 -0400 Date: Wed, 22 Jun 2016 16:49:52 +0100 From: Catalin Marinas To: Yury Norov Cc: libc-alpha@sourceware.org, linux-kernel@vger.kernel.org, arnd@arndb.de, marcus.shawcroft@arm.com, philb@gnu.org, davem@davemloft.net, szabolcs.nagy@arm.com, maxim.kuvyrkov@linaro.org, joseph@codesourcery.com, pinskia@gmail.com, Andrew Pinski Subject: Re: [PATCH 11/27] [AARCH64] Syscalls for ILP32 are passed always via 64bit values. Message-ID: <20160622154951.GD6521@e104818-lin.cambridge.arm.com> References: <1466485631-3532-1-git-send-email-ynorov@caviumnetworks.com> <1466485631-3532-13-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1466485631-3532-13-git-send-email-ynorov@caviumnetworks.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 21, 2016 at 08:06:55AM +0300, Yury Norov wrote: > This patch adds support for ILP32 syscalls, sign and zero extending > where needed. Unlike LP64, pointers are 32bit and need to be zero > extended rather than the standard sign extend that the code would do. > We take advatage of ssize_t being long rather than int for ILP32, > to get this correct. Unless I misunderstand what this patch does, I thought we agreed that 32-bit arguments are passed as 32-bit values and it is the kernel's responsibility to zero or sign-extend the upper half (IOW, assume garbage just like the PCS ABI). We are still debating whether 64-bit values are passed in one or two registers but this doesn't change the situation of 32-bit values like pointers. -- Catalin