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: <283c563a-06a9-9c12-bd4e-d15e790fad57@grimberg.me>
Date:   Thu, 27 Feb 2020 15:13:07 -0800
From:   Sagi Grimberg <sagi@...mberg.me>
To:     Logan Gunthorpe <logang@...tatee.com>,
        linux-kernel@...r.kernel.org, linux-nvme@...ts.infradead.org
Cc:     Christoph Hellwig <hch@....de>, Keith Busch <kbusch@...nel.org>,
        Jens Axboe <axboe@...com>,
        Chaitanya Kulkarni <Chaitanya.Kulkarni@....com>,
        Max Gurtovoy <maxg@...lanox.com>,
        Stephen Bates <sbates@...thlin.com>
Subject: Re: [PATCH v11 8/9] nvmet-passthru: Add enable/disable helpers


>>> +    if (subsys->ver < NVME_VS(1, 2, 1)) {
>>> +        pr_warn("nvme controller version is too old: %d.%d.%d,
>>> advertising 1.2.1\n",
>>> +            (int)NVME_MAJOR(subsys->ver),
>>> +            (int)NVME_MINOR(subsys->ver),
>>> +            (int)NVME_TERTIARY(subsys->ver));
>>> +        subsys->ver = NVME_VS(1, 2, 1);
>>
>> Umm.. is this OK? do we implement the mandatory 1.2.1 features on behalf
>> of the passthru device?
> 
> This was the approach that Christoph suggested. It seemed sensible to
> me. However, it would also *probably* be ok to just reject these
> devices. Unless you feel strongly about this, I'll probably leave it the
> way it is.

Sounds ok to me.

>>> +    }
>>> +
>>> +    mutex_unlock(&subsys->lock);
>>> +    return 0;
>>> +
>>> +out_put_ctrl:
>>> +    nvme_put_ctrl(ctrl);
>>> +out_unlock:
>>> +    mutex_unlock(&subsys->lock);
>>> +    return ret;
>>> +}
>>> +
>>> +static void __nvmet_passthru_ctrl_disable(struct nvmet_subsys *subsys)
>>> +{
>>> +    if (subsys->passthru_ctrl) {
>>> +        xa_erase(&passthru_subsystems, subsys->passthru_ctrl->cntlid);
>>> +        nvme_put_ctrl(subsys->passthru_ctrl);
>>> +    }
>>> +    subsys->passthru_ctrl = NULL;
>>> +    subsys->ver = NVMET_DEFAULT_VS;
>>> +}
>>
>> Isn't it strange that a subsystem changes its version in its lifetime?
> 
> It does seem strange. However, it's not at all unprecedented. See
> nvmet_subsys_attr_version_store() which gives the user direct control of
> the version through configfs.

You're right.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ