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]
Date:   Fri, 15 Jun 2018 23:06:01 +0200
From:   "Luis R. Rodriguez" <mcgrof@...nel.org>
To:     "Luis R. Rodriguez" <mcgrof@...nel.org>
Cc:     tytso@....edu, jack@...e.com, adilger.kernel@...ger.ca,
        linux-ext4@...r.kernel.org, snitzer@...hat.com, hare@...e.de,
        axboe@...nel.dk, mwilck@...e.com,
        Damien Le Moal <damien.lemoal@....com>,
        Bart Van Assche <Bart.VanAssche@....com>
Subject: Re: [PATCH] e2fsprogs: detect zoned disks and prevent their raw use

On Fri, Jun 15, 2018 at 01:56:30PM -0700, Luis R. Rodriguez wrote:
> +static errcode_t is_zoned_disk(const char *path)
> +{
> +	char str[PATH_MAX];
> +	char *devname = basename(path);
> +	FILE *file;
> +	int len;
> +
> +	len = snprintf(str, sizeof(str), "/sys/block/%s/queue/zoned", devname);
> +
> +	/* Indicates truncation */
> +	if (len >= PATH_MAX)
> +		return EXT2_ET_INVALID_ARGUMENT;
> +
> +	file = fopen(str, "r");
> +	if (!file)
> +		return 0;
> +
> +	fclose(file);
> +
> +	return EXT2_ET_ZONE_UNSUPPORTED;
> +}


Seems this needs to be extended to ensure this is host-managed only, will spin
a v2 later.

  Luis

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ