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, 22 Sep 2023 12:36:59 +0200
From:   Borislav Petkov <bp@...en8.de>
To:     Ingo Molnar <mingo@...nel.org>
Cc:     linux-kernel@...r.kernel.org, linux-tip-commits@...r.kernel.org,
        Paolo Bonzini <pbonzini@...hat.com>, x86@...nel.org
Subject: Re: [tip: x86/cpu] x86/cpu: Clear SVM feature if disabled by BIOS

On Fri, Sep 22, 2023 at 12:26:09PM +0200, Ingo Molnar wrote:
> It's a bit sad that we are duplicating identical code.
> 
> 2)
> 
> We are doing it in other cases as well: for example nearby_node() is 
> duplicated between arch/x86/kernel/cpu/amd.c and 
> arch/x86/kernel/cpu/hygon.c too.

We could do a unification pass at some point. At the moment is not worth
the effort, IMO, for only a handful of small functions.

> BTW., while look at this code I noticed that the 'Author' copyright
> tag in arch/x86/kernel/cpu/hygon.c seems to be inaccurate:
> 
>  // SPDX-License-Identifier: GPL-2.0+
>  /*
>   * Hygon Processor Support for Linux
>   *
>   * Copyright (C) 2018 Chengdu Haiguang IC Design Co., Ltd.
>   *
>   * Author: Pu Wen <puwen@...on.cn>
>   */     
> 
> ... as for example the nearby_node() was clearly copied & derived from 
> arch/x86/kernel/cpu/amd.c, which does not appear to be accurately reflected 
> in this copyright notice?

Perhaps it should say "copied from amd.c and adjusted" or so. That whole
file has pretty-much copied parts of amd.c AFAICT.

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ