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: <20180410120542.24ea9ddb@xps13>
Date:   Tue, 10 Apr 2018 12:05:42 +0200
From:   Miquel Raynal <miquel.raynal@...tlin.com>
To:     Abhishek Sahu <absahu@...eaurora.org>
Cc:     Boris Brezillon <boris.brezillon@...e-electrons.com>,
        Archit Taneja <architt@...eaurora.org>,
        Richard Weinberger <richard@....at>,
        linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org,
        Marek Vasut <marek.vasut@...il.com>,
        linux-mtd@...ts.infradead.org,
        Cyrille Pitchen <cyrille.pitchen@...ev4u.fr>,
        Andy Gross <andy.gross@...aro.org>,
        Brian Norris <computersforpeace@...il.com>,
        David Woodhouse <dwmw2@...radead.org>
Subject: Re: [PATCH 6/9] mtd: nand: qcom: support for checking read errors
 for last codeword

Hi Abhishek,

On Wed,  4 Apr 2018 18:12:22 +0530, Abhishek Sahu
<absahu@...eaurora.org> wrote:

> Add boolean function argument in parse_read_errors to identify
> whether the read error has been called for complete page read or
> only last codeword read. This will help in subsequent patches to
> detect ECC errors in case of last codeword read.

Can you explain when this happen: "last codeword read"? I don't see the
use case.

Thanks,
Miquèl

> 
> Signed-off-by: Abhishek Sahu <absahu@...eaurora.org>
> ---
>  drivers/mtd/nand/qcom_nandc.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/mtd/nand/qcom_nandc.c b/drivers/mtd/nand/qcom_nandc.c
> index ba43752..dce97e8 100644
> --- a/drivers/mtd/nand/qcom_nandc.c
> +++ b/drivers/mtd/nand/qcom_nandc.c
> @@ -1570,7 +1570,7 @@ struct read_stats {
>   * errors. this is equivalent to what 'ecc->correct()' would do.
>   */
>  static int parse_read_errors(struct qcom_nand_host *host, u8 *data_buf,
> -			     u8 *oob_buf)
> +			     u8 *oob_buf, bool last_cw)
>  {
>  	struct nand_chip *chip = &host->chip;
>  	struct qcom_nand_controller *nandc = get_qcom_nand_controller(chip);
> @@ -1579,12 +1579,12 @@ static int parse_read_errors(struct qcom_nand_host *host, u8 *data_buf,
>  	unsigned int max_bitflips = 0;
>  	struct read_stats *buf;
>  	bool flash_op_err = false;
> -	int i;
> +	int i, cw_cnt = last_cw ? 1 : ecc->steps;
>  
>  	buf = (struct read_stats *)nandc->reg_read_buf;
>  	nandc_read_buffer_sync(nandc, true);
>  
> -	for (i = 0; i < ecc->steps; i++, buf++) {
> +	for (i = 0; i < cw_cnt; i++, buf++) {
>  		u32 flash, buffer, erased_cw;
>  		int data_len, oob_len;
>  
> @@ -1743,7 +1743,8 @@ static int read_page_ecc(struct qcom_nand_host *host, u8 *data_buf,
>  	free_descs(nandc);
>  
>  	if (!ret)
> -		ret = parse_read_errors(host, data_buf_start, oob_buf_start);
> +		ret = parse_read_errors(host, data_buf_start, oob_buf_start,
> +					false);
>  
>  	return ret;
>  }



-- 
Miquel Raynal, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ