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] [day] [month] [year] [list]
Message-ID: <a18c37b9-7534-86c4-3bae-111ac1fa4053@linux.microsoft.com>
Date:   Tue, 14 Apr 2020 08:18:09 -0700
From:   Lakshmi Ramasubramanian <nramas@...ux.microsoft.com>
To:     Tianjia Zhang <tianjia.zhang@...ux.alibaba.com>,
        zohar@...ux.ibm.com, dmitry.kasatkin@...il.com, jmorris@...ei.org,
        serge@...lyn.com, zhangliguang@...ux.alibaba.com,
        zhang.jia@...ux.alibaba.com
Cc:     linux-integrity@...r.kernel.org,
        linux-security-module@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] ima: simplify function process_buffer_measurement

On 4/14/20 4:48 AM, Tianjia Zhang wrote:

> Remove duplicate judgment code to make it more suitable for linux
> code style.
> 
> Signed-off-by: Tianjia Zhang <tianjia.zhang@...ux.alibaba.com>
> ---
>   security/integrity/ima/ima_main.c | 12 ++++++------
>   1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c
> index 9d0abedeae77..55cbbe97ce6e 100644
> --- a/security/integrity/ima/ima_main.c
> +++ b/security/integrity/ima/ima_main.c
> @@ -750,15 +750,15 @@ void process_buffer_measurement(const void *buf, int size,
>   		goto out;
>   
>   	ret = ima_store_template(entry, violation, NULL, buf, pcr);
> -
> -	if (ret < 0)
> -		ima_free_template_entry(entry);
> -
> -out:
>   	if (ret < 0)
> -		pr_devel("%s: failed, result: %d\n", __func__, ret);
> +		goto out_free_entry;
>   
>   	return;
> +
> +out_free_entry:
> +	ima_free_template_entry(entry);
> +out:
> +	pr_devel("%s: failed, result: %d\n", __func__, ret);
>   }

Reviewed-by: Lakshmi Ramasubramanian <nramas@...ux.microsoft.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ