NAK: [PATCH focal/bionic-hwe] UBUNTU: SAUCE: (lockdown) security: lockdown: remove trailing semicolon before function body

Kleber Souza kleber.souza at canonical.com
Fri May 29 07:46:09 UTC 2020


On 2020-05-23 08:51, Jason A. Donenfeld wrote:
> A prior commit added security_lock_kernel_down for both CONFIG_SECURITY
> and !CONFIG_SECURITY, but in an apparent copy and paste error, the
> !CONFIG_SECURITY definition was added with a trailing semicolon before
> the function body, causing compilation errors unearthed by
> build.wireguard.com:
> 
> ./include/linux/security.h:1277:1: error: expected identifier or ‘(’ before ‘{’ token
>  1277 | {
>       | ^
> ./include/linux/security.h:1276:19: warning: ‘security_lock_kernel_down’ declared ‘static’ but never defined [-Wunused-function]
>  1276 | static inline int security_lock_kernel_down(const char *where, enum lockdown_reason level);
>       |                   ^~~~~~~~~~~~~~~~~~~~~~~~~
> 
> The solution is to simply remove the errant semicolon.
> 
> Fixes: 40fc208c8aae ("UBUNTU: SAUCE: (lockdown) security: lockdown: expose a hook to lock the kernel down")
> Cc: Andrea Righi <andrea.righi at canonical.com>
> Signed-off-by: Jason A. Donenfeld <Jason at zx2c4.com>

Hi Jason,

Thank you for reporting the issue and providing a fix.

Andrea re-sent this patch with a reference to a launchpad bug report and the patch is
queued to be applied for the next SRU cycle:
https://lists.ubuntu.com/archives/kernel-team/2020-May/110238.html

Therefore I'm NAK'ing this patch as the fix was sent on another thread.


Thanks,
Kleber

> ---
>  include/linux/security.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/security.h b/include/linux/security.h
> index 5c59012ff..4be62fb3f 100644
> --- a/include/linux/security.h
> +++ b/include/linux/security.h
> @@ -1273,7 +1273,7 @@ static inline int security_locked_down(enum lockdown_reason what)
>  {
>  	return 0;
>  }
> -static inline int security_lock_kernel_down(const char *where, enum lockdown_reason level);
> +static inline int security_lock_kernel_down(const char *where, enum lockdown_reason level)
>  {
>  	return 0;
>  }
> 




More information about the kernel-team mailing list