All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] [PATCH] sensors-detect: restrict Super I/O probing to x86
@ 2015-08-09 10:00 Aurelien Jarno
  2015-08-10  8:54 ` Jean Delvare
  0 siblings, 1 reply; 2+ messages in thread
From: Aurelien Jarno @ 2015-08-09 10:00 UTC (permalink / raw)
  To: lm-sensors

The current sensors-detect avoid Super I/O chips probing on
PowerPC machines. However I have also been reported that this code
can also crash ARM machines. I therefore believe the probing should
be done only on x86 machines. The patch below changes that.

--- a/prog/detect/sensors-detect
+++ b/prog/detect/sensors-detect
@@ -6889,9 +6889,9 @@
 	print "\n";
 
 	$superio_features = 0;
-	# Skip "random" I/O port probing on PPC
-	if ($kernel_arch ne 'ppc'
-	 && $kernel_arch ne 'ppc64') {
+	# Skip "random" I/O port probing on non x86 machines
+	if ($kernel_arch =~ /i?86/
+	 || $kernel_arch eq 'x86_64') {
 		print "Some Super I/O chips contain embedded sensors. We have to write to\n".
 		      "standard I/O ports to probe them. This is usually safe.\n";
 		print "Do you want to scan for Super I/O sensors? (YES/no): ";

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                 http://www.aurel32.net

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [lm-sensors] [PATCH] sensors-detect: restrict Super I/O probing to x86
  2015-08-09 10:00 [lm-sensors] [PATCH] sensors-detect: restrict Super I/O probing to x86 Aurelien Jarno
@ 2015-08-10  8:54 ` Jean Delvare
  0 siblings, 0 replies; 2+ messages in thread
From: Jean Delvare @ 2015-08-10  8:54 UTC (permalink / raw)
  To: lm-sensors

Hi Aurelien,

On Sun, 9 Aug 2015 12:00:48 +0200, Aurelien Jarno wrote:
> The current sensors-detect avoid Super I/O chips probing on
> PowerPC machines. However I have also been reported that this code
> can also crash ARM machines. I therefore believe the probing should
> be done only on x86 machines. The patch below changes that.

In general I am fine with the idea, hardware detection can be
troublesome so a white list feels safer than a black list. However I am
curious if these kind of chips can also be found on other
architectures? Maybe IA-64?

Well I suppose that other architectures can be added to the list later
if needed.

> --- a/prog/detect/sensors-detect
> +++ b/prog/detect/sensors-detect
> @@ -6889,9 +6889,9 @@
>  	print "\n";
>  
>  	$superio_features = 0;
> -	# Skip "random" I/O port probing on PPC
> -	if ($kernel_arch ne 'ppc'
> -	 && $kernel_arch ne 'ppc64') {
> +	# Skip "random" I/O port probing on non x86 machines
> +	if ($kernel_arch =~ /i?86/

I've changed that to m/^i[3456]86$/ as it seems safer.

> +	 || $kernel_arch eq 'x86_64') {
>  		print "Some Super I/O chips contain embedded sensors. We have to write to\n".
>  		      "standard I/O ports to probe them. This is usually safe.\n";
>  		print "Do you want to scan for Super I/O sensors? (YES/no): ";
> 

Thanks,
-- 
Jean Delvare
SUSE L3 Support

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-08-10  8:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-09 10:00 [lm-sensors] [PATCH] sensors-detect: restrict Super I/O probing to x86 Aurelien Jarno
2015-08-10  8:54 ` Jean Delvare

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.