Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751455AbdIOQMr (ORCPT ); Fri, 15 Sep 2017 12:12:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32938 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751201AbdIOQMq (ORCPT ); Fri, 15 Sep 2017 12:12:46 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 45591883B9 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=oleg@redhat.com Date: Fri, 15 Sep 2017 18:12:43 +0200 From: Oleg Nesterov To: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Andy Lutomirski , Eugene Syromyatnikov , linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86/asm/64: do not clear high 32 bits of syscall number when CONFIG_X86_X32=y Message-ID: <20170915161243.GA778@redhat.com> References: <20170912225756.GA19364@altlinux.org> <20170913164921.GA14063@redhat.com> <20170914202114.GA16764@altlinux.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170914202114.GA16764@altlinux.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 15 Sep 2017 16:12:46 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 458 Lines: 17 On 09/14, Dmitry V. Levin wrote: > > On Wed, Sep 13, 2017 at 06:49:21PM +0200, Oleg Nesterov wrote: > > > do_syscall_64() does "nr & __SYSCALL_MASK" unconditionally, > > yes > > > this clears the upper bits, no? > > Why? As "nr" is of type "unsigned long" and __SYSCALL_MASK is either > (~(__X32_SYSCALL_BIT)) or (~0), that is, an integer with the sign bit set, Yes, thanks for correcting me, it is "int" but somehow I thought it is "unsigned int". Oleg.