Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp249681lqp; Tue, 11 Jun 2024 03:29:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUOhKwQnugRIthvidvMC0/cmXmbXu3PJHE9if87AbX45qw+wOhp3Kj4Lu/oSsb+aUuasVSCUKX9NUEM5ESR/uOO+JwgY/tM2AYnLXL4Pg== X-Google-Smtp-Source: AGHT+IG/W0sH+W2xIlF/E26NYSVed6si2310Ct8LF69UHPhvgwGQU6+9m0DrZhyfdzGJPkQv1ghm X-Received: by 2002:a05:6214:590d:b0:6b0:77fb:8f16 with SMTP id 6a1803df08f44-6b077fb90eemr69168936d6.21.1718101797083; Tue, 11 Jun 2024 03:29:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718101797; cv=pass; d=google.com; s=arc-20160816; b=hofMwAAwX+R4kVNfl4WmeqejJSFXj04PzmbFmRAvjDwNtNDhJpxb8PY3wgBGUTtNKh 2kz9qKa4ZKX/ZOO+P13h8ybCXxq8aXgKMHcnBgtGwTaRqp/ThukdLpOmX8mFY/QHsW/T f//3Wuo9x3tRMfGaR/aP6R90DtlvPHggL6QYAvg+j7HrROYOS+xk8msHE0j0K4z8Tbkd JVnmqaRNcz2iDzU9sRKVQrNhUce/CWGbu8/LUC9un68/8btFadCFnViCSon0moUInKfV CKgzG3eezaVh0QxRBv7Sbo3LleIKJwNATkbF1Balu8RgubfzRbOGIOmQJ7luQf7UlLo2 BIQw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=6wzq7VC2XuuEUJqh/5cM4Mjyxfzpj5ElLH6Jckds3Pw=; fh=DOCYfy3JN1a8D2V7uBJ1ykDXTHTW9fQZ4IdpIuXfi+A=; b=BWx8XRW2kECqZgfnQNagjysCKDNoUPuxdfpOtJ9GWzQDw66XpUpsrn5lMdZn2VBXgy TUsU/tvA6oSQmeygHZttjWVKJIyE7bOrRpogwruUqxxE0nda8A/NKaihPJT6/x9uTKjZ Roi3V9NoOc0ypJx8yBUOyOK0KDTj4Emb6hqBJR6V7w6DMA7xPXTlu97tja68IBc8ygXC RvmCN0eToPrWd01c7DDVm0u3W3jwGnxETBS6V6wzA/F/+5XOLNcKsMTiqWraTxH/FzQ7 DXOVT5hxLb5hahNhrWjpBdPJdTyM82XauAFXW3LjRL1mokjeao5NghYEnu6yHWlurVlb CT0Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=CAehGxzI; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-209646-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-209646-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6b07a8988f3si50861676d6.531.2024.06.11.03.29.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 03:29:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-209646-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=CAehGxzI; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-209646-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-209646-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id C9C551C2252E for ; Tue, 11 Jun 2024 10:29:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 44FED175548; Tue, 11 Jun 2024 10:29:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="CAehGxzI" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) (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 102A754750; Tue, 11 Jun 2024 10:29:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.20 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718101790; cv=none; b=JnMYHR+BjZlzceqoiuoFFoJbDy4MeBCQsUW3azRVfqG93jj+loxwV8Guut113YWjjEztefg35n7TfI+/JC5dwdY4xoHxHe1NZ8NmStv+nAv8HB3cqWytDPPkU2ep81XBI5yr5dw18ljz6Bgp6OpTDaNTLBfqxgdJI6ZNaz8Z62Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718101790; c=relaxed/simple; bh=3IQbt4it4ImkcGkHuHt9E1rYBbY3+c+RxiD8Z9kk89A=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Dhknk6ewaP2gNlPEZF1+5BxllqAQdB1b0kXL7ti2D8pXJeccCBSG4zbfvr6+EGylqTuM3tfUmpECbfs5mlvvEBTNfLBpb32WPIy08aXjECodFf/ga+E85Hvq8GOIahqYx0It1g5uvnf3YfkFVkijFJfmJ3ImRVAPR1Sw1NDRg4Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=CAehGxzI; arc=none smtp.client-ip=198.175.65.20 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718101789; x=1749637789; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=3IQbt4it4ImkcGkHuHt9E1rYBbY3+c+RxiD8Z9kk89A=; b=CAehGxzIjW8BahYT0u42xj+eNSy6HGlV8uk8zX0/tuxBlHERjv15CVHC r6o7zccg/5gs3qsqbh6BrsZ2Ai+/HqRCyNB/vJ1A1mRwzJ25nvDGDCkwE QvufOgCCV4d+oTWFCyqrsvcm7iQUGl1v0r1ASok+A1+w2S1CQKLWdjEJ6 pr9zbKXy7IzWxHi8zUKV6FCcYxDczF75o4sv2NVuCLw8PThGkSaB6p6QR RSX+FOTxKar4lYT8XgId8wZL1kBiQHuVEq2CQYHPDRadGQY9yia5ToL0b jgJxoX/SP/hA7JKKzc2JFYKDgb/8KRvfhWsDaddMA+SStiPkk3PVhSp2t g==; X-CSE-ConnectionGUID: c61aBkcmRP6p5AJZHkMwmw== X-CSE-MsgGUID: sQaxj3EYRSypUXQlm4Sg2w== X-IronPort-AV: E=McAfee;i="6600,9927,11099"; a="14643048" X-IronPort-AV: E=Sophos;i="6.08,229,1712646000"; d="scan'208";a="14643048" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jun 2024 03:29:48 -0700 X-CSE-ConnectionGUID: qsHIMAWiSo6idkCelO7K9Q== X-CSE-MsgGUID: +hurPCjwTl+/jLW96WvImA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,229,1712646000"; d="scan'208";a="43949295" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa004.fm.intel.com with ESMTP; 11 Jun 2024 03:29:44 -0700 Received: by black.fi.intel.com (Postfix, from userid 1000) id F00B4268; Tue, 11 Jun 2024 13:29:42 +0300 (EEST) Date: Tue, 11 Jun 2024 13:29:42 +0300 From: "Kirill A. Shutemov" To: Kees Cook Cc: Thomas Gleixner , David Gow , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Sean Christopherson , Peter Zijlstra , Arnd Bergmann , Qiuxu Zhuo , Nadav Amit , Masahiro Yamada , Christian Brauner , David Howells , Uros Bizjak , linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH] x86/uaccess: Fix missed zeroing of ia32 u64 get_user() range checking Message-ID: References: <20240610210213.work.143-kees@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240610210213.work.143-kees@kernel.org> On Mon, Jun 10, 2024 at 02:02:27PM -0700, Kees Cook wrote: > When reworking the range checking for get_user(), the get_user_8() case > on 32-bit wasn't zeroing the high register. (The jump to bad_get_user_8 > was accidentally dropped.) Restore the correct error handling > destination (and rename the jump to using the expected ".L" prefix). Oh. My bad. Reviewed-by: Kirill A. Shutemov -- Kiryl Shutsemau / Kirill A. Shutemov