linux-s390.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Nathan Chancellor" <nathan@kernel.org>
Cc: "Heiko Carstens" <hca@linux.ibm.com>,
	"Vasily Gorbik" <gor@linux.ibm.com>,
	"Alexander Gordeev" <agordeev@linux.ibm.com>,
	linux-s390@vger.kernel.org,
	"Christian Borntraeger" <borntraeger@linux.ibm.com>
Subject: Re: [PATCH v2] random: vDSO: Avoid call to memset() when zeroing reserved in __cvdso_getrandom_data()
Date: Fri, 25 Sep 2026 21:56:53 +0000	[thread overview]
Message-ID: <20260925215653.B4CF21F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260925-vdso-getrandom-avoid-memset-llvm-24-v2-1-ce640f872393@kernel.org>

> After a recent change in LLVM [1], builds with the random vDSO
> implementation, such as PowerPC and RISC-V, fail when checking the vDSO:
> 
>   arch/powerpc/kernel/vdso/vdso32.so.dbg: dynamic relocations are not supported
>   arch/riscv/kernel/vdso/vdso.so.dbg: dynamic relocations are not supported
> 
> memset() is now generated when zeroing params->reserved for some builds
> because LLVM has an optimization (now run in more instances) that can
> recognize at compile time when it is assigning a static value to a
> contiguous area of memory and turn that into a call to memset(). Both
> clang and GCC assume memset() is always available [2].
> 
> clang provides a builtin, __builtin_memset_inline [3][4], that can be
> used to ensure an external function call is not generated when zeroing
> this memory. Use it when it is available.
> [ ... ]
> Link: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=1ff6d9f7428b0668cd8ab0b3e3ab94f1d733124d [5]
> Link: https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-finline-stringops [6]
> Suggested-by: "Jason A. Donenfeld" <Jason@zx2c4.com>
> Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260925-vdso-getrandom-avoid-memset-llvm-24-v2-1-ce640f872393@kernel.org?part=1


  parent reply	other threads:[~2026-09-25 21:56 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-25 21:46 [PATCH v2] random: vDSO: Avoid call to memset() when zeroing reserved in __cvdso_getrandom_data() Nathan Chancellor
2026-09-25 21:53 ` Nick Desaulniers
2026-09-25 21:56   ` Nick Desaulniers
2026-09-25 22:00     ` Nick Desaulniers
2026-09-25 22:19       ` Nathan Chancellor
2026-09-26  6:34       ` Christophe Leroy (CS GROUP)
2026-09-26 10:02       ` Jason A. Donenfeld
2026-09-26 10:55         ` Christophe Leroy (CS GROUP)
2026-09-26 12:29           ` Jason A. Donenfeld
2026-09-29 18:24             ` Nick Desaulniers
2026-09-30 13:38               ` Nathan Chancellor
2026-09-30 14:21                 ` Jason A. Donenfeld
2026-09-30 14:44                   ` Jason A. Donenfeld
2026-09-30 15:13                     ` Nathan Chancellor
2026-09-30 15:16                       ` Jason A. Donenfeld
2026-10-01  4:41                         ` Christophe Leroy (CS GROUP)
2026-10-01  9:25                           ` Jason A. Donenfeld
2026-10-01 10:20                             ` Nathan Chancellor
2026-10-01 10:48                               ` Jason A. Donenfeld
2026-10-01 11:03                                 ` Nathan Chancellor
2026-10-02  9:49                                   ` Nathan Chancellor
2026-10-02 10:13                                     ` Jason A. Donenfeld
2026-10-02 18:21                                       ` Christophe Leroy (CS GROUP)
2026-10-02  9:18                                 ` Christophe Leroy (CS GROUP)
2026-10-02  9:27                                   ` Jason A. Donenfeld
2026-09-26 12:39           ` Nathan Chancellor
2026-09-25 21:56 ` sashiko-bot [this message]
2026-09-26  9:39 ` Andreas Schwab
2026-09-26 12:19   ` Nathan Chancellor
2026-09-26 12:32     ` Jason A. Donenfeld
2026-09-26 12:49       ` Nathan Chancellor
2026-09-27  7:02       ` David Laight
2026-09-29 16:59         ` Nathan Chancellor
2026-09-29 17:44           ` David Laight
2026-10-02 10:57 ` Christophe Leroy (CS GROUP)
2026-10-02 10:58   ` Jason A. Donenfeld
2026-10-02 11:01     ` LEROY Christophe
2026-10-02 11:02     ` Christophe Leroy (CS GROUP)

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=20260925215653.B4CF21F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=agordeev@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=linux-s390@vger.kernel.org \
    --cc=nathan@kernel.org \
    --cc=sashiko-reviews@lists.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;
as well as URLs for NNTP newsgroup(s).