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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F096C0015E for ; Wed, 9 Aug 2023 16:09:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230444AbjHIQJF (ORCPT ); Wed, 9 Aug 2023 12:09:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231440AbjHIQJC (ORCPT ); Wed, 9 Aug 2023 12:09:02 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C532D2113; Wed, 9 Aug 2023 09:09:00 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 8C0A01F45E; Wed, 9 Aug 2023 16:08:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1691597339; h=from:from:reply-to: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=X2P0PdEHXJn16g+3yiKkWRHyzNKP9w9NMIFmjSewM/A=; b=o945M/P89p11rlOWuOXRWr5LXC9vIGmlBN3cZHgcuirP+rB0x6BHYLjbnu0LC7eNSSI6EG De5XjnYvSWx45OzkklMPHwfmxUG9E1ye2mgz2rVTZ2kumHn0FcgLME2GCYDyYJZ9x97pG8 rNpytZJnZYWVjEN1Kp/Snh49gwRuqnQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1691597339; h=from:from:reply-to: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=X2P0PdEHXJn16g+3yiKkWRHyzNKP9w9NMIFmjSewM/A=; b=4wvCRsQCh1Yxmkbbpy00/vc78dfC2/mSKYjTTz4KeCExoiH4pnIIhF/LVC+heckrowlCPb Pyv3fkraMlNNsRBw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 5B4CC133B5; Wed, 9 Aug 2023 16:08:59 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id bKlkFRu602SZXAAAMHmgww (envelope-from ); Wed, 09 Aug 2023 16:08:59 +0000 Date: Wed, 09 Aug 2023 18:08:58 +0200 Message-ID: <87v8doci5h.wl-tiwai@suse.de> From: Takashi Iwai To: Linus Torvalds Cc: Takashi Iwai , Christoph Hellwig , linux-kernel@vger.kernel.org, Andy Shevchenko , Mark Brown , netdev@vger.kernel.org Subject: Re: [PATCH RFC] Introduce uniptr_t as a generic "universal" pointer In-Reply-To: References: <87edkce118.wl-tiwai@suse.de> <20230809143801.GA693@lst.de> <87a5v0e0mv.wl-tiwai@suse.de> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 09 Aug 2023 17:59:20 +0200, Linus Torvalds wrote: > > On Wed, 9 Aug 2023 at 07:44, Takashi Iwai wrote: > > > > The remaining question is whether the use of sockptr_t for other > > subsystems as a generic pointer is a recommended / acceptable move... > > Very much not recommended. sockptr_t is horrible too, but it was (part > of) what made it possible to fix an even worse horrible historical > mistake (ie getting rid of set_fs()). > > So I detest sockptr_t. It's garbage. At the very minimum it should > have had the length associated with it, not passed separately. > > But it's garbage exactly because it allowed for conversion of some > much much horrid legacy code with fairly minimal impact. > > New code does *not* have that excuse. > > DO NOT MIX USER AND KERNEL POINTERS. And don't add interfaces that > think such mixing is ok. Pointers should be statically clearly of one > type or the other, and never lied about. > > Or you go all the way, and do that whole iterator thing, and make it > very clear that you're doing something truly generic that can be > passed fairly widely along across subsystem boundaries. OK, it looks like we need to scratch the idea... Takashi