public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Uros Bizjak <ubizjak@gmail.com>
Cc: x86@kernel.org, linux-crypto@vger.kernel.org,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-media@vger.kernel.org, linux-mtd@lists.infradead.org,
	linux-fscrypt@vger.kernel.org, linux-scsi@vger.kernel.org,
	bpf@vger.kernel.org, linux-kselftest@vger.kernel.org,
	kunit-dev@googlegroups.com, linux-kernel@vger.kernel.org,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Andy Lutomirski <luto@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>,
	Tvrtko Ursulin <tursulin@ursulin.net>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Hans Verkuil <hverkuil@xs4all.nl>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Richard Weinberger <richard@nod.at>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Eric Biggers <ebiggers@kernel.org>,
	"Theodore Y. Ts'o" <tytso@mit.edu>,
	Jaegeuk Kim <jaegeuk@kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Hannes Reinecke <hare@suse.de>,
	"James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	John Fastabend <john.fastabend@gmail.com>,
	Andrii Nakryiko <andrii@kernel.org>,
	Martin KaFai Lau <martin.lau@linux.dev>,
	Eduard Zingerman <eddyz87@gmail.com>, Song Liu <song@kernel.org>,
	Yonghong Song <yonghong.song@linux.dev>,
	KP Singh <kpsingh@kernel.org>,
	Stanislav Fomichev <sdf@fomichev.me>, Hao Luo <haoluo@google.com>,
	Jiri Olsa <jolsa@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Brendan Higgins <brendan.higgins@linux.dev>,
	David Gow <davidgow@google.com>, Rae Moar <rmoar@google.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Jiri Pirko <jiri@resnulli.us>, Petr Mladek <pmladek@suse.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Sergey Senozhatsky <senozhatsky@chromium.org>,
	Stephen Hemminger <stephen@networkplumber.org>,
	Jamal Hadi Salim <jhs@mojatatu.com>,
	Cong Wang <xiyou.wangcong@gmail.com>,
	Kent Overstreet <kent.overstreet@linux.dev>
Subject: Re: [PATCH RESEND v2 00/19] random: Resolve circular include dependency and include <linux/percpu.h>
Date: Tue, 10 Sep 2024 02:37:38 +0200	[thread overview]
Message-ID: <Zt-U0opo2EW8LSRJ@zx2c4.com> (raw)
In-Reply-To: <CAFULd4ak3n1x0tGrqiNoxvDBRw6AWgchfBO_k4aKps34DomPvA@mail.gmail.com>

Hi Uros,

On Mon, Sep 09, 2024 at 09:30:06PM +0200, Uros Bizjak wrote:
> Besides GCC, clang can define various named address space via
> address_space attribute:
> 
> --cut here--
> #define __as(N) __attribute__((address_space(N)))
> 
> void *foo(void __as(1) *x) { return x; }         // error
> 
> void *bar(void __as(1) *x) { return (void *)x; } // fine
> --cut here--
> 
> When compiling this, the compiler returns:
> 
> clang-as.c:3:37: error: returning '__as(1) void *' from a function
> with result type 'void *' changes address space of pointer

Super cool. Looking forward to having it all wired up and the bugs we'll
find with it. 

> I think that the best approach is to target this patchset for linux
> 6.13 via random.git tree. I will prepare a v3 after 6.12rc1, so when
> committed to random.git, the patchset will be able to spend some time
> in linux-next. This way, there will be plenty of time for CI robots to
> do additional checks also for some less popular targets (although
> individual patches are dead simple, removing these kinds of "legacy"
> includes can be tricky), and I will also be able to collect Acked-by:s
> in the meantime.
> 
> While the patchset is an improvement by itself, its inclusion is not
> time sensitive. The follow up percpu named address checking
> functionality requires a very recent feature (__typeof_unqual__
> keyword), which is only supported in recent compilers (gcc-14 and
> clang-20). Besides compiler support, sparse doesn't know about
> __typeof_unqual__, resulting in broken type tracing and hundreds of
> sparse errors with C=1 due to unknown keyword.
> 
> So, I think we are not in a hurry and can take the slow and safe path.

Okay, sure, that sounds good to me. I'll keep my eyes open for v3
in a few weeks then.

Jason

      reply	other threads:[~2024-09-10  0:37 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-09  7:53 [PATCH RESEND v2 00/19] random: Resolve circular include dependency and include <linux/percpu.h> Uros Bizjak
2024-09-09  7:53 ` [PATCH RESEND v2 01/19] x86/kaslr: Include <linux/prandom.h> instead of <linux/random.h> Uros Bizjak
2024-09-09  7:53 ` [PATCH RESEND v2 02/19] crypto: testmgr: " Uros Bizjak
2024-09-12  6:06   ` Herbert Xu
2024-09-09  7:53 ` [PATCH RESEND v2 03/19] drm/i915/selftests: " Uros Bizjak
2024-09-09  7:53 ` [PATCH RESEND v2 04/19] drm/lib: " Uros Bizjak
2024-09-09  7:53 ` [PATCH RESEND v2 05/19] media: vivid: Include <linux/prandom.h> in vivid-vid-cap.c Uros Bizjak
2024-09-09 11:40   ` Hans Verkuil
2024-09-09  7:53 ` [PATCH RESEND v2 06/19] mtd: tests: Include <linux/prandom.h> instead of <linux/random.h> Uros Bizjak
2024-09-09  9:50   ` Miquel Raynal
2024-09-09  7:53 ` [PATCH RESEND v2 07/19] fscrypt: Include <linux/once.h> in fs/crypto/keyring.c Uros Bizjak
2024-09-10 16:55   ` Eric Biggers
2024-09-09  7:53 ` [PATCH RESEND v2 08/19] scsi: libfcoe: Include <linux/prandom.h> instead of <linux/random.h> Uros Bizjak
2024-09-10 17:13   ` Bart Van Assche
2024-09-09  7:53 ` [PATCH RESEND v2 09/19] bpf: " Uros Bizjak
2024-09-09  7:53 ` [PATCH RESEND v2 10/19] lib/interval_tree_test.c: " Uros Bizjak
2024-09-09  7:53 ` [PATCH RESEND v2 11/19] kunit: string-stream-test: " Uros Bizjak
2024-09-09  7:53 ` [PATCH RESEND v2 12/19] random32: " Uros Bizjak
2024-09-09  7:53 ` [PATCH RESEND v2 13/19] lib/rbtree-test: " Uros Bizjak
2024-09-09  7:53 ` [PATCH RESEND v2 14/19] bpf/tests: " Uros Bizjak
2024-09-09  7:53 ` [PATCH RESEND v2 15/19] lib/test_parman: " Uros Bizjak
2024-09-09  7:53 ` [PATCH RESEND v2 16/19] lib/test_scanf: " Uros Bizjak
2024-09-09 13:02   ` Petr Mladek
2024-09-09  7:54 ` [PATCH RESEND v2 17/19] netem: Include <linux/prandom.h> in sch_netem.c Uros Bizjak
2024-09-09  7:54 ` [PATCH RESEND v2 18/19] random: Do not include <linux/prandom.h> in <linux/random.h> Uros Bizjak
2024-09-09  7:54 ` [PATCH RESEND v2 19/19] prandom: Include <linux/percpu.h> in <linux/prandom.h> Uros Bizjak
2024-09-09 15:57 ` [PATCH RESEND v2 00/19] random: Resolve circular include dependency and include <linux/percpu.h> Jason A. Donenfeld
2024-09-09 19:30   ` Uros Bizjak
2024-09-10  0:37     ` Jason A. Donenfeld [this message]

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=Zt-U0opo2EW8LSRJ@zx2c4.com \
    --to=jason@zx2c4.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=airlied@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=andrii@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=ast@kernel.org \
    --cc=bp@alien8.de \
    --cc=bpf@vger.kernel.org \
    --cc=brendan.higgins@linux.dev \
    --cc=daniel@ffwll.ch \
    --cc=daniel@iogearbox.net \
    --cc=dave.hansen@linux.intel.com \
    --cc=davem@davemloft.net \
    --cc=davidgow@google.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ebiggers@kernel.org \
    --cc=eddyz87@gmail.com \
    --cc=edumazet@google.com \
    --cc=haoluo@google.com \
    --cc=hare@suse.de \
    --cc=hpa@zytor.com \
    --cc=hverkuil@xs4all.nl \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jaegeuk@kernel.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=kent.overstreet@linux.dev \
    --cc=kpsingh@kernel.org \
    --cc=kuba@kernel.org \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-fscrypt@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=luto@kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=martin.lau@linux.dev \
    --cc=martin.petersen@oracle.com \
    --cc=mchehab@kernel.org \
    --cc=mingo@redhat.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=mripard@kernel.org \
    --cc=pabeni@redhat.com \
    --cc=peterz@infradead.org \
    --cc=pmladek@suse.com \
    --cc=richard@nod.at \
    --cc=rmoar@google.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=rostedt@goodmis.org \
    --cc=sdf@fomichev.me \
    --cc=senozhatsky@chromium.org \
    --cc=song@kernel.org \
    --cc=stephen@networkplumber.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=tursulin@ursulin.net \
    --cc=tytso@mit.edu \
    --cc=tzimmermann@suse.de \
    --cc=ubizjak@gmail.com \
    --cc=vigneshr@ti.com \
    --cc=x86@kernel.org \
    --cc=xiyou.wangcong@gmail.com \
    --cc=yonghong.song@linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox