Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751457AbbLUSjx (ORCPT ); Mon, 21 Dec 2015 13:39:53 -0500 Received: from vegas.theobroma-systems.com ([144.76.126.164]:56857 "EHLO mail.theobroma-systems.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751342AbbLUSjv convert rfc822-to-8bit (ORCPT ); Mon, 21 Dec 2015 13:39:51 -0500 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: [PATCH v6 12/20] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it From: "Dr. Philipp Tomsich" In-Reply-To: <2334903.IjsQ1BK3JF@wuerfel> Date: Mon, 21 Dec 2015 19:39:35 +0100 Cc: Catalin Marinas , Andrew Pinski , "Joseph S. Myers" , "Kapoor, Prasun" , broonie@kernel.org, Nathan Lynch , LKML , Alexander Graf , Alexey Klimov , Yury Norov , Jan Dakinevich , Andrew Pinski , David Daney , Andreas Schwab , "Zhangjian (Bamvor)" , "linux-arm-kernel@lists.infradead.org" , =?utf-8?Q?Christoph_M=C3=BCllner?= , Marcus Shawcroft Content-Transfer-Encoding: 8BIT Message-Id: <4753CD2F-914D-44D5-BD18-8DF94068315D@theobroma-systems.com> References: <1450215766-14765-1-git-send-email-ynorov@caviumnetworks.com> <20151218114219.GA2830@mbp> <2334903.IjsQ1BK3JF@wuerfel> To: Arnd Bergmann X-Mailer: Apple Mail (2.2104) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1176 Lines: 27 > On 18 Dec 2015, at 13:47, Arnd Bergmann wrote: > >> 3. Follow the PCS up to glibc but always pass syscall arguments in W >> registers, like AArch32 compat support (the least preferred option, >> the only advantage is a single wrapper for all syscalls but it would >> be doing unnecessary zeroing even for syscalls where it isn't needed) > > This would mean we cannot pass 64-bit arguments in registers, right? Note that there’s no 32bit registers (the ‘w’-form always refers to the lower 32bits of a 64bit register, with implicit zero-extension)… and load/store instructions always use the full base-register (‘x’-form) for address calculation. I.e. a load/store would inadvertently pickup “random garbage” in the upper 32bits, if no explicit zero-extension is applied. In other words: all zero-extensions for 32bit arguments should be explicit on the kernel side. Regards, Philipp. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/