All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Magali Lemes do Sacramento <magali.lemes@canonical.com>
Cc: davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
	shuah@kernel.org, vfedorenko@novek.ru,
	tianjia.zhang@linux.alibaba.com, andrei.gherzan@canonical.com,
	netdev@vger.kernel.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v2 1/3] selftests: net: tls: check if FIPS mode is enabled
Date: Fri, 9 Jun 2023 12:21:15 -0700	[thread overview]
Message-ID: <20230609122115.25dca627@kernel.org> (raw)
In-Reply-To: <CAO9q4O0KpMxukPLxvhyNj692vBSUzygdLQi3Ek1QUJbeYJhyag@mail.gmail.com>

On Fri, 9 Jun 2023 15:52:10 -0300 Magali Lemes do Sacramento wrote:
> > No need to zero init static variables, but really instead of doing
> > the main() hack you should init this to a return value of a function.
> > And have that function read the value.
> 
> I'm not sure I understand what you mean here. I agree we want to avoid
> reading the /proc/sys/crypto/fips_enabled file for every test.
> However, correct me where I'm wrong, if we want to have fips_enabled
> as a static global variable I don't think we can directly initialize
> it from the return value of a function.
> Could you clarify that, please?

Hm, I thought that worked, I must be misremembering.
If it doesn't - let's steal the trick that the harness itself uses and
put the init in a function decorated with __attribute__((constructor)).

  reply	other threads:[~2023-06-09 19:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-09 16:43 [PATCH net v2 0/3] Check if FIPS mode is enabled when running selftests Magali Lemes
2023-06-09 16:43 ` [PATCH net v2 1/3] selftests: net: tls: check if FIPS mode is enabled Magali Lemes
2023-06-09 17:53   ` Jakub Kicinski
2023-06-09 18:52     ` Magali Lemes do Sacramento
2023-06-09 19:21       ` Jakub Kicinski [this message]
2023-06-09 20:15     ` Magali Lemes do Sacramento
2023-06-09 21:08       ` Jakub Kicinski
2023-06-09 16:43 ` [PATCH net v2 2/3] selftests: net: vrf-xfrm-tests: change authentication and encryption algos Magali Lemes
2023-06-09 16:43 ` [PATCH net v2 3/3] selftests: net: fcnal-test: check if FIPS mode is enabled Magali Lemes

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=20230609122115.25dca627@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrei.gherzan@canonical.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=magali.lemes@canonical.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    --cc=tianjia.zhang@linux.alibaba.com \
    --cc=vfedorenko@novek.ru \
    /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.