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]
Date:	Tue, 14 Jan 2014 14:07:36 -0500
From:	Eric Paris <eparis@...hat.com>
To:	Joe Perches <joe@...ches.com>
Cc:	linux-kernel@...r.kernel.org, Al Viro <viro@...iv.linux.org.uk>
Subject: Re: [PATCH 2/2] audit: Convert int limit uses to u32

On Tue, 2014-01-14 at 10:33 -0800, Joe Perches wrote:
> The equivalent uapi struct uses __u32 so make the kernel
> uses u32 too.
> 
> This can prevent some oddities where the limit is
> logged/emitted as a negative value.
> 
> Convert kstrtol to kstrtouint to disallow negative values.


> diff --git a/kernel/audit.c b/kernel/audit.c
> index f397ab2..902c3aa 100644
> --- a/kernel/audit.c
> +++ b/kernel/audit.c
> @@ -79,16 +79,16 @@ static int	audit_initialized;
>  #define AUDIT_OFF	0
>  #define AUDIT_ON	1
>  #define AUDIT_LOCKED	2
> -int		audit_enabled;
> -int		audit_ever_enabled;
> +u32		audit_enabled;
> +u32		audit_ever_enabled;
>  
>  EXPORT_SYMBOL_GPL(audit_enabled);
>  
>  /* Default state when kernel boots without any parameters. */
> -static int	audit_default;
> +u32	audit_default;

Can't figure out why you dropped the static...
I'm putting it back.

>  
>  /* If auditing cannot proceed, audit_failure selects what happens. */
> -static int	audit_failure = AUDIT_FAIL_PRINTK;
> +static u32	audit_failure = AUDIT_FAIL_PRINTK;
>  
>  /*
>   * If audit records are to be written to the netlink socket, audit_pid


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists