lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <36d37d88-4460-e2bb-4f09-07693ddb5831@intel.com>
Date:   Tue, 12 Mar 2019 17:02:17 -0700
From:   Dave Hansen <dave.hansen@...el.com>
To:     Valdis Klētnieks <valdis.kletnieks@...edu>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Andy Lutomirski <luto@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>
Cc:     x86@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] b/arch/x86/mm/pti.c - make local symbols static

> Make both variables static.

"pti_set_kernel_image_nonglobal(void)" is an awfully funny looking
variable. ;)

> Signed-off-by: Valdis Kletnieks <valdis.kletnieks@...edu>
> 
> ---
> diff --git a/arch/x86/mm/pti.c b/arch/x86/mm/pti.c
> index 4fee5c3003ed..139b28a01ce4 100644
> --- a/arch/x86/mm/pti.c
> +++ b/arch/x86/mm/pti.c
> @@ -77,7 +77,7 @@ static void __init pti_print_if_secure(const char *reason)
>  		pr_info("%s\n", reason);
>  }
>  
> -enum pti_mode {
> +static enum pti_mode {

I'm struggling to figure out why we would want to do this.  If there's a
really good reason, I think we probably need to do it en masse:

$ grep -r '^enum.{' arch/x86/ | wc -l
48

>  	PTI_AUTO = 0,
>  	PTI_FORCE_OFF,
>  	PTI_FORCE_ON
> @@ -602,7 +602,7 @@ static void pti_clone_kernel_text(void)
>  	set_memory_global(start, (end_global - start) >> PAGE_SHIFT);
>  }
>  
> -void pti_set_kernel_image_nonglobal(void)
> +static void pti_set_kernel_image_nonglobal(void)

Yes, this function should be static.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ