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: <87ldhgl1lg.fsf@bootlin.com>
Date: Thu, 29 Jan 2026 19:23:39 +0100
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: linux-mtd@...ts.infradead.org,  linux-kernel@...r.kernel.org,  Richard
 Weinberger <richard@....at>,  Vignesh Raghavendra <vigneshr@...com>
Subject: Re: [PATCH v1 1/1] mtd: cfi_cmdset_0001: Factor out
 do_write_buffer_locked() to reduce stack frame

Hi Andy,

>> Fix this by factoring out do_write_buffer_locked().
>
> ...
>
>>  	XIP_INVAL_CACHED_RANGE(map, initial_adr, initial_len);
>>  	ENABLE_VPP(map);
>
> It seems more logical to leave these two in the original call.
>
> ...

[...]

>> +	DISABLE_VPP(map);
>
> Otherwise this will seem dangling here.
>
>>  	put_chip(map, chip, cmd_adr);
>>  	mutex_unlock(&chip->mutex);
>>  	return ret;
>
> ...
>
> Another approach is to leave goto as is in the _locked() and move DISABLE_VPP()
> there.
>
> Tell me what do you prefer?

While I also find more logical to keep the ENABLE_VPP/DISABLE_VPP
together, I do not mind to see them in one side or the other. I would by
default let them in the main caller and suffi the inner function with
"_locked()" as you did, but I'm fine either ways.

Thanks,
Miquèl

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ