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:   Thu, 11 Apr 2019 17:20:31 -0500
From:   "Gustavo A. R. Silva" <gustavo@...eddedor.com>
To:     Miquel Raynal <miquel.raynal@...tlin.com>
Cc:     Kyungmin Park <kyungmin.park@...sung.com>,
        Boris Brezillon <bbrezillon@...nel.org>,
        Richard Weinberger <richard@....at>,
        David Woodhouse <dwmw2@...radead.org>,
        Brian Norris <computersforpeace@...il.com>,
        Marek Vasut <marek.vasut@...il.com>,
        Wan ZongShun <mcuos.com@...il.com>,
        linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        Kees Cook <keescook@...omium.org>
Subject: Re: [PATCH v2] mtd: rawnand: mark expected switch fall-throughs



On 4/11/19 5:10 PM, Miquel Raynal wrote:
> Hi Gustavo,
> 
> "Gustavo A. R. Silva" <gustavo@...eddedor.com> wrote on Thu, 11 Apr
> 2019 13:30:31 -0500:
> 
>> Hi Miquel,
>>
>> On 2/5/19 6:55 AM, Miquel Raynal wrote:
>> [..]
>>>> @@ -3280,12 +3280,14 @@ static void onenand_check_features(struct mtd_info *mtd)
>>>>  			if ((this->version_id & 0xf) == 0xe)
>>>>  				this->options |= ONENAND_HAS_NOP_1;
>>>>  		}
>>>> +		/* fall through */
>>>>  
>>>>  	case ONENAND_DEVICE_DENSITY_2Gb:
>>>>  		/* 2Gb DDP does not have 2 plane */
>>>>  		if (!ONENAND_IS_DDP(this))
>>>>  			this->options |= ONENAND_HAS_2PLANE;
>>>>  		this->options |= ONENAND_HAS_UNLOCK_ALL;
>>>> +		/* fall through */  
>>>
>>> This looks strange.
>>>
>>> In ONENAND_DEVICE_DENSITY_2Gb:
>>> ONENAND_HAS_UNLOCK_ALL is set unconditionally.
>>>
>>> But then, under ONENAND_DEVICE_DENSITY_1Gb, the same option is set only
>>> if process is evaluated to true.
>>>
>>> Same problem with ONENAND_HAS_2PLANE:
>>> - it is set in ONENAND_DEVICE_DENSITY_4Gb only if ONENAND_IS_DDP()
>>> - it is unset in ONENAND_DEVICE_DENSITY_2Gb only if !ONENAND_IS_DDP()
>>>
>>> Maybe this portion should be reworked because I am unsure if this is a
>>> missing fall through or a bug.
>>>   
>>
>> I wonder if you had the chance to take a look into this piece of code.
>>
>> Thanks
>> --
>> Gustavo
> 
> What do you mean?
> 

You commented that the piece of code above should be reworked. So, it wasn't
clear to me who was going to do that; and that's why I'm asking if you took
a look into it and finally determine whether we are dealing with an actual
bug or a false positive.

Thanks
--
Gustavo


Powered by blists - more mailing lists