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] [day] [month] [year] [list]
Date:	Wed, 08 Sep 2010 01:20:29 +0200
From:	Florian Tobias Schandinat <FlorianSchandinat@....de>
To:	Andrew Morton <akpm@...ux-foundation.org>
CC:	linux-fbdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	Joseph Chan <JosephChan@....com.tw>,
	Jonathan Corbet <corbet@....net>
Subject: Re: [RFC] viafb: add interface for output device configuration

Andrew Morton schrieb:
> On Mon,  6 Sep 2010 22:48:10 +0000
> Florian Tobias Schandinat <FlorianSchandinat@....de> wrote:
> 
>> viafb: add interface for output device configuration
>>
>> This patch extends the proc entry to contain a possibility to view and
>> change the output devices for each IGA. This is useful for debugging
>> output problems as it provides a reliable way to query which low level
>> devices are active after VIAs output device configuration nightmare
>> happended. It's as well suitable for daily use as one can change the
>> output configuration on the fly for example to connect a projector.
>> At the moment it's still unstable. The reason is that we have to handle
>> a bunch of undocumented output devices (those without a proper name) and
>> that this patch is the first step to collect and verify the needed
>> information. Basically the only configuration change that is expected to
>> work at the moment is switching output devices between IGA1 and IGA2.
>>
>> ...
>>  
>> +u32 via_parse_odev(char *input, char **end)
>> +{
>> +	char *ptr = input;
>> +	u32 odev = 0;
>> +	bool next = true;
>> +	int i, len;
>> +
>> +	while (next) {
>> +		next = false;
>> +		for (i = 0; i < ARRAY_SIZE(device_mapping); i++) {
>> +			len = strlen(device_mapping[i].name);
>> +			if (!strncmp(ptr, device_mapping[i].name, len)) {
>> +				odev |= device_mapping[i].device;
>> +				ptr += len;
>> +				if (*ptr == ',') {
>> +					ptr++;
>> +					next = true;
>> +				}
>> +			}
>> +		}
>> +	}
>> +
>> +	*end = ptr;
>> +	return odev;
>> +}
> 
> So people must decrypt the above code
> 
>> +		iga1_entry = proc_mkdir("iga1", viafb_entry);
>> +		shared->iga1_proc_entry = iga1_entry;
>> +		proc_create("output_devices", 0, iga1_entry,
>> +			&viafb_iga1_odev_proc_fops);
>> +		iga2_entry = proc_mkdir("iga2", viafb_entry);
>> +		shared->iga2_proc_entry = iga2_entry;
>> +		proc_create("output_devices", 0, iga2_entry,
>> +			&viafb_iga2_odev_proc_fops);
>>  	}
> 
> to work out what to write into these?
> 
> Can we have a wee bit of documetnation, please?  At least in the
> changelog, but Documentation/fb/viafb.txt would be a better place.

Of course. I just wanted to make sure that the interface is sane and reasonable 
and improve the code to do the right thing at least in most of the cases before 
writing proper documentation for it. I hope that I can achieve the first with 
this e-mail and for the later I just prepared a patch which I'm testing at the 
moment. If there are no objections against this interface I hope I can send a 
complete patch series including this patch, major improvements and documentation 
within a week.


Thanks,

Florian Tobias Schandinat
--
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