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: <20190424024304.GA53822@WANG-Chaos-MacBook-Pro.local>
Date:   Wed, 24 Apr 2019 10:43:04 +0800
From:   WANG Chao <chao.wang@...oud.cn>
To:     Borislav Petkov <bp@...en8.de>
Cc:     Tony Luck <tony.luck@...el.com>, linux-kernel@...r.kernel.org,
        linux-edac@...r.kernel.org
Subject: Re: [PATCH 3/3] RAS/CEC: immediate soft-offline page when
 count_threshold == 1

On 04/20/19 at 01:57P, Borislav Petkov wrote:
> On Thu, Apr 18, 2019 at 11:41:15AM +0800, WANG Chao wrote:
> > count_threshol == 1 isn't working as expected. CEC only does soft
> > offline the second time the same pfn is hit by a correctable error.
> 
> So this?
> 
> ---
> diff --git a/drivers/ras/cec.c b/drivers/ras/cec.c
> index b3c377ddf340..750a427e1a73 100644
> --- a/drivers/ras/cec.c
> +++ b/drivers/ras/cec.c
> @@ -333,6 +333,7 @@ int cec_add_elem(u64 pfn)
>  
>  	mutex_lock(&ce_mutex);
>  
> +	/* Array full, free the LRU slot. */
>  	if (ca->n == MAX_ELEMS)
>  		WARN_ON(!del_lru_elem_unlocked(ca));
>  
> @@ -346,14 +347,9 @@ int cec_add_elem(u64 pfn)
>  			(void *)&ca->array[to],
>  			(ca->n - to) * sizeof(u64));
>  
> -		ca->array[to] = (pfn << PAGE_SHIFT) |
> -				(DECAY_MASK << COUNT_BITS) | 1;
> +		ca->array[to] = (pfn << PAGE_SHIFT) | 1;
>  
>  		ca->n++;
> -
> -		ret = 0;
> -
> -		goto decay;
>  	}
>  
>  	count = COUNT(ca->array[to]);
> @@ -386,7 +382,6 @@ int cec_add_elem(u64 pfn)
>  		goto unlock;
>  	}
>  
> -decay:
>  	ca->decay_count++;
>  
>  	if (ca->decay_count >= CLEAN_ELEMS)

It looks good to me. Thanks for a better fix.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ