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, 8 Dec 2023 21:25:56 +0000
From:   "Verma, Vishal L" <vishal.l.verma@...el.com>
To:     "Huang, Ying" <ying.huang@...el.com>
CC:     "david@...hat.com" <david@...hat.com>,
        "Jiang, Dave" <dave.jiang@...el.com>,
        "dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
        "linux-cxl@...r.kernel.org" <linux-cxl@...r.kernel.org>,
        "Jonathan.Cameron@...wei.com" <Jonathan.Cameron@...wei.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Williams, Dan J" <dan.j.williams@...el.com>,
        "nvdimm@...ts.linux.dev" <nvdimm@...ts.linux.dev>
Subject: Re: [PATCH v2 2/2] dax: add a sysfs knob to control memmap_on_memory
 behavior

On Fri, 2023-12-08 at 11:13 +0800, Huang, Ying wrote:
> Vishal Verma <vishal.l.verma@...el.com> writes:
> 
[..]
> > 
> > +
> > +static ssize_t memmap_on_memory_store(struct device *dev,
> > +                                     struct device_attribute *attr,
> > +                                     const char *buf, size_t len)
> > +{
> > +       struct dev_dax *dev_dax = to_dev_dax(dev);
> > +       struct dax_region *dax_region = dev_dax->region;
> > +       ssize_t rc;
> > +       bool val;
> > +
> > +       rc = kstrtobool(buf, &val);
> > +       if (rc)
> > +               return rc;
> > +
> > +       if (dev_dax->memmap_on_memory == val)
> > +               return len;
> > +
> > +       device_lock(dax_region->dev);
> > +       if (!dax_region->dev->driver) {
> 
> This still doesn't look right.  Can we check whether the current driver
> is kmem?  And only allow change if it's not kmem?

Ah yes I lost track of this todo between revisions when I split this
out. Let me fix that for the next revision.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ