All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Sami Tolvanen <samitolvanen@google.com>
Cc: Andy Polyakov <appro@cryptogams.org>,
	Zhihang Shao <zhihang.shao.iscas@gmail.com>,
	linux-crypto@vger.kernel.org, linux-riscv@lists.infradead.org,
	herbert@gondor.apana.org.au, paul.walmsley@sifive.com,
	alex@ghiti.fr, zhang.lyra@gmail.com
Subject: Re: [PATCH v4] crypto: riscv/poly1305 - import OpenSSL/CRYPTOGAMS implementation
Date: Fri, 27 Jun 2025 21:51:51 +0000	[thread overview]
Message-ID: <20250627215151.GA1194754@google.com> (raw)
In-Reply-To: <CABCJKucHNWz6J9vvDvKh_Je8eQTJO_1r0f6jsDTsDmfaxdBygg@mail.gmail.com>

On Fri, Jun 27, 2025 at 09:10:30AM -0700, Sami Tolvanen wrote:
> > Would it be sufficient to #include <linux/cfi_types.h>?
> 
> Yes, but this requires the function to be indirectly called, because
> with CFI_CLANG the compiler only emits CFI type information for
> functions that are address-taken in C. If, like Eric suggested, these
> functions are not currently indirectly called, I would simply leave
> out the lpad instructions for kernel builds and worry about
> kernel-mode CFI annotations when they're actually needed:
> 
> # if defined(__riscv_zicfilp) && !defined(__KERNEL__)
>         lpad    0
> # endif

These functions aren't indirectly called, and I'm intending to keep it that way.

- Eric

WARNING: multiple messages have this Message-ID (diff)
From: Eric Biggers <ebiggers@kernel.org>
To: Sami Tolvanen <samitolvanen@google.com>
Cc: Andy Polyakov <appro@cryptogams.org>,
	Zhihang Shao <zhihang.shao.iscas@gmail.com>,
	linux-crypto@vger.kernel.org, linux-riscv@lists.infradead.org,
	herbert@gondor.apana.org.au, paul.walmsley@sifive.com,
	alex@ghiti.fr, zhang.lyra@gmail.com
Subject: Re: [PATCH v4] crypto: riscv/poly1305 - import OpenSSL/CRYPTOGAMS implementation
Date: Fri, 27 Jun 2025 21:51:51 +0000	[thread overview]
Message-ID: <20250627215151.GA1194754@google.com> (raw)
In-Reply-To: <CABCJKucHNWz6J9vvDvKh_Je8eQTJO_1r0f6jsDTsDmfaxdBygg@mail.gmail.com>

On Fri, Jun 27, 2025 at 09:10:30AM -0700, Sami Tolvanen wrote:
> > Would it be sufficient to #include <linux/cfi_types.h>?
> 
> Yes, but this requires the function to be indirectly called, because
> with CFI_CLANG the compiler only emits CFI type information for
> functions that are address-taken in C. If, like Eric suggested, these
> functions are not currently indirectly called, I would simply leave
> out the lpad instructions for kernel builds and worry about
> kernel-mode CFI annotations when they're actually needed:
> 
> # if defined(__riscv_zicfilp) && !defined(__KERNEL__)
>         lpad    0
> # endif

These functions aren't indirectly called, and I'm intending to keep it that way.

- Eric

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2025-06-27 21:51 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-11  3:31 [PATCH v4] crypto: riscv/poly1305 - import OpenSSL/CRYPTOGAMS implementation Zhihang Shao
2025-06-11  3:31 ` Zhihang Shao
2025-06-24  3:50 ` Eric Biggers
2025-06-24  3:50   ` Eric Biggers
2025-06-24  9:13   ` Andy Polyakov
2025-06-24  9:13     ` Andy Polyakov
2025-06-25  3:54     ` Eric Biggers
2025-06-25  3:54       ` Eric Biggers
2025-06-25  9:38       ` Andy Polyakov
2025-06-25  9:38         ` Andy Polyakov
2025-06-26 15:58       ` Sami Tolvanen
2025-06-26 15:58         ` Sami Tolvanen
2025-06-27  9:07         ` Andy Polyakov
2025-06-27  9:07           ` Andy Polyakov
2025-06-27 16:10           ` Sami Tolvanen
2025-06-27 16:10             ` Sami Tolvanen
2025-06-27 21:51             ` Eric Biggers [this message]
2025-06-27 21:51               ` Eric Biggers
2025-06-30  9:55               ` Andy Polyakov
2025-06-30  9:55                 ` Andy Polyakov
2025-06-24 11:08   ` Andy Polyakov
2025-06-24 11:08     ` Andy Polyakov
2025-07-06 23:35   ` Eric Biggers
2025-07-06 23:35     ` Eric Biggers
  -- strict thread matches above, loose matches on Subject: below --
2025-07-20  9:10 Zhihang Shao
2025-07-20  9:10 ` Zhihang Shao
2025-07-20 17:22 ` Eric Biggers
2025-07-20 17:22   ` Eric Biggers
2025-07-23  9:47 ` Andy Polyakov
2025-07-23  9:47   ` Andy Polyakov

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=20250627215151.GA1194754@google.com \
    --to=ebiggers@kernel.org \
    --cc=alex@ghiti.fr \
    --cc=appro@cryptogams.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=paul.walmsley@sifive.com \
    --cc=samitolvanen@google.com \
    --cc=zhang.lyra@gmail.com \
    --cc=zhihang.shao.iscas@gmail.com \
    /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.