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: <CAOSf1CEBYYNTPffkzCbBZvTPXBw=GQjd4hMC4HGeN=48S_Vqcw@mail.gmail.com>
Date:   Wed, 16 Aug 2017 15:23:08 +1000
From:   Oliver <oohall@...il.com>
To:     Dan Williams <dan.j.williams@...el.com>
Cc:     kbuild test robot <lkp@...el.com>, kbuild-all@...org,
        "linux-nvdimm@...ts.01.org" <linux-nvdimm@...ts.01.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/3] libnvdimm, pfn, dax: show supported dax/pfn region
 alignments in sysfs

On Wed, Aug 16, 2017 at 1:47 AM, Dan Williams <dan.j.williams@...el.com> wrote:
> On Mon, Aug 14, 2017 at 11:46 PM, Oliver <oohall@...il.com> wrote:
>> On Tue, Aug 15, 2017 at 4:02 PM, kbuild test robot <lkp@...el.com> wrote:
> [..]
>>>    114  static const unsigned long *nd_pfn_supported_alignments(void)
>>>    115  {
>>>    116          /*
>>>    117           * This needs to be a local variable because the *_SIZE macros
>>>    118           * aren't always constants.
>>>    119           */
>>
>> I probably should have been clearer, "local" here really means
>> "non-static". Otherwise the array could have been made a global.
>>
>
> Whoops, my fault. How about this:
>
> @@ -127,8 +127,11 @@ static const unsigned long
> *nd_pfn_supported_alignments(void)
>  #endif
>                 0,
>         };
> +       static unsigned long data[ARRAY_SIZE(supported_alignments)];
>
> -       return supported_alignments;
> +       memcpy(data, supported_alignments, sizeof(data));
> +
> +       return data;
>  }

That should do the trick, but you'll need to fix up the source array
declaration too.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ