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: <x49wpwkbox2.fsf@segfault.boston.devel.redhat.com>
Date:	Mon, 24 Aug 2015 13:02:17 -0400
From:	Jeff Moyer <jmoyer@...hat.com>
To:	Ross Zwisler <ross.zwisler@...ux.intel.com>
Cc:	linux-kernel@...r.kernel.org, linux-nvdimm@...1.01.org,
	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	linux-acpi@...r.kernel.org, Len Brown <lenb@...nel.org>
Subject: Re: [PATCH] nfit, nd_blk: BLK status register is only 32 bits

Ross Zwisler <ross.zwisler@...ux.intel.com> writes:

> Only read 32 bits for the BLK status register in read_blk_stat().
>
> The format and size of this register is defined in the
> "NVDIMM Driver Writer's guide":
>
> http://pmem.io/documents/NVDIMM_Driver_Writers_Guide.pdf
>
> Signed-off-by: Ross Zwisler <ross.zwisler@...ux.intel.com>
> Reported-by: Nicholas Moulin <nicholas.w.moulin@...ux.intel.com>

Looks fine,

Reviewed-by: Jeff Moyer <jmoyer@...hat.com>

However, now that you've drawn attention to that code, I'll note that
there is no checking of the pending or retry bits.  In fact,
ACPI_NFIT_CONTROL_BUFFERED isn't even checked upon loading the tables.
Is this on a todo list somewhere?

Cheers,
Jeff

> ---
>  drivers/acpi/nfit.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/acpi/nfit.c b/drivers/acpi/nfit.c
> index 7c2638f..8689ee1 100644
> --- a/drivers/acpi/nfit.c
> +++ b/drivers/acpi/nfit.c
> @@ -1009,7 +1009,7 @@ static void wmb_blk(struct nfit_blk *nfit_blk)
>  		wmb_pmem();
>  }
>  
> -static u64 read_blk_stat(struct nfit_blk *nfit_blk, unsigned int bw)
> +static u32 read_blk_stat(struct nfit_blk *nfit_blk, unsigned int bw)
>  {
>  	struct nfit_blk_mmio *mmio = &nfit_blk->mmio[DCR];
>  	u64 offset = nfit_blk->stat_offset + mmio->size * bw;
> @@ -1017,7 +1017,7 @@ static u64 read_blk_stat(struct nfit_blk *nfit_blk, unsigned int bw)
>  	if (mmio->num_lines)
>  		offset = to_interleave_offset(offset, mmio);
>  
> -	return readq(mmio->base + offset);
> +	return readl(mmio->base + offset);
>  }
>  
>  static void write_blk_ctl(struct nfit_blk *nfit_blk, unsigned int bw,
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ