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 51AC6C43334 for ; Thu, 16 Jun 2022 15:11:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D55D26B0074; Thu, 16 Jun 2022 11:11:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D02B36B0078; Thu, 16 Jun 2022 11:11:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BA56C6B007B; Thu, 16 Jun 2022 11:11:24 -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 AC2FE6B0074 for ; Thu, 16 Jun 2022 11:11:24 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id 7FBDB60AA2 for ; Thu, 16 Jun 2022 15:11:24 +0000 (UTC) X-FDA: 79584437688.24.C1D70EF Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf25.hostedemail.com (Postfix) with ESMTP id B5F22A008B for ; Thu, 16 Jun 2022 15:11:23 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id ADE33B8216D; Thu, 16 Jun 2022 15:11:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0CC28C3411A; Thu, 16 Jun 2022 15:11:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1655392277; 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=d2DN+YoilJcfNhQF3J8D+7tBnhEoZyvKc0fHsQfwhas=; b=jXF2QEYdM5lgiSYc+P/0hThSxSSBQzvJcN0PIckvy2xibqgRXzsRZyvHi5PqPLQ22MmKaP SSPAtPgnmo8GYjEKnSehqrt3GfT4H2eySeEL+t/bP282RDRUhHw/d/ZweAuIxweF3+jsww AGObg8VJw3tvpzLOTGH9Fcn1Ks2+Dfo= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 710a274d (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Thu, 16 Jun 2022 15:11:17 +0000 (UTC) Date: Thu, 16 Jun 2022 17:11:13 +0200 From: "Jason A. Donenfeld" To: Matthew Wilcox 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=utf-8 Content-Disposition: inline In-Reply-To: ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1655392283; a=rsa-sha256; cv=none; b=4LxCJElAFz/5bwfOCVZENUfUPENpFzJ8HJd53bcJnGwec0nzOIUsVy5++QmO7sjiHvw0SG uM7rgWFCPmlZflI1+0tvrmgwscWfoCMxzgvf6m7oFfWMCXHkBjD3QcBy/TAVAvauZv9SBW 31w0CnH6OSeMI41ylb3vKTVUDz//Fhs= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=zx2c4.com header.s=20210105 header.b=jXF2QEYd; spf=pass (imf25.hostedemail.com: domain of "SRS0=YYNU=WX=zx2c4.com=Jason@kernel.org" designates 145.40.68.75 as permitted sender) smtp.mailfrom="SRS0=YYNU=WX=zx2c4.com=Jason@kernel.org"; dmarc=pass (policy=none) header.from=zx2c4.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1655392283; 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=d2DN+YoilJcfNhQF3J8D+7tBnhEoZyvKc0fHsQfwhas=; b=jl1llBamXFCPlpV43N+mquhLMATmUfk5zxLmvMv891VCSwZtb+AntY9HU+QygC60+LAmU/ Aht+xVRse/W+urQvPwkYe6StkodX0pBQn33UvTql/GBwOv6t1HKRNBV1AiLvj5qFvlhT6o viO5oDwMdN9TKgddGGi54V0F+d4W80g= X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: B5F22A008B X-Stat-Signature: why6exsysna8e4cf66oxr4c4h3itxn9y Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=zx2c4.com header.s=20210105 header.b=jXF2QEYd; spf=pass (imf25.hostedemail.com: domain of "SRS0=YYNU=WX=zx2c4.com=Jason@kernel.org" designates 145.40.68.75 as permitted sender) smtp.mailfrom="SRS0=YYNU=WX=zx2c4.com=Jason@kernel.org"; dmarc=pass (policy=none) header.from=zx2c4.com X-Rspam-User: X-HE-Tag: 1655392283-999003 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:51:08PM +0200, Jason A. Donenfeld wrote: > If that's a "dinosaur approach" that "has to stop", it'd certainly be > news to me (and I'm guessing others on the list too). I've never really > seen anybody question the kernel's `unsigned long` usage before. > > So hopefully some outcome of this discussion will make it clear, and > then either this patch will go in, or I'll get to work on carefully > adjusting my code that uses `unsigned long` at the moment. Searching through list archives, there's not much, but I did find [1] from Linus: PPS. And btw, the warning is unacceptable too. Cast the thing to "unsigned long" (or uintptr_t, but quite frankly, in the kernel I'd suggest "unsigned long" rather than the more obscure standard types) after you've fixed the macro argument problem. [1] https://lore.kernel.org/lkml/AANLkTineDxntR0ZTXdgXrc6qx6pATTORgOwFR5+w5MLN@mail.gmail.com/