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]
Message-ID: <281c8196-2a5c-28cf-346a-0ae2f7182f1b@huawei.com>
Date:   Thu, 9 Dec 2021 09:59:11 +0800
From:   "Leizhen (ThunderTown)" <thunder.leizhen@...wei.com>
To:     Rob Herring <robh@...nel.org>
CC:     Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        <x86@...nel.org>, "H . Peter Anvin" <hpa@...or.com>,
        <linux-kernel@...r.kernel.org>, Dave Young <dyoung@...hat.com>,
        Baoquan He <bhe@...hat.com>, Vivek Goyal <vgoyal@...hat.com>,
        Eric Biederman <ebiederm@...ssion.com>,
        <kexec@...ts.infradead.org>,
        Catalin Marinas <catalin.marinas@....com>,
        "Will Deacon" <will@...nel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        "Frank Rowand" <frowand.list@...il.com>,
        <devicetree@...r.kernel.org>, "Jonathan Corbet" <corbet@....net>,
        <linux-doc@...r.kernel.org>, Randy Dunlap <rdunlap@...radead.org>,
        Feng Zhou <zhoufeng.zf@...edance.com>,
        Kefeng Wang <wangkefeng.wang@...wei.com>,
        Chen Zhou <dingguo.cz@...group.com>
Subject: Re: [PATCH v16 10/11] of: fdt: Add memory for devices by DT property
 "linux,usable-memory-range"



On 2021/12/1 10:55, Leizhen (ThunderTown) wrote:
>>> +	}
>>>  
>>> -	memblock_cap_memory_range(cap_mem_addr, cap_mem_size);
>>> +	memblock_cap_memory_range(rgn[0].base, rgn[0].size);
>>> +	for (i = 1; i < MAX_USABLE_RANGES && rgn[i].size; i++)
>> s/ &&/,/

Hi Rob:
  I want to keep "&&" unchanged, do you mind? I'm going to post an
updated version tomorrow, hopefully the last.

> Hi Rob:
> 
> The comma operator may not be suitable for logical judgment. The logical judgment
> before commas (,) is ignored.
> 
> Here's my test:
> 
> C code:
> int main()
> {
>         int i, j;
> 
>         printf("&&:\n");
>         for (i = 0, j = 0; i < 2 && j < 3; i++, j++)
>                 printf("i=%d, j=%d\n", i, j);
> 
>         printf("\ncomma:\n");
>         for (i = 0, j = 0; i < 2, j < 3; i++, j++)	//(i < 2) before comma is ignored
>                 printf("i=%d, j=%d\n", i, j);
> 
>         return 0;
> }
> 
> Output:
> &&:
> i=0, j=0
> i=1, j=1
> 
> comma:
> i=0, j=0
> i=1, j=1
> i=2, j=2
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ