Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp5823786rwb; Wed, 9 Aug 2023 09:32:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHCKS5uEttKp0GGgbDfQt0BkwOwwcQpPt77rMddpew2c6RqiBbLKfFefh+PITkIOe2SPv4e X-Received: by 2002:a17:90a:7b88:b0:268:5bca:3bdf with SMTP id z8-20020a17090a7b8800b002685bca3bdfmr2504549pjc.40.1691598775997; Wed, 09 Aug 2023 09:32:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691598775; cv=none; d=google.com; s=arc-20160816; b=oMviQSJjKubEl6fpcSqRTOxNBp+89X8DXqTl/Ye+TLNm5KS45d9CZDnCHpsbA9B68C GqFgaL4pJTaorgSSyJu40tMA0ElHNak2tffdADBQIWeH8QE/vxNMEwJfIkQNVsqK72WS fPNc6hDRRI8VU33oyy7yOLGzKQHsIKpQz4wy84WpX/h+ngGuAU1zsXuI3Zj4rzIVkNED 5DFXYwpVt4QXRgiL4R3+vTfInF+5/vZGDprQK+fK+p7sNmUKrmZSaTN0ZzhRaQ/+PO4C /mJQUEAfBHCZtSJ/tyE3p1Lm9pABJjUIDmuB+nWY9F3wt9Ph4gW/ekOJ66QQyScutgGp /bWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature:dkim-signature; bh=X2P0PdEHXJn16g+3yiKkWRHyzNKP9w9NMIFmjSewM/A=; fh=7HRQlwLA+eAntB3E87f7KnqJZAZGzUw+Og8VrPTpE1Y=; b=w/1CM3Eho0r5vIx/VHKYcN/KRbGLArPQZY6qtcBtWU+JNvkYQZjbvJca1YizWGzYq+ G3zfU++uacauUbhNwVeqK6poD3/BST80uvzs0PgY00vWhw8cnOiEEeRVTa67RoJDqhKa eOswsE0kECPtEcVruf+lV84eqaTMo3kbgsmBfBBaEIcSnueBKJoXOfSfo4Z77k1TD5NE uDso8dD41uyRV1Nv0U/eXCB2za6y7GsZuGBOhuAR4noIWAJnWW2jgUQ6XazTYLwRhFxs D8iBQtGy0mSkb1y7x0IkbHG4WFPQPHymhSszBrbIF0g2auP9QDXW3BHyvszclX6X+xhN awKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="o945M/P8"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ob2-20020a17090b390200b00263a985aba5si1920841pjb.149.2023.08.09.09.32.43; Wed, 09 Aug 2023 09:32:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="o945M/P8"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229846AbjHIQJF (ORCPT + 99 others); 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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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