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, 2 Feb 2018 22:50:20 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Jan H. Schönherr <jschoenh@...zon.de>
Cc:     Ingo Molnar <mingo@...hat.com>,
        Thomas Gleixner <tglx@...utronix.de>, x86@...nel.org,
        "H. Peter Anvin" <hpa@...or.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86: e820: Implement a range manipulation operator

On Fri, Feb 2, 2018 at 1:13 AM, Jan H. Schönherr <jschoenh@...zon.de> wrote:

> +                       [KNL,ACPI] Convert memory within the specified region
> +                       from <oldtype> to <newtype>. If "-<oldtype>" is left
> +                       out, the whole region will be marked as <newtype>,
> +                       even if previously unavailable. If "+<newtype>" is left
> +                       out, matching memory will be removed. Types are
> +                       specified as e820 types, eg, 1==RAM, 2==reserved,
> +                       3==ACPI, 12==PRAM.

s/==/ = /g


> +       } else if (*p == '%') {
> +               enum e820_type from = 0, to = 0;
> +
> +               start_at = memparse(p + 1, &p);
> +               if (*p == '-')
> +                       from = simple_strtoull(p + 1, &p, 0);
> +               if (*p == '+')
> +                       to = simple_strtoull(p + 1, &p, 0);
> +               if (*p != 0)

if (*p)

or

if (*p != '\0')

?

> +                       return -EINVAL;
> +               if (from && to)
> +                       e820__range_update(start_at, mem_size, from, to);
> +               else if (to)
> +                       e820__range_add(start_at, mem_size, to);
> +               else if (from)
> +                       e820__range_remove(start_at, mem_size, from, 1);
> +               else
> +                       e820__range_remove(start_at, mem_size, 0, 0);

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ