Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp4216675pxb; Mon, 27 Sep 2021 11:52:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgP2UfAgZ8gYB5QOGsaEtulZPyryBsBKXQRlTRTB4FyS3qIBB5ZQ4eAUAo3usmmWp3ntCC X-Received: by 2002:a17:90b:14cb:: with SMTP id jz11mr653598pjb.111.1632768769620; Mon, 27 Sep 2021 11:52:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632768769; cv=none; d=google.com; s=arc-20160816; b=biDEkJkaBwihyZCB/YKuzBq/NHp5quoz+X/7Y0JSgyCxybAzTxTamGYOteoWYFOuNA ownxgUJ7GRt5baQjJNnRdb04x04z/xQxOOdJlsJJDzUCSjYiYS4FLYz5wZ/ujp34MzvY RIpHmWYtY/gtUTU3Hg/Ed5Cw+MdXKE0GTktYGWy0j2lxHB0EPi1KX6wscO6ql1pfRDqL hsXdZjSwU29AcrQV2/McrHGocf/fdnpyLEaq9UCoL66RgHPW+DMqv9yo0Fg3wrQUzPR5 ZsT9WLRpuK4yZAhep6kdiouFLlNhw7cPsUbhc9keXCLhRkCrHnbJRJYwWPcvsg/ZUjMl IYXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=e9qKCi3TeSZ7u8iFrrHJUmuKpIjXTK7k9xJIvqBA+sw=; b=YZVNEZr/Pc2BtBVs2U2020tlexL7syyGs5Z33nwOpJ5vu3Vq0PGwMqRJgcv0d09NK9 Q32ARIX+DvdTRoU+OVd+GrQA0SX6m8AWq7XnrSCKRE2i714DyxrgceFmlohhjtb3COmY 0mxMfoVX6Ey6yoSjbsdQ5fluXIp/ZakIjYXn1IOCHLzrPylS72Wv1Fz6Xb3bYOoooJ8j coThy/0PASBMo4g6g62tL9fWeioCXlzXGGaeBe3D2S+SEmSWeFtHGoNOG4jkJKLEnDfG DtgtxfA+8thRDB8ZZDpVGVO0qJdCkvgyJC7vyPNlXEaXVop0qoTolCQfICMNjHX5M7Jc g4kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KA0OIO2W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 5si22982788pgy.99.2021.09.27.11.52.36; Mon, 27 Sep 2021 11:52:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KA0OIO2W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236414AbhI0SxI (ORCPT + 99 others); Mon, 27 Sep 2021 14:53:08 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:57645 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236395AbhI0SxC (ORCPT ); Mon, 27 Sep 2021 14:53:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632768683; 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=e9qKCi3TeSZ7u8iFrrHJUmuKpIjXTK7k9xJIvqBA+sw=; b=KA0OIO2Wb4uTNUHD6xRBAJ9y/jdQ8VFdLUB5pNJ7N1Fuu/Vj2tY73YFqF0DMGLR9RimDQK oUNoflEkkz5DEz0IoXe0QsSMNroKf5QbLGuw5beNkheVXy2vm4iLnFrrpyA/CU7SOrYBsS AQysPPw3sTfMNm/ynkmLY6dsUvUQtjQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-155-_SCqgygdN2KWbwHATyj3fA-1; Mon, 27 Sep 2021 14:51:20 -0400 X-MC-Unique: _SCqgygdN2KWbwHATyj3fA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 86BBC1084681; Mon, 27 Sep 2021 18:51:17 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.176]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3E2D85D9D3; Mon, 27 Sep 2021 18:51:12 +0000 (UTC) From: Florian Weimer To: Richard Palethorpe Cc: x86@kernel.org, Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, Arnd Bergmann , rpalethorpe@richiejp.com, Dominik Brodowski , ltp@lists.linux.it Subject: Re: [PATCH] x86/entry/ia32: Ensure s32 is sign extended to s64 References: <20210927161955.28494-1-rpalethorpe@suse.com> Date: Mon, 27 Sep 2021 20:51:11 +0200 In-Reply-To: <20210927161955.28494-1-rpalethorpe@suse.com> (Richard Palethorpe's message of "Mon, 27 Sep 2021 17:19:55 +0100") Message-ID: <875yuletsw.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Richard Palethorpe: > +#define __SC_COMPAT_CAST(t, a) \ > + (__typeof(__builtin_choose_expr(__TYPE_IS_L(t), 0, 0U))) \ > + (unsigned int)a So this casts to int (triggering sign extension) if the type on the 64-bit kernel side is long? But not in other cases (unsigned long, pointer)? Just double-checking. Thanks, Florian