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]
Date:	Wed, 13 Jan 2016 09:56:20 +0800
From:	Peter Hung <hpeter@...il.com>
To:	Simon Guinot <simon.guinot@...uanux.org>
Cc:	linus.walleij@...aro.org, gnurou@...il.com,
	linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
	tom_tsai@...tek.com.tw, peter_hong@...tek.com.tw,
	Peter Hung <hpeter+linux_kernel@...il.com>
Subject: Re: [PATCH 2/2] gpio-f7188x: filter non-export gpio for F81866

Hi Simon,

>> @@ -351,6 +485,15 @@ static int f7188x_gpio_probe(struct platform_device *pdev)
>>   	for (i = 0; i < data->nr_bank; i++) {
>>   		struct f7188x_gpio_bank *bank = &data->bank[i];
>>
>> +		/*
>> +		 * Dont export GPIO sysfs if pin set is not enable by MB
>> +		 * manufacturer.
>
> What does MB stands for ?

The MB is stands for "Motherboard", Due to the limit of 80 words length,
I use the abbreviation.

>> +		 */
>> +		if (sio->type == f81866 && f81866_verify_gpioset(sio->addr, i))
>> +			continue;
>
> This whole filtering mechanism relies on the fact that the multiplexing
> configuration has been correctly applied by the BIOS (if applied at
> all). But I wonder if it is often the case. For example, I have several
> boards for which it is not true. And to make the GPIOs available, I need
> first to fix the multiplexing pin configuration of the Super I/O.
>
> Maybe it would be more correct to rely on the hardware description of a
> board (Device Tree or ACPI) to decide which GPIO bank can be enabled or
> not.

That's good for control by Device Tree or ACPI.

IMO, we shouldn't export GPIOs not enabled if the BIOS had written
wrong configuration to SuperIO, but it's only my opinion. Should I
do filter for this?

Thanks for your advices.
-- 
With Best Regards,
Peter Hung

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ