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 CD6F0C433EF for ; Thu, 16 Jun 2022 14:38:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 557B46B0071; Thu, 16 Jun 2022 10:38:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 508EC6B0072; Thu, 16 Jun 2022 10:38:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3CF216B0074; Thu, 16 Jun 2022 10:38:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 2C0A46B0071 for ; Thu, 16 Jun 2022 10:38:09 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id 03BD7120478 for ; Thu, 16 Jun 2022 14:38:08 +0000 (UTC) X-FDA: 79584353898.13.FF2009F Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf16.hostedemail.com (Postfix) with ESMTP id C743218005C for ; Thu, 16 Jun 2022 14:38:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=WRQ7IP4husqBZexrV10wcSx741ile1sfqnxtlMk8LfI=; b=A87rmSe6QbsZno/A5ZYtyjjhnj Ko8DHShg3DcPEPNdwiW0zc3tR8hJRcDLSHpYY+IgmZ4VibI+YoOYVUnjNxeLdwVvfcQa9KEUaK4Ti XlmgxiyEsjcNcu+o7+alJ+j+qkwQ4RJhQqJ0aqE3248Kh9sDhbGB8OUNd5kWOkIVSQGlFUtl5Dp9S wvcKS8ub7+BRs1hocxGghx1+FgCNHsPexKhyob+ioZm8fuJVd8nDMoFCesS2PvHuaeTcgZ0NstoGr /AWiudfYtZu3/59CEMzYjxglzGNZde1mE05tF9SHEE7X/nWEWD4xySG7qjSbH65ZUjNE2ugrDKQA1 KMqtP93A==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1qdG-00210p-DG; Thu, 16 Jun 2022 14:38:02 +0000 Date: Thu, 16 Jun 2022 15:38:02 +0100 From: Matthew Wilcox To: "Jason A. Donenfeld" Cc: linux-mm@kvack.org, linux-xfs@vger.kernel.org, linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, Uladzislau Rezki , Kees Cook , Greg Kroah-Hartman , Linus Torvalds , Joe Perches Subject: Re: [PATCH] usercopy: use unsigned long instead of uintptr_t Message-ID: References: <20220616143617.449094-1-Jason@zx2c4.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220616143617.449094-1-Jason@zx2c4.com> ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1655390288; a=rsa-sha256; cv=none; b=t53k3QT+NP1zSbLZuwA86sSgrXjmxJFzWwKXJETCGY+eSQ/c84CZS7l1BvbxsB1ppJ1noZ txTIXnOi6rzSJCA+lUTtF0L3IfnnAlFU9Lx/FZgct+iu98cT1MkwzwbBdmQEejYoSKRZpW 8Xe94vssRvMDKs/Za8G0zMNUn7PsBUc= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=A87rmSe6; dmarc=none; spf=none (imf16.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1655390288; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=WRQ7IP4husqBZexrV10wcSx741ile1sfqnxtlMk8LfI=; b=B9dzwLCQfsBc8Qr3dY3NoLIC6mj9/naAKFUhZy8v78ZJ4O5rtIGAiMo6nRBKGQ7ubPfBCk eLshnFga1vAwqMnptgAjIMvggIZ3g/9hsChHG96rHCSZyo/jYL2h1F4rmjbO/YiwSuf2jq fgaqOX4mK51qDhXqGAdkh8D4o0pvxl4= X-Rspamd-Queue-Id: C743218005C X-Rspam-User: Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=A87rmSe6; dmarc=none; spf=none (imf16.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-Rspamd-Server: rspam06 X-Stat-Signature: y87k6xjekmpisouzbh5iqd7cmyjh751f X-HE-Tag: 1655390287-109813 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, Jun 16, 2022 at 04:36:17PM +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. No. I did this on purpose. uintptr_t is the correct type to represent a pointer that's being used as an integer. This dinosaur approach of using unsigned long has to stop.