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: <703d46e209b0e7163e46b807aba761c93b4a90c9.camel@perches.com>
Date:   Tue, 30 Mar 2021 11:12:43 -0700
From:   Joe Perches <joe@...ches.com>
To:     Tomas Winkler <tomas.winkler@...el.com>,
        Miquel Raynal <miquel.raynal@...tlin.com>,
        Richard Weinberger <richard@....at>,
        Vignesh Raghavendra <vigneshr@...com>,
        linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org
Cc:     Tamar Mashiah <tamar.mashiah@...el.com>,
        Mika Westerberg <mika.westerberg@...ux.intel.com>
Subject: Re: [PATCH] mtd: intel-spi: add is_protected and is_bios_locked
 knobs

On Tue, 2021-03-30 at 18:54 +0300, Tomas Winkler wrote:
> From: Tamar Mashiah <tamar.mashiah@...el.com>
[]
> the region protection status is exposed via sysfs file
> as the manufacturing will need the both files in order to validate
> that the device is properly sealed.
[]
> diff --git a/drivers/mtd/spi-nor/controllers/intel-spi.c b/drivers/mtd/spi-nor/controllers/intel-spi.c
[]
> +static ssize_t intel_spi_is_protected_show(struct device *dev,
> +					   struct device_attribute *attr, char *buf)
> +{
> +	struct intel_spi *ispi = dev_get_drvdata(dev);
> +
> +	return sysfs_emit(buf, "%d", ispi->is_protected);

These should also include a newline in the format.  i.e.:

	return sysfs_emit(buf, "%d\n", ispi->is_protected);


> +static ssize_t intel_spi_bios_lock_show(struct device *dev,
> +					struct device_attribute *attr, char *buf)
> +{
> +	struct intel_spi *ispi = dev_get_drvdata(dev);
> +
> +	return sysfs_emit(buf, "%d", ispi->is_bios_locked);

etc...


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ