From: Takashi Iwai <tiwai@suse.de>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Takashi Iwai <tiwai@suse.de>, Christoph Hellwig <hch@lst.de>,
linux-kernel@vger.kernel.org,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Mark Brown <broonie@kernel.org>,
netdev@vger.kernel.org
Subject: Re: [PATCH RFC] Introduce uniptr_t as a generic "universal" pointer
Date: Wed, 09 Aug 2023 18:08:58 +0200 [thread overview]
Message-ID: <87v8doci5h.wl-tiwai@suse.de> (raw)
In-Reply-To: <CAHk-=wgGV61xrG=gO0=dXH64o2TDWWrXn1mx-CX885JZ7h84Og@mail.gmail.com>
On Wed, 09 Aug 2023 17:59:20 +0200,
Linus Torvalds wrote:
>
> On Wed, 9 Aug 2023 at 07:44, Takashi Iwai <tiwai@suse.de> 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
next prev parent reply other threads:[~2023-08-09 16:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-09 14:35 [PATCH RFC] Introduce uniptr_t as a generic "universal" pointer Takashi Iwai
2023-08-09 14:38 ` Christoph Hellwig
2023-08-09 14:44 ` Takashi Iwai
2023-08-09 15:59 ` Linus Torvalds
2023-08-09 16:08 ` Takashi Iwai [this message]
2023-08-14 16:06 ` David Laight
2023-08-09 15:48 ` Linus Torvalds
2023-08-09 16:05 ` Takashi Iwai
2023-08-09 17:01 ` Linus Torvalds
2023-08-09 17:21 ` Linus Torvalds
2023-08-09 18:08 ` Takashi Iwai
2023-08-10 14:48 ` Andy Shevchenko
2023-08-11 13:54 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v8doci5h.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=andriy.shevchenko@linux.intel.com \
--cc=broonie@kernel.org \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.