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:   Sun,  6 Sep 2020 21:29:26 +0200
From:   Paul Cercueil <paul@...pouillou.net>
To:     Thomas Bogendoerfer <tsbogend@...ha.franken.de>
Cc:     "Maciej W . Rozycki" <macro@...ux-mips.org>,
        Paul Burton <paulburton@...nel.org>,
        Zhou Yanjie <zhouyanjie@...yeetech.com>, od@...c.me,
        linux-kernel@...r.kernel.org, linux-mips@...r.kernel.org,
        Paul Cercueil <paul@...pouillou.net>
Subject: [PATCH v3 06/15] MIPS: generic: Allow boards to set system type

Check for the (already existing) "system_type" variable in the
get_system_type() function. If non-NULL, return it as the system type.

Signed-off-by: Paul Cercueil <paul@...pouillou.net>
---

Notes:
    v2: Instead of adding a .get_system_type callback to the mips_machine
    	struct, the boards now simply override the "system_type" variable
    	when they want to set a custom one.
    
    v3: No change

 arch/mips/generic/proc.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/mips/generic/proc.c b/arch/mips/generic/proc.c
index 4c992809cc3f..cce2fde219a3 100644
--- a/arch/mips/generic/proc.c
+++ b/arch/mips/generic/proc.c
@@ -8,11 +8,16 @@
 
 #include <asm/bootinfo.h>
 
+char *system_type;
+
 const char *get_system_type(void)
 {
 	const char *str;
 	int err;
 
+	if (system_type)
+		return system_type;
+
 	err = of_property_read_string(of_root, "model", &str);
 	if (!err)
 		return str;
-- 
2.28.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ