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]
Message-ID: <513E0FF6.1050909@wwwdotorg.org>
Date:	Mon, 11 Mar 2013 11:10:14 -0600
From:	Stephen Warren <swarren@...dotorg.org>
To:	Danny Huang <dahuang@...dia.com>
CC:	linux@....linux.org.uk, ldewangan@...dia.com, pgaikwad@...dia.com,
	linux-arm-kernel@...ts.infradead.org, linux-tegra@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] arm: tegra: fuse: export chip id and revision

On 03/11/2013 06:37 AM, Danny Huang wrote:
> Expose tegra chip id and revision in /proc/cpu/chipinfo for user mode
> usage.

I agree with Shawn's comments, but I have a few other comments here too
for the record.

Nit: "Tegra" and "ID" above should be capitalized as I've done so in
this sentence.

> diff --git a/arch/arm/mach-tegra/fuse.c b/arch/arm/mach-tegra/fuse.c

> +static int __init tegra_chip_info(void)
> +{
> +	proc_entry = create_proc_entry("cpu/chipinfo", S_IRUGO, NULL);
> +	if (proc_entry)
> +		proc_entry->read_proc = show_chip_info;
> +	return 0;
> +}
> +
> +late_initcall(tegra_chip_info);

Please don't introduce any more initcalls. Especially initcalls that are
not conditional on the run-time (rather than compile-time) SoC. This
code may be compiled into a kernel that supports SoCs other than Tegra.
However, tegra_chip_info() shouldn't run on those SoCs.

It'd probably be simplest to just perform this initialization as part of
the already-existing tegra_init_fuse(). If not, please call this
initialization function from one of the initialization functions in
arch/arm/mach-tegra/common.c. Both those cases only execute on Tegra.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ