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  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]
Date:	Mon, 28 Jul 2014 12:06:33 -0400
From:	Nick Krause <xerofoify@...il.com>
To:	Stefan Weinhuber <WEIN@...ibm.com>
Cc:	BOEBLINGEN LINUX390 <LINUX390@...ibm.com>,
	heicars2@...ux.vnet.ibm.com,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	linux-s390@...r.kernel.org, mschwid2@...ux.vnet.ibm.com,
	Stefan Haberland1 <stefan.haberland@...ibm.com>
Subject: Re: [PATCH] s390: Fix me in dasd_eer.c

On Mon, Jul 28, 2014 at 12:02 PM, Stefan Weinhuber <WEIN@...ibm.com> wrote:
> Nicholas Krause <xerofoify@...il.com> wrote on 2014-07-22 08:29:32:
>
> [..]
>> Subject:
>>
>> [PATCH] s390: Fix me in dasd_eer.c
>>
>> This patch changes return type to EMEDUIMTYPE in function,
> dasd_eer_enable
>> for when checking if the medium has no errors according to this
> function.
>>
>> Signed-off-by: Nicholas Krause <xerofoify@...il.com>
>> ---
>>  drivers/s390/block/dasd_eer.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/s390/block/dasd_eer.c
> b/drivers/s390/block/dasd_eer.c
>> index 21ef63c..08ee040 100644
>> --- a/drivers/s390/block/dasd_eer.c
>> +++ b/drivers/s390/block/dasd_eer.c
>> @@ -462,7 +462,7 @@ int dasd_eer_enable(struct dasd_device *device)
>>        return 0;
>>
>>     if (!device->discipline || strcmp(device->discipline->name, "ECKD"))
>> -      return -EPERM;   /* FIXME: -EMEDIUMTYPE ? */
>> +      return -EMEDIUMTYPE;   /* FIXME: -EMEDIUMTYPE ? */
>>
>>     cqr = dasd_kmalloc_request(DASD_ECKD_MAGIC, 1 /* SNSS */,
>>                 SNSS_DATA_SIZE, device);
>> --
>> 1.9.1
>>
>
> Hm, after some consideration, I have to disagree with your suggestion.
> If you try to enable EER on an FBA device, you will get the following
> result with current code:
>
> $ echo 1 > eer_enabled
> -bash: echo: write error: Operation not permitted
>
> and with your code the following:
>
> $ echo 1 > eer_enabled
> -bash: echo: write error: Wrong medium type
>
> When I wrote this code, I was not sure which one is better. But today I
> say
> that the 'Operation not permitted' is more to the point. An FBA device
> has no (changable) medium, so what could be wrong about its type?
> Could be confusing.
>
> From your patch description I do not really get why you want to change the
> return code. Why do you think that EMEDIUMTYPE is better than EPERM?
>
> Mit freundlichen Grüßen / Kind regards
>
> Stefan Weinhuber
>
Stefan,
>From my reading seemed more like EMEDUIMTYPE return but seems I was
wrong here. If you want I can remove the fix me message in a patch if you
want to keep this return type.
Regards Nick
--
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