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: <20200831062552.GH13723@shuo-intel.sh.intel.com>
Date:   Mon, 31 Aug 2020 14:25:52 +0800
From:   Shuo A Liu <shuo.a.liu@...el.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     <linux-kernel@...r.kernel.org>, "H . Peter Anvin" <hpa@...or.com>,
        "Thomas Gleixner" <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "Borislav Petkov" <bp@...en8.de>,
        Sean Christopherson <sean.j.christopherson@...el.com>,
        Yu Wang <yu1.wang@...el.com>,
        Reinette Chatre <reinette.chatre@...el.com>, <x86@...nel.org>,
        Zhi Wang <zhi.a.wang@...el.com>,
        Zhenyu Wang <zhenyuw@...ux.intel.com>
Subject: Re: [PATCH 06/17] virt: acrn: Introduce VM management interfaces

Hi Greg,

On Sun 30.Aug'20 at  9:23:42 +0200, Greg Kroah-Hartman wrote:
>On Sat, Aug 29, 2020 at 07:04:36PM +0800, Shuo A Liu wrote:
>> On Fri 28.Aug'20 at 12:27:38 +0200, Greg Kroah-Hartman wrote:
>> > On Tue, Aug 25, 2020 at 10:45:06AM +0800, shuo.a.liu@...el.com wrote:
>> > > +	default:
>> > > +		pr_warn("Unknown IOCTL 0x%x!\n", cmd);
>> > > +		ret = -EINVAL;
>> >
>> > Wrong error value here, right?
>>
>> Right, it should be -ENOIOCTLCMD.
>
>It could, but really, just return the correct error for this, to prevent
>the core from having to do the conversion.
>
>The reviewers at Intel who should have read this before submitting it,
>know the correct value to return for an illegal ioctl, please go ask
>them.
>
>> However, i found many instances in kernel drivers return -EINVAL for no
>> ioctl command support. :)
>
>Then they too are wrong.  No need to add known bugs before the code is
>accepted.
>
>See the comments above the is_unrecognized_ioctl() in block/ioctl.c for
>all of the details and why -EINVAL is not the correct thing to do here.

Thanks for the information. -ENOTTY will be used.

Thanks
shuo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ