lkml.org 
[lkml]   [2023]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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)).

\
 
 \ /
  Last update: 2023-06-09 21:23    [W:0.045 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site