From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE8A2CCA47A for ; Thu, 16 Jun 2022 16:30:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 226996B009A; Thu, 16 Jun 2022 12:30:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1AF4C6B009B; Thu, 16 Jun 2022 12:30:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 027FA6B009C; Thu, 16 Jun 2022 12:30:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id E3D5E6B009A for ; Thu, 16 Jun 2022 12:30:26 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id AFF823481D for ; Thu, 16 Jun 2022 16:30:26 +0000 (UTC) X-FDA: 79584636852.20.33728C1 Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) by imf18.hostedemail.com (Postfix) with ESMTP id 0393C1C0092 for ; Thu, 16 Jun 2022 16:30:25 +0000 (UTC) Received: by mail-pg1-f182.google.com with SMTP id r5so1717277pgr.3 for ; Thu, 16 Jun 2022 09:30:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NGZra2EXAzLHhvW+Rx2ltiLUVuZcwe1XdYZcnOjkDHg=; b=NOwRne8XqcUUhyuKhlF+5HvgP3UvdzK8/fh9MFgoTFqiNh0P1LFPED1MPYxudrHJQD s0LNPDJGZYu3fewhvZ4e0qLKZFXlbMxc70IuVSyQ4FzetS2enU17cVKevqxx8+dSPuep hx3rhBWdNcqhVw8ur8q7WYdWttqTiZKhjIxi4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NGZra2EXAzLHhvW+Rx2ltiLUVuZcwe1XdYZcnOjkDHg=; b=spOsfDfaRtPbmgo4QC+t88MWI/nPHEBbwV4wTjSLVti+LHfZQUZeSkkWB48c4GM7S+ Y8Wj1vPVqqm7rGnoKNeLvp5eJ5OElQ0d4hothX9Dgqx0+JcersVjwTv1diEQrQkuntvo TcMvVxHBSSU8eJ2keJfTxaFLEw5mcMQia3Wa1uPyI1EYtl+wQpgVP5TSFKf+FCwOmSGu TNhHmfCNf90vy4A1Yh1xNkvzFqkRemxvIoq8rOn+UtTS9k6/iBZNCOhP1f1QvD0ef+9A 8OXEY4IMR2ITzAkeAU3RWA6dR3raKU3xO9KpAEdagPM6LUU9FO20nUMirRdfvRtBtY1y OHxg== X-Gm-Message-State: AJIora8RPyI9Jjb+NfdroJVA21kRyADxiN4qpravFlJir4+OaUBryMsU g5mK8u5Zelrcdc2L32QyElumcw== X-Google-Smtp-Source: AGRyM1uuN87FEV5uTWR0IbCKzPsRK7nTwh7zISxsaLIezfzPOdcOQ5ZoPRB0MV7eFCd74z9myE1g6g== X-Received: by 2002:a63:f944:0:b0:3fd:4f29:67e9 with SMTP id q4-20020a63f944000000b003fd4f2967e9mr5033941pgk.593.1655397024977; Thu, 16 Jun 2022 09:30:24 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id y5-20020a170902d64500b001641a68f1c7sm1831548plh.273.2022.06.16.09.30.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jun 2022 09:30:24 -0700 (PDT) From: Kees Cook To: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-hardening@vger.kernel.org, Jason@zx2c4.com, linux-xfs@vger.kernel.org Cc: Kees Cook , urezki@gmail.com, joe@perches.com, gregkh@linuxfoundation.org, torvalds@linux-foundation.org, willy@infradead.org Subject: Re: [PATCH] usercopy: use unsigned long instead of uintptr_t Date: Thu, 16 Jun 2022 09:29:12 -0700 Message-Id: <165539694985.1107767.16603574353239972239.b4-ty@chromium.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220616143617.449094-1-Jason@zx2c4.com> References: <20220616143617.449094-1-Jason@zx2c4.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=NOwRne8X; dmarc=pass (policy=none) header.from=chromium.org; spf=pass (imf18.hostedemail.com: domain of keescook@chromium.org designates 209.85.215.182 as permitted sender) smtp.mailfrom=keescook@chromium.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1655397026; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=NGZra2EXAzLHhvW+Rx2ltiLUVuZcwe1XdYZcnOjkDHg=; b=SiTBkmKmroHXR481+J8o4CQL6vf8mdrt852wMtNi1gIxMAltvoyfoOPxFbs6e/p1Owhm4i +gaUBsTFuiK+d8uDyX9qktmO72IeV/nIEp36YywzzEHHqADCpoWL6OPFOQEXIUiDqC9tte 1/VjBhrXAVrXGSc7pNF4RM4lFwBbV50= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1655397026; a=rsa-sha256; cv=none; b=I4ygw1GAiJLDBuFMblGbEP0lRj0qQjgekrjVlLUKBU9xBDAlqc1cfdEYDJeVyicScOMQKz 1ZZS81458zIHM9FxyRXtHKabah5BnTyf6Ml+5xr+NeAtuDoK+cIHo9jxZMg69+IMZUHLBQ FSkfPn6kXJ1gbb+ZvPpUFLzguaXC/fs= X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 0393C1C0092 X-Rspam-User: Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=NOwRne8X; dmarc=pass (policy=none) header.from=chromium.org; spf=pass (imf18.hostedemail.com: domain of keescook@chromium.org designates 209.85.215.182 as permitted sender) smtp.mailfrom=keescook@chromium.org X-Stat-Signature: whw1gq36g6j9jfimyk5xabdoabqo4xsx X-HE-Tag: 1655397025-409105 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, 16 Jun 2022 16:36:17 +0200, Jason A. Donenfeld wrote: > A recent commit factored out a series of annoying (unsigned long) casts > into a single variable declaration, but made the pointer type a > `uintptr_t` rather than the usual `unsigned long`. This patch changes it > to be the integer type more typically used by the kernel to represent > addresses. > > > [...] Given Linus's confirmation: applied to for-next/hardening, thanks! I do note, however, that we have almost 1700 uses of uintptr_t in the kernel. Perhaps we need to add a section to the CodingStyle doc? [1/1] usercopy: use unsigned long instead of uintptr_t https://git.kernel.org/kees/c/e230d8275da4 -- Kees Cook