From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (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 4534D3DEAD5; Wed, 22 Apr 2026 12:45:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.15 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776861906; cv=none; b=AtVeieqE643n9l/GOvWZGkUk8RmmVTzq7gM2WghXKhaSXkhhFsHd+33XjMZ5r6dJ2ucRofAv2o2q+phsX0EotCE4deF85ln1xD/AQbIfobyovnAjYTFD1NSyiJTKm+yM/b20j52vYwcN9x1IcFQOq17FeJ7z7133oao3d8iPsuQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776861906; c=relaxed/simple; bh=Uj+LL1Po7hnPnTKAi6dksaa1sxESLP9XwcWHu/2yDM0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=eSeMzRbfIg3IOpDfJCbmY9n4j4ufNNLJPUKLEF1zb9Y2m9WBTYJ8FcjkBV/mnS4uHCQ7yTmzHArF20ESuWnsVaUDVmFdrHYHvtnA3bYtUnkcqe7JJ21RGOim8AQUEoeZUtW5BwGOgRqxpPhpzD9TZNcKlGm48sWIxYoX1VG+quU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=GSwTJsTi; arc=none smtp.client-ip=198.175.65.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="GSwTJsTi" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1776861905; x=1808397905; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=Uj+LL1Po7hnPnTKAi6dksaa1sxESLP9XwcWHu/2yDM0=; b=GSwTJsTiAcEpU0my7sBRBLhoPlkKQuiDSmSkVWOMNSBxgPnKx8jPHtAx IKvywZOLd2/wbKgz4enVvMMdbeF6jpBV9ir8BsRpyPrj4BiIatwyZj5oN voREvYVpFx6fcy2OSfsHA6R+fcyA5UFpnCFM/hpSeauhWiXaR7BbjCOL3 U7BLVaSFTF9smU7Nx4Juivvd1IPxJpo3zDkVWv6TTWE01LYv8Bi0oHI4D X7jqehcDS9geKE559XMcDeoM2XRaRyuQUfTOoJ0f7U9sZkL7tW+6NL6cp zStNMl9j6x7oMNU96RB/FSQ0jsCWosmz3SFojy8E2AQNVIhfYm0aUNBIL g==; X-CSE-ConnectionGUID: p8w3s/UfSMm130dYx29J7g== X-CSE-MsgGUID: h8NcAkJTTySyOlWNlExGzQ== X-IronPort-AV: E=McAfee;i="6800,10657,11764"; a="81422483" X-IronPort-AV: E=Sophos;i="6.23,192,1770624000"; d="scan'208";a="81422483" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Apr 2026 05:45:05 -0700 X-CSE-ConnectionGUID: 4uy75dGYTMuQYqV/z6ZZ3w== X-CSE-MsgGUID: fpclPLiPSDO72NzcK6mJsg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,192,1770624000"; d="scan'208";a="231449355" Received: from smoticic-mobl1.ger.corp.intel.com (HELO localhost) ([10.245.245.201]) by orviesa010-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Apr 2026 05:44:59 -0700 Date: Wed, 22 Apr 2026 15:44:57 +0300 From: Andy Shevchenko To: "Christian A. Ehrhardt" Cc: Uwe =?iso-8859-1?Q?Kleine-K=F6nig_=28The_Capable_Hub=29?= , Luiz Augusto von Dentz , Ulf Hansson , "Christian A. Ehrhardt" , linux-mmc@vger.kernel.org, Greg Kroah-Hartman , Wolfram Sang , linux-kernel@vger.kernel.org, Marcel Holtmann , linux-bluetooth@vger.kernel.org, Matthias Brugger , AngeloGioacchino Del Regno , linux-mediatek@lists.infradead.org, Ping-Ke Shih , linux-wireless@vger.kernel.org, Felix Fietkau , Lorenzo Bianconi , Ryder Lee , Shayne Chen , Sean Wang , Brian Norris , Francesco Dolcini Subject: Re: [PATCH v1 1/6] sdio: Add syntactic sugar to store a pointer in sdio_driver_id Message-ID: References: Precedence: bulk X-Mailing-List: linux-bluetooth@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: Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo On Wed, Apr 22, 2026 at 12:56:01PM +0200, Christian A. Ehrhardt wrote: > On Wed, Apr 22, 2026 at 09:52:11AM +0300, Andy Shevchenko wrote: > > > To be honest, with the involved void* this isn't really type-safe > > > either, but at least the data keeps being a pointer which is really > > > helpful on CHERI. FTR: The alternative would be to use uintptr_t instead > > > of unsigned long, which also has proponents in the CHERI community and > > > which is used in the current vendor patch stack. > > > > FWIW, Linus categorically told that it has to be no uintptr_t in the > > Linux kernel. > > This is probably not the correct context to discuss this but > I will point out that if/when CHERI support is added to the > kernel we will need a way to distinguish between > * A (fat) pointer converted to an integer type (in order to do > integer arithmetic on the address) that might be converted back > to a pointer in the future and > * A plain address "extracted" from a fat pointer. > Using `uintptr_t` for the former and `unsigned long` for the > latter seems like a reasonable choice but there are certainly > other options. > > Sorting out the difference between the two is a very large > part of the diff required to port Linux (or in fact any piece > of low-level software) to a CHERI system. Right, whatever CHERI needs is has to be discussed with the project leader(s) first. But thanks for giving more information on this. -- With Best Regards, Andy Shevchenko