From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BCB153B71D0 for ; Fri, 5 Jun 2026 09:33:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780651983; cv=none; b=tUqYNPtA5shxD7WnyrAWjjcInzVt9Q0Yf8d1F+/5tlZjXsIf+VscjSPm0lVaiuzIKWAZ5u5ekSJ53wWt75LkuEaaZ8UGJnfGK3cPKlMMico0VrYjLpP02JGypql/Rcv5Q/Zk4dwRUqlbOgTAjeImWbVNt1B+QtlZHjrsBNnjbgg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780651983; c=relaxed/simple; bh=zThWPMxmlIO7FwBAtHPdHCt4iP3Kn6Llw3/LtP9Fpxc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=KZacbcDZVHrvts6gJJFhjL8utR/P37mihKeVDw86wtRDYSx+h/nCCFzRn61rpbisuoZbSiXKHE+TWQN0HXMUIsMtFgcF7ZvkcQh1aZh9AgTxPCMdx3RsFniF09FPQTVgP5Ks6BbcfZJWIPQGOqLu/CXHIpS5AWgsQTiK9zNDO08= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=RQcuvkAf; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="RQcuvkAf" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1780651980; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=oH+D7ZeSOaE9PHP6jmKMDbjckrUXBE5O1ghWpaUmya0=; b=RQcuvkAfngqIcvsE5t1doKdjZIjObAz5kpdUJZRFF1XCQebctC04S3QkaDPpE5PYSumn0A AZ52BcPz3WL29pvvVIsniBByv7EumE02ifcFevGInIgcPIB7LzoCOWJjBhyp2rMIpcWyuw X743jJR/Q2UWkP7R4U401uSUru0D9Kw= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-537-rjGcsIZmNDGiRIUyLqMLGA-1; Fri, 05 Jun 2026 05:32:57 -0400 X-MC-Unique: rjGcsIZmNDGiRIUyLqMLGA-1 X-Mimecast-MFC-AGG-ID: rjGcsIZmNDGiRIUyLqMLGA_1780651974 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0FDE91956080; Fri, 5 Jun 2026 09:32:53 +0000 (UTC) Received: from oldenburg3.str.redhat.com (unknown [10.44.50.55]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9CF111955BC0; Fri, 5 Jun 2026 09:32:45 +0000 (UTC) From: Florian Weimer To: Linus Torvalds Cc: David Laight , Askar Safin , metze@samba.org, akpm@linux-foundation.org, axboe@kernel.dk, brauner@kernel.org, david@kernel.org, dhowells@redhat.com, hch@infradead.org, jack@suse.cz, linux-api@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, miklos@szeredi.hu, netdev@vger.kernel.org, patches@lists.linux.dev, pfalcato@suse.de, viro@zeniv.linux.org.uk, willy@infradead.org Subject: Re: [PATCH 2/3] vmsplice: make vmsplice a trivial wrapper for preadv2/pwritev2 In-Reply-To: (Linus Torvalds's message of "Thu, 4 Jun 2026 14:42:51 -0700") References: <20260603211736.755139-1-safinaskar@gmail.com> <20260604100609.6b37f500@pumpkin> <20260604183829.63c35fd9@pumpkin> <20260604223216.73468830@pumpkin> Date: Fri, 05 Jun 2026 11:32:43 +0200 Message-ID: <87se71jps4.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 * Linus Torvalds: > On Thu, 4 Jun 2026 at 14:32, David Laight wrote: >> >> I think riscv might sign extend 32bit values in 64bit registers. >> x86 and arm both zero extend. > > That's different. > > x86 really doesn't *care*. If the caller zero-extends or leaves high > bits set randomly, according to the x86 ABI that's perfectly fine: the > callee will only care about the low 32 bits. So the high bits are > simply not relevant for the ABI. Please note that Clang does not implement the x86-64 ABI and requires zero extension. We see increasing problems from that, now that we have more C code calling Rust code. (The other direction is generally fine.) Unfortunately, it's difficult to fix in LLVM. In the original x86-64 psABI, this was left unspecified by omission except for the special case of _Bool. However, Clang/LLVM gets the _Bool case wrong as well, so it's not just a matter of an unclear specification. This isn't really specific to x86-64. _Bool is simply not part of the ABI that is stable across compilers, a bit like bitfields in structs passed by value. Thanks, Florian