[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230609122115.25dca627@kernel.org>
Date: Fri, 9 Jun 2023 12:21:15 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Magali Lemes do Sacramento <magali.lemes@...onical.com>
Cc: davem@...emloft.net, edumazet@...gle.com, pabeni@...hat.com,
shuah@...nel.org, vfedorenko@...ek.ru,
tianjia.zhang@...ux.alibaba.com, andrei.gherzan@...onical.com,
netdev@...r.kernel.org, linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net v2 1/3] selftests: net: tls: check if FIPS mode is
enabled
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)).
Powered by blists - more mailing lists