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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dfe856d6-a4db-b406-ef18-dba3b6b8c342@suse.com>
Date:   Mon, 10 Sep 2018 10:33:16 +0200
From:   Juergen Gross <jgross@...e.com>
To:     Borislav Petkov <bp@...en8.de>
Cc:     LKML <linux-kernel@...r.kernel.org>, x86@...nel.org,
        virtualization@...ts.linux-foundation.org
Subject: Re: [PATCH] x86/paravirt: Cleanup native_patch()

On 10/09/18 09:01, Borislav Petkov wrote:
> On Mon, Sep 10, 2018 at 08:54:12AM +0200, Juergen Gross wrote:
>>> +	case PARAVIRT_PATCH(lock.queued_spin_unlock):
>>> +		if (pv_is_native_spin_unlock())
>>> +			return paravirt_patch_insns(ibuf, len,
>>> +						    start_lock_queued_spin_unlock,
>>> +						    end_lock_queued_spin_unlock);
>>> +		else
>>> +			return paravirt_patch_default(type, ibuf, addr, len);
>>
>> Why not replace the else clause by a "break;" and ...
> 
> Because I think that exiting right then and there is much easier to
> follow than adding all those breaks and wading through ifdeffery
> to realize that this is the default path and we'll end up calling
> paravirt_patch_default() in the end.
> 

Really? All of the remaining coding would fit easily on one screen. No
hidden breaks anywhere and no deep nesting involved. And the ifdefs
hardly makes it more difficult to understand, as they are not even
nested.


Juergen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ