<?xml version="1.0" encoding="utf-8"?>
<!-- If you are running a bot please visit this policy page outlining rules you must respect. http://www.livejournal.com/bots/ -->
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:lj="http://www.livejournal.com">
  <id>urn:lj:livejournal.com:atom1:cnst</id>
  <title>Constantine A. Murenin</title>
  <subtitle>Constantine A. Murenin</subtitle>
  <author>
    <name>Constantine A. Murenin</name>
  </author>
  <link rel="alternate" type="text/html" href="http://cnst.livejournal.com/"/>
  <link rel="self" type="text/xml" href="http://cnst.livejournal.com/data/atom"/>
  <updated>2009-08-23T17:34:56Z</updated>
  <lj:journal userid="2634975" username="cnst" type="personal"/>
  <link rel="service.feed" type="application/x.atom+xml" href="http://cnst.livejournal.com/data/atom" title="Constantine A. Murenin"/>
  <link rel="hub" href="http://pubsubhubbub.appspot.com/"/>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cnst:95352</id>
    <link rel="alternate" type="text/html" href="http://cnst.livejournal.com/95352.html"/>
    <link rel="self" type="text/xml" href="http://cnst.livejournal.com/data/atom/?itemid=95352"/>
    <title>quotes of the week, or, Project-Sponsored Health Care</title>
    <published>2009-08-23T17:26:39Z</published>
    <updated>2009-08-23T17:34:56Z</updated>
    <category term="gsoc2007"/>
    <category term="gsoc2007.en"/>
    <category term="health care"/>
    <category term="freebsd-hackers"/>
    <category term="sensors"/>
    <category term="politics"/>
    <category term="freebsd"/>
    <content type="html">&lt;strong&gt;Subject: Re: Common interface for sensors/health monitoring&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;em&gt;The purists won out in that one by shouting loudly and screaming about socialized healthware. Consequently we have 47 million unsupported devices.&lt;/em&gt;&lt;/blockquote&gt;&lt;small&gt;&lt;a href="http://lists.freebsd.org/pipermail/freebsd-hackers/2009-August/029340.html"&gt;http://lists.freebsd.org/pipermail/freebsd-hackers/2009-August/029340.html&lt;/a&gt;&lt;/small&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;em&gt;In OpenBSD they have project sponsored healthware and sometimes you have to wait in a queue to get you notifications, and sometimes the queue is so long events have to get merged! Not for me!&lt;br /&gt;I want all my individual events to be lost After I get them.&lt;br /&gt;It's my right!&lt;/em&gt;&lt;/blockquote&gt;&lt;small&gt;&lt;a href="http://lists.freebsd.org/pipermail/freebsd-hackers/2009-August/029352.html"&gt;http://lists.freebsd.org/pipermail/freebsd-hackers/2009-August/029352.html&lt;/a&gt;&lt;/small&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cnst:59137</id>
    <link rel="alternate" type="text/html" href="http://cnst.livejournal.com/59137.html"/>
    <link rel="self" type="text/xml" href="http://cnst.livejournal.com/data/atom/?itemid=59137"/>
    <title>bash.org.ru</title>
    <published>2008-05-21T03:56:19Z</published>
    <updated>2008-05-21T03:58:41Z</updated>
    <category term="gsoc2007"/>
    <category term="hw.sensors"/>
    <category term="bsdcan2008"/>
    <category term="ottawa"/>
    <category term="phk"/>
    <category term="openbsd"/>
    <content type="html">Дело происходит в University of Ottawa. &lt;br /&gt;&lt;br /&gt;Суббота, 2008-05-17, около 11:25 северо-американского восточного времени.&lt;br /&gt;&lt;br /&gt;Подхожу к зданию &lt;abbr title="School of Information Technology and Engineering"&gt;SITE&lt;/abbr&gt;. Захожу в аудиторию G. В аудитории полно народу, включая phk и matthieu, сидящие в одном ряду друг напротив друга (позже оказалось, что места были выбраны из корыстных соображений, дабы получить доступ к розеткам, которые были в ограниченном доступе). Быстро пытаюсь найти кого-нибудь с расписанием. Смотрю&amp;nbsp;&amp;mdash; на последнем ряду как раз сидит тов. Тарасов. Подхожу, вглядываюсь в его монитор, спрашивая, чей Talk здесь сейчас будет, одновременно с этим замечая открытый браузер с bash.org.ru. &amp;ldquo;Твой!&amp;rdquo;,&amp;nbsp;&amp;mdash; недоумённо отвечает тов. Тарасов&amp;hellip;&lt;br /&gt;&lt;a name="cutid1"&gt;&lt;/a&gt;&lt;br /&gt;&amp;hellip;&lt;br /&gt;&lt;br /&gt;Выступление прошло довольно благополучно, несмотря на то, что из-за переезда мне не удалось портировать парочку драйверов под DragonFly и FreeBSD (и даже под lm_sensors, а вот под NetBSD km(4) в портировании уже не нуждается :), наличие которых должно было бы добавить несколько ещё более интересных аргументов в пользу предыдущей деятельности и объективности.&lt;br /&gt;&lt;br /&gt;Выступление началось где-то в 11:32/33. Выступал как минимум 45 минут, насколько я помню. Потом пришёл слайд с вопросами и комментариями. &amp;ldquo;Any questions or comments?&amp;rdquo; Разумеется, phk не ушами пришёл хлопать, и сразу выступил в роли волонтёра с комментариями по озвучиванию своей позиции.&lt;br /&gt;&lt;br /&gt;Кстати, забегая пару дней до этого, я всё-таки в конце концов решил посетить FreeBSD Developer Summit. Решил вести себя прилично и объективно, про hardware sensors упомянув только в "introduce yourself", и без лишнего озвучивания моего статуса в OpenBSD. Являясь товарищем довольно скромным, никого кроме своего соседа на talk не приглашал, но народу пришло хоть отбавляй. matthieu предположил, что это, в общем, и не является чем-то удивительным, учитывая популярность темы в списках рассылок FreeBSD. :-)&lt;br /&gt;&lt;br /&gt;В общем, phk озвучил свою точку зрения, мы немного побеседовали, я у него спросил, почему он не против coretemp(4) и k8temp(4) во FreeBSD, пару товарищей задала ещё парочку небольших вопросов (будет ли поддержка нескольких уровней настроек в sensorsd; относится ли данный каркас приложений исключительно к i2c), и выступление было завершено ровно в 12:30. Всё выступление должно было быть записано на аудио, но неизвестно, будет ли это доступно где-либо, т.к. записи делались и на предыдущих конференциях, но до сих пор нигде не опубликованы. Dan подтвердил, что у него есть / будут записи, но сказал, что обещать ничего не будет.&lt;br /&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cnst:43672</id>
    <link rel="alternate" type="text/html" href="http://cnst.livejournal.com/43672.html"/>
    <link rel="self" type="text/xml" href="http://cnst.livejournal.com/data/atom/?itemid=43672"/>
    <title>сообщение</title>
    <published>2007-10-14T23:45:07Z</published>
    <updated>2007-10-14T23:45:07Z</updated>
    <category term="gsoc2007"/>
    <category term="hw.sensors"/>
    <category term="gsoc2007.ru"/>
    <category term="сообщение"/>
    <content type="html">сообщаю, что интерфейс для снятия показаний с датчиков был сегодня добавлен во FreeBSD 8.0-CURRENT&lt;br /&gt;&lt;br /&gt;&lt;small&gt;&lt;a href="http://lists.freebsd.org/pipermail/cvs-src/2007-October/082381.html"&gt;http://lists.freebsd.org/pipermail/cvs-src/2007-October/082381.html&lt;/a&gt; &amp;mdash; framework&lt;br /&gt;&lt;a href="http://lists.freebsd.org/pipermail/cvs-src/2007-October/082382.html"&gt;http://lists.freebsd.org/pipermail/cvs-src/2007-October/082382.html&lt;/a&gt; &amp;mdash; it(4) and lm(4)&lt;br /&gt;&lt;a href="http://lists.freebsd.org/pipermail/cvs-src/2007-October/082383.html"&gt;http://lists.freebsd.org/pipermail/cvs-src/2007-October/082383.html&lt;/a&gt; &amp;mdash; coretemp(4)&lt;/small&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;напоминаю, что ранее данный интерфейс уже был добавлен в DragonFly BSD 1.11-DEVELOPMENT&lt;br /&gt;&lt;br /&gt;&lt;small&gt;&lt;a href="http://leaf.dragonflybsd.org/mailarchive/commits/2007-10/msg00015.html"&gt;http://leaf.dragonflybsd.org/mailarchive/commits/2007-10/msg00015.html&lt;/a&gt; &amp;mdash; framework&lt;br /&gt;&lt;a href="http://leaf.dragonflybsd.org/mailarchive/commits/2007-10/msg00016.html"&gt;http://leaf.dragonflybsd.org/mailarchive/commits/2007-10/msg00016.html&lt;/a&gt; &amp;mdash; coretemp(4)&lt;br /&gt;&lt;a href="http://leaf.dragonflybsd.org/mailarchive/commits/2007-10/msg00017.html"&gt;http://leaf.dragonflybsd.org/mailarchive/commits/2007-10/msg00017.html&lt;/a&gt; &amp;mdash; it(4) and lm(4)&lt;/small&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;за подробной информацией прошу обращатся по адресу&lt;br /&gt;&lt;a href="http://wiki.freebsd.org/GSoC2007/cnst-sensors"&gt;http://wiki.freebsd.org/GSoC2007/cnst-sensors&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cnst:43490</id>
    <link rel="alternate" type="text/html" href="http://cnst.livejournal.com/43490.html"/>
    <link rel="self" type="text/xml" href="http://cnst.livejournal.com/data/atom/?itemid=43490"/>
    <title>GSoC2007: Программный интерфейс датчиков OpenBSD добавлен во FreeBSD 8.0-CURRENT</title>
    <published>2007-10-14T23:32:18Z</published>
    <updated>2007-10-14T23:32:18Z</updated>
    <category term="gsoc2007"/>
    <category term="sysctl"/>
    <category term="hw.sensors"/>
    <category term="originalcontent4lor"/>
    <category term="gsoc2007.ru"/>
    <category term="sensorsd"/>
    <category term="lm"/>
    <content type="html">Ранее мы уже &lt;a href="http://www.linux.org.ru/jump-message.jsp?msgid=2141643"&gt;сообщали&lt;/a&gt; о завершении работ по переносу каркаса приложений для датчиков из OpenBSD во FreeBSD, и о &lt;a href="http://www.linux.org.ru/jump-message.jsp?msgid=2178562"&gt;добавлении&lt;/a&gt; данного интерфейса в DragonFly BSD 1.11.&lt;br /&gt;&lt;br /&gt;Сегодня Alexander Leidinger &lt;a href="http://freshbsd.org/2007/10/14?committer=netchild&amp;amp;module=src"&gt;официально добавил&lt;/a&gt; патч Константина Муренина во FreeBSD 8.0-CURRENT. Были добавлены все основные компоненты проекта &lt;a href="http://wiki.freebsd.org/GSoC2007/cnst-sensors"&gt;GSoC2007/cnst-sensors&lt;/a&gt;, включая &lt;a href="http://leaf.dragonflybsd.org/cgi/web-man?command=sensor_attach&amp;amp;section=9"&gt;sensor_attach(9)&lt;/a&gt;, sysctl(3), sysctl(8), systat(1), &lt;a href="http://www.openbsd.org/cgi-bin/man.cgi?query=sensorsd&amp;amp;sektion=8"&gt;sensorsd(8)&lt;/a&gt;, а также драйверы &lt;a href="http://leaf.dragonflybsd.org/cgi/web-man?command=it&amp;amp;section=4"&gt;it(4)&lt;/a&gt; и &lt;a href="http://leaf.dragonflybsd.org/cgi/web-man?command=lm&amp;amp;section=4"&gt;lm(4)&lt;/a&gt;, и адаптация драйвера &lt;a href="http://leaf.dragonflybsd.org/cgi/web-man?command=coretemp&amp;amp;section=4"&gt;coretemp(4)&lt;/a&gt; под новый интерфейс.&lt;br /&gt;&lt;br /&gt;Пользовательский интерфейс полностью совместим с OpenBSD и DragonFly BSD.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://wiki.freebsd.org/GSoC2007/cnst-sensors"&gt;http://wiki.freebsd.org/GSoC2007/cnst-sensors&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cnst:41437</id>
    <link rel="alternate" type="text/html" href="http://cnst.livejournal.com/41437.html"/>
    <link rel="self" type="text/xml" href="http://cnst.livejournal.com/data/atom/?itemid=41437"/>
    <title>Программный интерфейс датчиков OpenBSD перенесён из FreeBSD в DragonFly BSD</title>
    <published>2007-10-03T02:48:01Z</published>
    <updated>2007-10-03T02:50:05Z</updated>
    <category term="gsoc2007"/>
    <category term="sysctl"/>
    <category term="hw.sensors"/>
    <category term="dragonfly"/>
    <category term="originalcontent4lor"/>
    <category term="gsoc2007.ru"/>
    <category term="sensorsd"/>
    <category term="openbsd"/>
    <category term="freebsd"/>
    <category term="lm"/>
    <content type="html">Ранее мы уже &lt;a href="http://www.linux.org.ru/jump-message.jsp?msgid=2141643"&gt;сообщали&lt;/a&gt; о завершении работ по переносу каркаса приложений для датчиков из OpenBSD во FreeBSD в рамках программы &lt;a href="http://www.freebsd.org/projects/summerofcode-2007.html"&gt;Google Summer of Code 2007&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Сегодня Hasso Tepper официально &lt;a href="http://leaf.dragonflybsd.org/mailarchive/commits/2007-10/#00015"&gt;добавил&lt;/a&gt; несколько адаптированный патч Константина Муренина в &lt;a href="http://www.dragonflybsd.org/"&gt;DragonFly BSD&lt;/a&gt; 1.11. Были добавлены все основные компоненты проекта &lt;a href="http://wiki.freebsd.org/GSoC2007/cnst-sensors"&gt;GSoC2007/cnst-sensors&lt;/a&gt;, включая &lt;a href="http://leaf.dragonflybsd.org/mailarchive/commits/2007-10/msg00015.html"&gt;sensor_attach(9), sysctl(3), sysctl(8), systat(1), sensorsd(8)&lt;/a&gt;, а также драйверы &lt;a href="http://leaf.dragonflybsd.org/mailarchive/commits/2007-10/msg00016.html"&gt;coretemp(4)&lt;/a&gt;, &lt;a href="http://leaf.dragonflybsd.org/mailarchive/commits/2007-10/msg00017.html"&gt;it(4) и lm(4)&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Пользовательский интерфейс совместим с OpenBSD и FreeBSD.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cnst:38884</id>
    <link rel="alternate" type="text/html" href="http://cnst.livejournal.com/38884.html"/>
    <link rel="self" type="text/xml" href="http://cnst.livejournal.com/data/atom/?itemid=38884"/>
    <title>GSoC2007: перенос программного интерфейса датчиков из OpenBSD во FreeBSD</title>
    <published>2007-09-14T04:06:35Z</published>
    <updated>2007-09-14T11:54:45Z</updated>
    <category term="gsoc2007"/>
    <category term="sysctl"/>
    <category term="hw.sensors"/>
    <category term="originalcontent4lor"/>
    <category term="gsoc2007.ru"/>
    <category term="sensorsd"/>
    <category term="lm"/>
    <content type="html">&lt;a href="http://lists.freebsd.org/pipermail/freebsd-hackers/2007-September/021722.html"&gt;Константин Муренин сегодня объявил&lt;/a&gt; о завершении работ по переносу &lt;a href="http://www.openbsd.org/cgi-bin/man.cgi?query=sensor_attach&amp;amp;sektion=9"&gt;каркаса приложений для датчиков из OpenBSD&lt;/a&gt; во FreeBSD. Проект был осуществлён благодаря программе &lt;a href="http://www.freebsd.org/projects/summerofcode-2007.html"&gt;Google Summer of Code 2007&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Помимо driver API&amp;nbsp;&amp;mdash; sensor_attach(9)&amp;nbsp;&amp;mdash; были портированы sysctl(3), sysctl(8), systat(1) и &lt;a href="http://www.openbsd.org/cgi-bin/man.cgi?query=sensorsd&amp;amp;sektion=8"&gt;sensorsd(8)&lt;/a&gt;. Из драйверов пока были портированы it(4) и lm(4), которые вместе поддерживают почти все современные наборы логики Super I/O, производимые &lt;a href="http://en.wikipedia.org/wiki/Winbond"&gt;Winbond&lt;/a&gt; и ITE Tech.&lt;br /&gt;&lt;br /&gt;Пользовательский интерфейс совместим с OpenBSD. Работа над проектом завершена, и товарищи, заинтересованные в его скорейшей интеграции в CVS HEAD, приглашаются к тестированию.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://cnst.livejournal.com/38421.html#directions"&gt;http://cnst.livejournal.com/38421.html#directions&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cnst:38421</id>
    <link rel="alternate" type="text/html" href="http://cnst.livejournal.com/38421.html"/>
    <link rel="self" type="text/xml" href="http://cnst.livejournal.com/data/atom/?itemid=38421"/>
    <title>GSoC2007.cnst-sensors.2007-09-13.patch</title>
    <published>2007-09-13T22:53:41Z</published>
    <updated>2007-09-14T02:39:44Z</updated>
    <category term="gsoc2007"/>
    <category term="gsoc2007.en"/>
    <lj:music>DJ Jim &amp;mdash; Electro Speed 2006</lj:music>
    <content type="html">&lt;pre&gt;
		Google Summer of Code 2007 @ The FreeBSD Project
	Porting OpenBSD's sysctl Hardware Sensors framework to FreeBSD
			(2007-256, a 23-y.-o. edition)


Description:

	On this 256th day of 2007,   it is my great pleasure to
	present a feature-complete port of the hardware sensors
	framework from OpenBSD to FreeBSD.

	Below is a complete `cvs diff` of cnst-sensors GSoC2007
	project as of 2007-256.

	It includes the following components,  listed below in
	the very same order as they are appearing in this diff:

	* sample configuration file for sensorsd
	* rc(8) script and glue code for sensorsd(8)
	* sysctl(3) doc fixes for CTL_HW tree
	* sysctl(3) documentation for hardware sensors
	* sysctl(8) documentation for hardware sensors
	* assorted KNF and bug-fixes for sysctl(8)
	* support for the sensor structure for sysctl(8)
	* coretemp(4) documentation
	* it(4) documentation
	* lm(4) documentation
	* rc.conf(5) documentation for starting sensorsd(8)
	* sensor_attach(9) et al documentation
	* coretemp(4) conversion to the hw.sensors framework
	* it(4) isa driver ported from OpenBSD
	* lm(4) isa driver ported from OpenBSD
	* /sys/kern/kern_sensors.c
	  o sensor_attach(9) API for drivers to register ksensors
	  o sensor_task_register(9) API for the update task
	  o sysctl(3) glue code
	  o hw.sensors shadow tree for sysctl(8) internal magic
	* assorted KNF and bug-fixes for /sys/kern/kern_sysctl.c
	* it(4) module for testing sensor_attach/detach et al
	* lm(4) module for testing sensor_attach/detach et al
	* &amp;lt;sys/sensors.h&amp;gt;
	* assorted bug-fixes and HW_SENSORS definition for &amp;lt;sys/sysctl.h&amp;gt;
	* sensors display for systat(1), including all documentation
	* sensorsd(8) and all applicable documentation

	The userland part of the framework is entirely source-code
	compatible with OpenBSD 4.1, 4.2 and  -current as of today.

	All sensor readings can be viewed with `sysctl hw.sensors`,
	monitored in semi-realtime with `systat -sensors` and also
	logged with `sensorsd`.   Third-party tools, for example a
	plug-in for nagios, are also available.  A separate patch
	for ports/sysutils/symon will be provided upon request.
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;&lt;a name="directions"&gt;&lt;/a&gt;Exact directions on applying and testing:&lt;/h3&gt;&lt;br /&gt;&lt;a name="cutid1"&gt;&lt;/a&gt;&lt;pre&gt;
cd /usr/src
&lt;b&gt;fetch http://mojo.ru/us/GSoC2007.cnst-sensors.2007-09-13.patch.gz&lt;/b&gt;
gunzip GSoC2007.cnst-sensors.2007-09-13.patch.gz
mkdir  sys/dev/{it,lm}  sys/modules/{it,lm}  usr.sbin/sensorsd
patch &amp;lt; GSoC2007.cnst-sensors.2007-09-13.patch

make -j128 buildkernel KERNCONF=GENERIC MODULES_OVERRIDE="acpi it lm coretemp"
make installkernel KERNCONF=GENERIC MODULES_OVERRIDE="acpi it lm coretemp"

make includes

cd share/man/man4 &amp;&amp; make &amp;&amp; make install &amp;&amp; make clean &amp;&amp; cd ../../../
cd share/man/man5 &amp;&amp; make &amp;&amp; make install &amp;&amp; make clean &amp;&amp; cd ../../../
cd share/man/man9 &amp;&amp; make &amp;&amp; make install &amp;&amp; make clean &amp;&amp; cd ../../../

cd sbin/sysctl &amp;&amp; make &amp;&amp; make install &amp;&amp; make clean &amp;&amp; cd ../../
cd usr.bin/systat &amp;&amp; make &amp;&amp; make install &amp;&amp; make clean &amp;&amp; cd ../../
cd usr.sbin/sensorsd &amp;&amp; make &amp;&amp; make install &amp;&amp; make clean &amp;&amp; cd ../../

diff -u /boot/device.hints sys/`uname -m`/conf/GENERIC.hints
cat sys/`uname -m`/conf/GENERIC.hints &amp;gt;/boot/device.hints
cp etc/sensorsd.conf /etc/
shutdown -r now ; exit

...

OK load it
OK load lm
OK load coretemp
OK boot

...

sensorsd
sysctl hw.sensors
systat -sensors 1
&lt;/pre&gt;&lt;br /&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cnst:37740</id>
    <link rel="alternate" type="text/html" href="http://cnst.livejournal.com/37740.html"/>
    <link rel="self" type="text/xml" href="http://cnst.livejournal.com/data/atom/?itemid=37740"/>
    <title>12-year-old bug in FreeBSD's kern_sysctl.c</title>
    <published>2007-09-03T19:58:50Z</published>
    <updated>2007-09-03T20:35:55Z</updated>
    <category term="kern_sysctl.c"/>
    <category term="gsoc2007"/>
    <category term="sysctl"/>
    <category term="gsoc2007.en"/>
    <category term="phk"/>
    <category term="freebsd"/>
    <content type="html">The other week, I found a 12-year-old bug in FreeBSD's /sys/kern/kern_sysctl.c. &lt;br /&gt;&lt;br /&gt;The bug is in the incorrect &lt;em&gt;len&lt;/em&gt; parameter that is being passed to &lt;a href="http://www.freebsd.org/cgi/man.cgi?query=useracc&amp;amp;sektion=9"&gt;useracc(9)&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I originally thought that it might have some security implications, but in reality, subsequent &lt;a href="http://www.freebsd.org/cgi/man.cgi?query=copyin&amp;amp;sektion=9"&gt;copyin(9)&lt;/a&gt; in sysctl_new_user() is supposed to take care of any boundary problems, so in the end, I'm not sure why this useracc(9) call is even there in the first place, buggy or not. ;)&lt;br /&gt;&lt;br /&gt;Although fixing this bug so far doesn't seem to be of any real value to anyone -- tell me if it is to you -- it is nonetheless interesting to find bugs that were introduced so many years ago. ;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thanks to &lt;a href="http://www.watson.org/~robert/"&gt;Robert Watson&lt;/a&gt; for taking his time to commit my patch and for the discussion. Here are some links to the mailing list regarding my fix being committed, read the message in the second link for my complete description of what the bug is about.&lt;br /&gt;&lt;small&gt;&lt;br /&gt;&lt;a href="http://lists.freebsd.org/pipermail/cvs-src/2007-September/081597.html"&gt;http://lists.freebsd.org/pipermail/cvs-src/2007-September/081597.html&lt;/a&gt; -- my patch is committed&lt;br /&gt;&lt;a href="http://lists.freebsd.org/pipermail/cvs-src/2007-September/081603.html"&gt;http://lists.freebsd.org/pipermail/cvs-src/2007-September/081603.html&lt;/a&gt; -- my detailed comments&lt;br /&gt;&lt;/small&gt;&lt;br /&gt;&lt;br /&gt;And here is the history of this bug:&lt;br /&gt;&lt;small&gt;&lt;br /&gt;&lt;a href="http://cvsweb.freebsd.org/src/sys/kern/kern_sysctl.c#rev1.38"&gt;http://cvsweb.freebsd.org/src/sys/kern/kern_sysctl.c#rev1.38&lt;/a&gt; -- the bug is introduced in 1995&lt;br /&gt;&lt;a href="http://cvsweb.freebsd.org/src/sys/kern/kern_sysctl.c#rev1.91"&gt;http://cvsweb.freebsd.org/src/sys/kern/kern_sysctl.c#rev1.91&lt;/a&gt; -- the line with the bug is slightly altered&lt;br /&gt;&lt;a href="http://cvsweb.freebsd.org/src/sys/kern/kern_sysctl.c#rev1.177"&gt;http://cvsweb.freebsd.org/src/sys/kern/kern_sysctl.c#rev1.177&lt;/a&gt; -- the bug is fixed with my patch&lt;br /&gt;&lt;/small&gt;&lt;br /&gt;&lt;br /&gt;I've also emailed &lt;a href="http://apollo.backplane.com/" title="Matthew Dillon personal page"&gt;Matt Dillon&lt;/a&gt;, and he committed my patch to DragonFly BSD, too:&lt;br /&gt;&lt;small&gt;&lt;a href="http://www.dragonflybsd.org/cvsweb/src/sys/kern/kern_sysctl.c#rev1.28"&gt;http://www.dragonflybsd.org/cvsweb/src/sys/kern/kern_sysctl.c#rev1.28&lt;/a&gt; -- my patch in dragonfly&lt;/small&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;P.S. If you're actually looking for a useful but slightly younger bug that I've fixed, then look no further than in my &amp;ldquo;&lt;a href="http://cnst.livejournal.com/24040.html"&gt;10-year-old pointer-arithmetic bug in make(1) is now gone&amp;hellip;&lt;/a&gt;&amp;rdquo; entry. ;)&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Constantine.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cnst:34170</id>
    <link rel="alternate" type="text/html" href="http://cnst.livejournal.com/34170.html"/>
    <link rel="self" type="text/xml" href="http://cnst.livejournal.com/data/atom/?itemid=34170"/>
    <title>cnst-sensors.2007-08-20.patch</title>
    <published>2007-08-21T03:52:51Z</published>
    <updated>2007-08-23T03:44:17Z</updated>
    <category term="gsoc2007"/>
    <category term="gsoc2007.en"/>
    <content type="html">&lt;a href="http://p4web.freebsd.org/depot/projects/soc2007/cnst-sensors/cnst-sensors.2007-08-20.patch"&gt;http://p4web.freebsd.org/depot/projects/soc2007/cnst-sensors/cnst-sensors.2007-08-20.patch&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="cutid1"&gt;&lt;/a&gt;&lt;pre&gt;cd /usr/src
fetch http://p4web.freebsd.org/depot/projects/soc2007/cnst-sensors/cnst-sensors.2007-08-20.patch
more cnst-sensors.2007-08-20.patch
mkdir  sys/dev/lm  sys/modules/lm  usr.sbin/sensorsd
patch &amp;lt; cnst-sensors.2007-08-20.patch

make buildkernel KERNCONF=GENERIC MODULES_OVERRIDE="acpi lm coretemp"
make installkernel KERNCONF=GENERIC MODULES_OVERRIDE="acpi lm coretemp"
make includes
cd share/man/man4 &amp;&amp; make &amp;&amp; make install &amp;&amp; make clean &amp;&amp; cd ../../../
cd share/man/man9 &amp;&amp; make &amp;&amp; make install &amp;&amp; make clean &amp;&amp; cd ../../../
cd sbin/sysctl &amp;&amp; make &amp;&amp; make install &amp;&amp; make clean &amp;&amp; cd ../../
cd usr.sbin/sensorsd &amp;&amp; make &amp;&amp; make install &amp;&amp; make clean &amp;&amp; cd ../../
cd usr.bin/systat &amp;&amp; make &amp;&amp; make install &amp;&amp; make clean &amp;&amp; cd ../../
diff -u /boot/device.hints sys/`uname -m`/conf/GENERIC.hints
cat sys/`uname -m`/conf/GENERIC.hints &amp;gt;/boot/device.hints
cp -p etc/sensorsd.conf /etc/
reboot

...

OK load lm
OK load coretemp
OK boot

...

sensorsd
systat -sensors 1
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;(these instructions were written and reproduced on a &amp;ldquo;tainted&amp;rdquo; machine, so if you find any errors, let me know)</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cnst:33134</id>
    <link rel="alternate" type="text/html" href="http://cnst.livejournal.com/33134.html"/>
    <link rel="self" type="text/xml" href="http://cnst.livejournal.com/data/atom/?itemid=33134"/>
    <title>coretemp(4) in FreeBSD</title>
    <published>2007-08-19T03:26:11Z</published>
    <updated>2007-08-19T03:30:06Z</updated>
    <category term="gsoc2007"/>
    <category term="gsoc2007.en"/>
    <category term="coretemp"/>
    <content type="html">Hurray, coretemp(4), a driver for monitoring Intel Core / Core 2 temperature, was recently imported into FreeBSD:&lt;br /&gt;&lt;small&gt;&lt;a href="http://lists.freebsd.org/pipermail/cvs-src/2007-August/081246.html"&gt;http://lists.freebsd.org/pipermail/cvs-src/2007-August/081246.html&lt;/a&gt; &amp;mdash; coretemp added to cvs&lt;/small&gt;&lt;br /&gt;&lt;br /&gt;Obviously, I could not have ignored this opportunity, and this driver is now ported to sysctl hw.sensors framework, too:&lt;br /&gt;&lt;small&gt;&lt;a href="http://lists.freebsd.org/pipermail/p4-projects/2007-August/020621.html"&gt;http://lists.freebsd.org/pipermail/p4-projects/2007-August/020621.html&lt;/a&gt; &amp;mdash; branch to cnst-sensors&lt;br /&gt;&lt;a href="http://lists.freebsd.org/pipermail/p4-projects/2007-August/020623.html"&gt;http://lists.freebsd.org/pipermail/p4-projects/2007-August/020623.html&lt;/a&gt; &amp;mdash; init sc_dev&lt;br /&gt;&lt;a href="http://lists.freebsd.org/pipermail/p4-projects/2007-August/020624.html"&gt;http://lists.freebsd.org/pipermail/p4-projects/2007-August/020624.html&lt;/a&gt; &amp;mdash; make get_temp more robust&lt;br /&gt;&lt;a href="http://lists.freebsd.org/pipermail/p4-projects/2007-August/020625.html"&gt;http://lists.freebsd.org/pipermail/p4-projects/2007-August/020625.html&lt;/a&gt; &amp;mdash; convert to sysctl hw.sensors&lt;/small&gt;&lt;br /&gt;&lt;br /&gt;Taking the opportunity, I would like to express my thanks to rpaulo@ for his work and availability on IRC! :)</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cnst:32825</id>
    <link rel="alternate" type="text/html" href="http://cnst.livejournal.com/32825.html"/>
    <link rel="self" type="text/xml" href="http://cnst.livejournal.com/data/atom/?itemid=32825"/>
    <title>Committing things upstream</title>
    <published>2007-08-18T17:44:51Z</published>
    <updated>2007-08-18T22:04:39Z</updated>
    <category term="gsoc2007"/>
    <category term="software development"/>
    <category term="gsoc2007.en"/>
    <category term="open source"/>
    <category term="upstream"/>
    <category term="open-source software"/>
    <content type="html">Sometime during this Summer of Code, I felt a bit awkward on working on OpenBSD given that I am supposed to be porting stuff from OpenBSD to FreeBSD. &lt;br /&gt;&lt;br /&gt;For example, if I find a bug or think about some new feature&amp;nbsp;&amp;mdash; should I fix it upstream in OpenBSD, or should I fix it in FreeBSD's sandbox (aka perforce) and leave for someone else to backport it to OpenBSD? &lt;br /&gt;&lt;br /&gt;I was finally relived after some anonymous posters at undeadly.org and linux.org.ru on occasion commented whether the security things (e.g. &lt;a href="http://cnst.livejournal.com/30472.html" hreflang="ru" title="BIND 9 DNS Cache Poisoning, но не в OpenBSD"&gt;the latest bug in named(8)&lt;/a&gt;) that are fixed in OpenBSD are committed upstream, and expressed their dismay if the answer was negative. (It must be noted that sometimes working with upstream isn't possible, as in this case of ISC's named, because upstream may not accept your fixes (e.g. for portability concerns), but that's a separate matter.)&lt;br /&gt;&lt;br /&gt;As a matter of fact, on another occasion, OpenBSD's X.Org porter (aka xenocara author), matthieu@, said that he might have to run Linux for a few months in order to get all the new X.Org bugs fixed, as X.Org people don't take any non-Linux bug-reports seriously.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;In conclusion&lt;/b&gt;: If you disapprove that someone who is porting a certain feature from one open-source project to another finds and fixes bugs in the original project, then you might want to consider talking to those anonymous posters to straighten your viewpoint. :) Or, as a matter of fact, to anyone who has had some experience with these dealings.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cnst:32463</id>
    <link rel="alternate" type="text/html" href="http://cnst.livejournal.com/32463.html"/>
    <link rel="self" type="text/xml" href="http://cnst.livejournal.com/data/atom/?itemid=32463"/>
    <title>thoughts about bus_space_map(9) and bus_alloc_resource(9)</title>
    <published>2007-08-06T05:30:17Z</published>
    <updated>2007-08-06T05:30:17Z</updated>
    <category term="gsoc2007"/>
    <category term="netbsd"/>
    <category term="bus_space"/>
    <category term="gsoc2007.en"/>
    <category term="openbsd"/>
    <category term="lm78_isa.c"/>
    <category term="freebsd"/>
    <category term="lm_isa.c"/>
    <content type="html">For now, I'll just post a link and call it a day. Tomorrow, I'll see if I'd like to write something more about it, or just copy the text into my LJ. ;)&lt;br /&gt;&lt;br /&gt;Any comments are welcome. (:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lists.freebsd.org/pipermail/p4-projects/2007-August/020363.html"&gt;http://lists.freebsd.org/pipermail/p4-projects/2007-August/020363.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Also, see &lt;a href="http://cnst.livejournal.com/25342.html"&gt;http://cnst.livejournal.com/25342.html&lt;/a&gt;.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cnst:31405</id>
    <link rel="alternate" type="text/html" href="http://cnst.livejournal.com/31405.html"/>
    <link rel="self" type="text/xml" href="http://cnst.livejournal.com/data/atom/?itemid=31405"/>
    <title>GSoC2007: cnst-sensors status update</title>
    <published>2007-07-30T22:21:30Z</published>
    <updated>2007-08-08T14:43:04Z</updated>
    <category term="gsoc2007"/>
    <category term="gsoc2007.en"/>
    <content type="html">People interested in the recent status update regarding my project should refer to the following message: &lt;br /&gt;&lt;br /&gt;&lt;a href="http://lists.freebsd.org/pipermail/freebsd-arch/2007-July/006694.html"&gt;http://lists.freebsd.org/pipermail/freebsd-arch/2007-July/006694.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In brief: most things are fully functional but might need a bit further improvement in cutting rough edges. :) I will try see what can be done regarding sysctl(8) and sysctlbyname(3) in the following few days/weeks.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cnst:30259</id>
    <link rel="alternate" type="text/html" href="http://cnst.livejournal.com/30259.html"/>
    <link rel="self" type="text/xml" href="http://cnst.livejournal.com/data/atom/?itemid=30259"/>
    <title>/sys/kern/kern_sysctl.c in FreeBSD</title>
    <published>2007-07-25T21:59:38Z</published>
    <updated>2007-08-25T04:46:02Z</updated>
    <category term="brainfuck"/>
    <category term="gsoc2007"/>
    <category term="gsoc2007.en"/>
    <category term="c"/>
    <category term="static"/>
    <content type="html">I was looking at this code for a few minutes thinking how it could possibly continue working as opposed to generating &lt;tt&gt;oid_number&lt;/tt&gt; clashes after a second OID_AUTO element is registered onto any given subtree, until it finally hit me. If you're not too intimate with C, trust me, this patch does not break &lt;em&gt;the code flow&lt;/em&gt; in the simplest test case, although its &lt;em&gt;effects on one's mind may vary greatly&lt;/em&gt;! :)&lt;br /&gt;&lt;br /&gt;&lt;a name="cutid1"&gt;&lt;/a&gt;&lt;a href="http://moduli.net/grok/diff/freebsd/src/sys/kern/kern_sysctl.c?r2=1.103&amp;r1=1.102"&gt;http://moduli.net/grok/diff/freebsd/src/sys/kern/kern_sysctl.c?r2=1.103&amp;r1=1.102&lt;/a&gt;&lt;br /&gt;&lt;pre&gt;--- src/sys/kern/kern_sysctl.c	2001/01/05 07:00:44	1.102
+++ &lt;a href="http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/kern/kern_sysctl.c#rev1.103"&gt;src/sys/kern/kern_sysctl.c&lt;/a&gt;	2001/01/24 04:35:13	1.103
@@ -37,7 +37,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)kern_sysctl.c	8.4 (Berkeley) 4/14/94
&lt;span style="background-color: #f99;"&gt;- * $FreeBSD: src/sys/kern/kern_sysctl.c,v 1.102 2001/01/05 07:00:44 jhb Exp $&lt;/span&gt;
&lt;span style="background-color: #9f9;"&gt;+ * $FreeBSD: src/sys/kern/kern_sysctl.c,v 1.103 2001/01/24 04:35:13 mckusick Exp $&lt;/span&gt;
  */
 
 #include "opt_compat.h"
@@ -114,13 +114,11 @@ void sysctl_register_oid(struct sysctl_o
 	 * 100 to leave space for pre-assigned oid numbers.
 	 */
 	if (oidp-&amp;gt;oid_number == OID_AUTO) {
&lt;span style="background-color: #f99;"&gt;-		/* First, find the highest oid in the parent list &amp;gt;99 */
-		n = 99;
-		SLIST_FOREACH(p, parent, oid_link) {
-			if (p-&amp;gt;oid_number &amp;gt; n)
-				n = p-&amp;gt;oid_number;
-		}
-		oidp-&amp;gt;oid_number = n + 1;&lt;/span&gt;
&lt;span style="background-color: #9f9;"&gt;+		static int newoid = 100;
+
+		oidp-&amp;gt;oid_number = newoid++;
+		if (newoid == 0x7fffffff)
+			panic("out of oids");&lt;/span&gt;
 	}
 
 	/*&lt;/pre&gt;&lt;br /&gt;P.S. For the record, this patch did seem to generate some other problems, because it is based on certain assumptions that don't neccessarily hold, thus being less robust than what it has replaced. For example, see &lt;a href="http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/kern/kern_sysctl.c#rev1.112"&gt;kern_sysctl.c#rev1.112&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2007-08-25 update: P.P.S. Whilst looking at some other issue, I've discovered that dillon@ actually backed out this mckusick's code from DragonFly, for the above reasons:&lt;br /&gt;&lt;a href="http://www.dragonflybsd.org/cvsweb/src/sys/kern/kern_sysctl.c#rev1.14"&gt;http://www.dragonflybsd.org/cvsweb/src/sys/kern/kern_sysctl.c#rev1.14&lt;/a&gt;&lt;br /&gt; </content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cnst:27780</id>
    <link rel="alternate" type="text/html" href="http://cnst.livejournal.com/27780.html"/>
    <link rel="self" type="text/xml" href="http://cnst.livejournal.com/data/atom/?itemid=27780"/>
    <title>Koders.com now searches symon, too!</title>
    <published>2007-07-12T19:55:52Z</published>
    <updated>2007-07-13T15:10:24Z</updated>
    <category term="gsoc2007"/>
    <category term="symon"/>
    <category term="default.aspx"/>
    <category term="usable"/>
    <category term="source code search engine"/>
    <category term="koders.com"/>
    <category term="web"/>
    <category term="gsoc2007.en"/>
    <category term="url"/>
    <content type="html">&lt;a href="http://www.xs4all.nl/~wpd/symon/"&gt;symon&lt;/a&gt; is a system monitor for FreeBSD, NetBSD, OpenBSD and Linux.&lt;br /&gt;&lt;br /&gt;I've briefly participated in the project when I've rewritten the sensors framework in OpenBSD, and someone told me that symon also required an upgrade in its &lt;tt&gt;platform/OpenBSD/&lt;em&gt;sm_sensor.c&lt;/em&gt;&lt;/tt&gt; module. &lt;br /&gt;&lt;br /&gt;On 1st May 2007, I've submitted symon and OpenBSD to koders.com. Today on 12th July 2007, just a few minutes ago, I've received an email from koders.com that symon submission was accepted! Hurray! &lt;br /&gt;&lt;br /&gt;I am now curious how much more time will it take until koders.com will approve OpenBSD's addition. If the size of the project directly influences the amount of time it takes for koders.com to approve the addition of the said project to their database, then we can expect OpenBSD to be added in merely a few years from now. ;)&lt;br /&gt;&lt;a name="cutid1"&gt;&lt;/a&gt;&lt;br /&gt;&amp;hellip;&lt;br /&gt;&lt;br /&gt;Well, what can I say? I'm disappointed with koders.com. Even if we disregard this slowness in their addition of new projects, I've also discovered that they don't have usable URLs. &lt;br /&gt;&lt;br /&gt;For example, I'm not sure that I can have a permanent link to the above module that I've contributed to&amp;nbsp;&amp;mdash; many of their URLs include useless information such as &amp;ldquo;default.aspx&amp;rdquo;, and all files appear to be referenced by some hashes, and I'm not sure that koders.com will keep these hashes from today compatible with their &amp;ldquo;default.aspx&amp;rdquo; of tomorrow. &lt;br /&gt;&lt;br /&gt;There is even less certainty that they will keep their &amp;ldquo;default.aspx&amp;rdquo; tomorrow. ;)</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cnst:27634</id>
    <link rel="alternate" type="text/html" href="http://cnst.livejournal.com/27634.html"/>
    <link rel="self" type="text/xml" href="http://cnst.livejournal.com/data/atom/?itemid=27634"/>
    <title>cnst @ 2007-07-09T18:46:00</title>
    <published>2007-07-09T22:51:12Z</published>
    <updated>2007-07-09T22:51:12Z</updated>
    <category term="gsoc2007"/>
    <category term="western union"/>
    <category term="gsoc2007.en"/>
    <category term="#freebsd-soc"/>
    <content type="html">&lt;pre&gt;23:08 &amp;lt; constant&amp;gt; just got back from a Western Union
23:08 &amp;lt; constant&amp;gt; received a whole pocket load of bills for my initial payment. :)
23:10 &amp;lt; constant&amp;gt; 14 bills in total! :)
23:10 &amp;lt; constant&amp;gt; at least, they didn't give me any coins. :)))
23:10 &amp;lt;@jbr&amp;gt; nice :)
23:10 &amp;lt;@jbr&amp;gt; i only got 3 bills and some coins :(
&lt;a name="cutid1"&gt;&lt;/a&gt;23:11 &amp;lt; constant&amp;gt; I'm curious how they are going to pay 2000 USD here. ;)
23:11 &amp;lt; constant&amp;gt; no way am I going to carry 100 bills! ;)
23:12 &amp;lt; constant&amp;gt; jbr: we you offered a cheque?
23:12 &amp;lt;@jbr&amp;gt; you should bring a briefcase, like in the movies
23:12 &amp;lt; constant&amp;gt; yeah, but in movies they have 100 USD bills. ;)
23:12 &amp;lt;@jbr&amp;gt; no, but i sure i could have gotten one, if i had asked
23:12 &amp;lt;@jbr&amp;gt; its the thought that counts ;)
23:13 &amp;lt; constant&amp;gt; for some reason here they print a cheque, and ask you to "endorse" it on the back, so that they can cash it
23:13 &amp;lt;@jbr&amp;gt; i like cash, for tax evasion purposes :)
23:13 &amp;lt; constant&amp;gt; I asked them if I can cash it myself, they said, "sure"
23:13 &amp;lt; constant&amp;gt; I went to the bank, but it was closed.
23:13 &amp;lt; constant&amp;gt; I looked more at the cheque, and noticed that it said, "Counter signature", but they didn't sign it
23:14 &amp;lt; constant&amp;gt; so I went back, asked them to sign it so that I won't have any problems at the bank -- they said they never sign them,
                  and offered to cash it instead.
23:14 &amp;lt; constant&amp;gt; so here I am, with 14 bills. :)
23:14 &amp;lt;@jbr&amp;gt; :)
23:15 &amp;lt; constant&amp;gt; jbr: cheques work for tax evasion purposes, too. :)
23:15 &amp;lt;@jbr&amp;gt; probably :)
23:15 &amp;lt; constant&amp;gt; btw, didn't have to bring any numbers with me, except for state-issued id
23:16 &amp;lt; constant&amp;gt; just wrote my address, said 500 USD, payment from Google, Inc from Mountain View, CA, USA, there it was&lt;/pre&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cnst:25869</id>
    <link rel="alternate" type="text/html" href="http://cnst.livejournal.com/25869.html"/>
    <link rel="self" type="text/xml" href="http://cnst.livejournal.com/data/atom/?itemid=25869"/>
    <title>Porting means you get to find bugs in original implementation!</title>
    <published>2007-07-01T23:01:49Z</published>
    <updated>2007-07-02T00:58:13Z</updated>
    <category term="porting"/>
    <category term="gsoc2007"/>
    <category term="sizeof"/>
    <category term="alignment"/>
    <category term="crash"/>
    <category term="gsoc2007.en"/>
    <category term="padding"/>
    <category term="openbsd"/>
    <content type="html">The fun part about porting is that sometimes you get so intimate with the code that you undoubtedly find some bugs. My porting efforts are no exception&amp;nbsp;&amp;mdash; I've discovered that the value of &lt;code&gt;ca_devsize&lt;/code&gt; of &lt;code&gt;struct cfattach&lt;/code&gt; of OpenBSD's lm78_isa.c, which is used to &lt;tt&gt;malloc &lt;/tt&gt; the structure that is about to hold some information specific to the device, is being set to a value that is about 8 bytes short of what it is supposed to be. Although it does not appear that anyone experienced crashes with this code (due to &amp;ldquo;luck&amp;rdquo; with &lt;a href="http://en.wikipedia.org/wiki/Data_structure_alignment" title="Data Alignment and Data Structure Padding"&gt;alignment/padding&lt;/a&gt;?), this is definitely a bug, and as such I've just fixed it in OpenBSD, so it won't have a chance to get ported into FreeBSD. :)&lt;br /&gt;&lt;a name="cutid1"&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.openbsd.org/cgi-bin/cvsweb/src/sys/dev/isa/lm78_isa.c#rev1.2"&gt;http://www.openbsd.org/cgi-bin/cvsweb/src/sys/dev/isa/lm78_isa.c#rev1.2&lt;/a&gt;&lt;br /&gt;&lt;pre&gt;CVSROOT:	/cvs
Module name:	src
Changes by:	cnst@	2007/07/01 15:48:57

Modified files:
	sys/dev/isa    : lm78_isa.c 

Log message:
fix potential crash due to wrong ca_devsize; whilst here, also fix iobase type; ok grange, kettenis&lt;/pre&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cnst:25342</id>
    <link rel="alternate" type="text/html" href="http://cnst.livejournal.com/25342.html"/>
    <link rel="self" type="text/xml" href="http://cnst.livejournal.com/data/atom/?itemid=25342"/>
    <title>GSoC2007: Initial drivers part: Porting lm(4) from OpenBSD to FreeBSD</title>
    <published>2007-06-29T21:34:53Z</published>
    <updated>2007-06-29T21:36:26Z</updated>
    <category term="gsoc2007"/>
    <category term="netbsd"/>
    <category term="bus_space"/>
    <category term="isa_attach_args"/>
    <category term="gsoc2007.en"/>
    <category term="lm78_isa.c"/>
    <category term="openbsd"/>
    <category term="freebsd"/>
    <category term="lm_isa.c"/>
    <content type="html">Right now I'm busy porting the isa part of the lm(4) driver from OpenBSD to FreeBSD.&lt;br /&gt;&lt;br /&gt;I have been stuck on trying to find the FreeBSD structures that are equivalent to OpenBSD's and NetBSD's &lt;code&gt;struct isa_attach_args&lt;/code&gt;, which is used in the &lt;tt&gt;match&lt;/tt&gt; and &lt;tt&gt;attach&lt;/tt&gt; routines of &lt;tt&gt;isa&lt;/tt&gt; drivers. &lt;br /&gt;&lt;br /&gt;On NetBSD and OpenBSD, the following code can be used to initialise variables of type &lt;code&gt;bus_space_tag_t&lt;/code&gt; and &lt;code&gt;bus_space_handle_t&lt;/code&gt;, which are later used for accessing &lt;code&gt;bus_space_write_1&lt;/code&gt; and &lt;code&gt;bus_space_read_1&lt;/code&gt; functions:&lt;br /&gt;&lt;pre&gt;
int
lm_isa_match(struct device *parent, void *match, void *aux)
{
	bus_space_tag_t		iot;
	bus_space_handle_t	ioh;
	bus_addr_t		iobase;
	struct isa_attach_args *ia = aux;

	iot = ia-&amp;gt;ia_iot;
	iobase = ia-&amp;gt;ipa_io[0].base;

	if (bus_space_map(iot, iobase, 8, 0, &amp;ioh)) {
		DPRINTF(("%s: can't map i/o space\n", __func__));
		return (0);
	}

	/* Probe for Winbond chips. */
	bus_space_write_1(&lt;em&gt;iot&lt;/em&gt;, &lt;em&gt;ioh&lt;/em&gt;, LMC_ADDR, WB_BANKSEL);
	...
}
&lt;/pre&gt;&lt;br /&gt;Actual code from OpenBSD and NetBSD can be found at the locations below: &lt;br /&gt;&lt;a href="http://opengrok.creo.hu/openbsd/xref/src/sys/dev/isa/lm78_isa.c#lm_isa_match"&gt;http://opengrok.creo.hu/openbsd/xref/src/sys/dev/isa/lm78_isa.c#lm_isa_match&lt;/a&gt;&lt;br /&gt;&lt;a href="http://opengrok.netbsd.org/source/xref/sys/dev/isa/lm_isa.c#lm_isa_match"&gt;http://opengrok.netbsd.org/source/xref/sys/dev/isa/lm_isa.c#lm_isa_match&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;As far the &lt;a href="http://www.freebsd.org/cgi/man.cgi?query=bus_space&amp;amp;sektion=9" title="bus space manipulation functions"&gt;bus_space(9)&lt;/a&gt; functions themselves are concerned, it does appear that FreeBSD has all of these functions starting with FreeBSD 3.0, which were ported from NetBSD, according to the manual page. However, for some reason, I found very few drivers on FreeBSD that actually use bus_space_map() function, for example. For now, let's hope that they will work as soon as I figure out where to get iot and ioh. :)&lt;br /&gt;&lt;br /&gt;&lt;a name="cutid1"&gt;&lt;/a&gt;&amp;hellip;&lt;br /&gt;&lt;br /&gt;Looking for some time at the drivers, I have found that the &lt;tt&gt;iot&lt;/tt&gt; part can be simply initialised to &lt;code&gt;I386_BUS_SPACE_IO&lt;/code&gt;, and as some drivers actually do with an XXX mark. :)&lt;br /&gt;&lt;br /&gt;So this leaves me to figure out where to get iobase and ioh. Well, being stuck with this for a while, I decided to quickly hack this part as well, looking at what actual values are stored in these variables at the runtime of the lm(4) driver on OpenBSD. For this, I've created a simple patch for OpenBSD, which would print some variables: &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;Index: lm78_isa.c
===================================================================
RCS file: /cvs/src/sys/dev/isa/lm78_isa.c,v
retrieving revision 1.1
diff -u -d -p -4 -r1.1 lm78_isa.c
--- lm78_isa.c	2006/01/28 11:25:17	1.1
+++ lm78_isa.c	2007/06/29 21:09:04
@@ -68,13 +68,19 @@ lm_isa_match(struct device *parent, void
 
 	iot = ia-&amp;gt;ia_iot;
 	iobase = ia-&amp;gt;ipa_io[0].base;
 
+	printf("lm_isa_match: iot: %x; iobase: %x; ioh: %x;\n",
+	    iot, iobase, ioh);
+
 	if (bus_space_map(iot, iobase, 8, 0, &amp;ioh)) {
 		DPRINTF(("%s: can't map i/o space\n", __func__));
 		return (0);
 	}
 
+	printf("lm_isa_match: iot: %x; iobase: %x; ioh: %x;\n",
+	    iot, iobase, ioh);
+
 	/* Probe for Winbond chips. */
 	bus_space_write_1(iot, ioh, LMC_ADDR, WB_BANKSEL);
 	banksel = bus_space_read_1(iot, ioh, LMC_DATA);
 	bus_space_write_1(iot, ioh, LMC_ADDR, WB_VENDID);
@@ -141,12 +147,18 @@ lm_isa_attach(struct device *parent, str
 
 	sc-&amp;gt;sc_iot = ia-&amp;gt;ia_iot;
         iobase = ia-&amp;gt;ipa_io[0].base;
 
+	printf("lm_isa_attach: sc_iot: %x; iobase: %x; sc_ioh: %x;\n",
+	    sc-&amp;gt;sc_iot, iobase, sc-&amp;gt;sc_ioh);
+
 	if (bus_space_map(sc-&amp;gt;sc_iot, iobase, 8, 0, &amp;sc-&amp;gt;sc_ioh)) {
 		printf(": can't map i/o space\n");
 		return;
 	}
+
+	printf("lm_isa_attach: sc_iot: %x; iobase: %x; sc_ioh: %x;\n",
+	    sc-&amp;gt;sc_iot, iobase, sc-&amp;gt;sc_ioh);
 
 	/* Bus-independant attachment */
 	sc-&amp;gt;sc_lmsc.lm_writereg = lm_isa_writereg;
 	sc-&amp;gt;sc_lmsc.lm_readreg = lm_isa_readreg;
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And here are the relevant parts from the dmesg with this patch: &lt;br /&gt;&lt;pre&gt;dale:constant {3104} dmesg | tail -n64 | grep -C lm
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
&lt;em&gt;lm_isa_match: iot: 0; iobase: 290; ioh: 3bc;&lt;/em&gt;
&lt;em&gt;lm_isa_match: iot: 0; iobase: 290; ioh: 290;&lt;/em&gt;
&lt;b&gt;lm0 at isa0 port 0x290/8&lt;/b&gt;&lt;em&gt;lm_isa_attach: sc_iot: 0; iobase: 290; sc_ioh: 290;&lt;/em&gt;
&lt;em&gt;lm_isa_attach: sc_iot: 0; iobase: 290; sc_ioh: 290;&lt;/em&gt;
&lt;b&gt;: W83627DHG&lt;/b&gt;
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
dale:constant {3105}&lt;/pre&gt;&lt;br /&gt;As one may notice, the 0x290 number is the address that is specified for lm0 device in the kernel configuration file, so we now know a few more things about how this stuff works. :)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Conclusion&lt;/b&gt;: for now, let's just initialise &lt;tt&gt;iot&lt;/tt&gt; and &lt;tt&gt;iobase&lt;/tt&gt; directly, call &lt;code&gt;bus_space_map&lt;/code&gt; to get &lt;tt&gt;ioh&lt;/tt&gt;, and the rest of the routine leave as is.&lt;br /&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:cnst:22906</id>
    <link rel="alternate" type="text/html" href="http://cnst.livejournal.com/22906.html"/>
    <link rel="self" type="text/xml" href="http://cnst.livejournal.com/data/atom/?itemid=22906"/>
    <title>FreeBSD's packaging system</title>
    <published>2007-06-10T00:34:43Z</published>
    <updated>2007-06-10T00:34:43Z</updated>
    <category term="gsoc2007"/>
    <category term="gsoc2007.en"/>
    <content type="html">I'm trying to install some xorg and &lt;a href="http://en.wikipedia.org/wiki/How_does_one_patch_KDE2_under_FreeBSD%3F"&gt;kde&lt;/a&gt; packages on FreeBSD right now. Having almost exclusively used OpenBSD for the last few releases, I've come to take it for granted that the packaging system &amp;ldquo;just works&amp;rdquo;. :)&lt;br /&gt;&lt;br /&gt;OpenBSD's packaging system is &lt;a href="http://lists.freebsd.org/pipermail/freebsd-security/2006-May/003738.html"&gt;based&lt;/a&gt; on the one from FreeBSD; however, a few releases back OpenBSD's packaging system was &lt;a href="http://www.openbsd.org/papers/ven05-espie/" title="OpenBSD ports and packages, Marc Espie, OpenCON 2005, Venice, Italy"&gt;extensively modified&lt;/a&gt;, so that right now updating existing packages, or installing a package or two from snapshots to an otherwise outdated package tree, happens without any conflicts for the majority of time.&lt;br /&gt;&lt;br /&gt;In FreeBSD, however, every package still keeps a strict track of &lt;em&gt;exact&lt;/em&gt; version numbers of all the other packages that are required to be installed in order for the package to function. As mentioned previously, on OpenBSD this is no longer the case&amp;nbsp;&amp;mdash; a region of several compatible versions of dependent packages can be specified by the package that is about to be installed. &lt;br /&gt;&lt;br /&gt;Perhaps for Google's Summer of Code 2008 someone can come up with a way to port OpenBSD's improvements back into FreeBSD? :)</content>
  </entry>
</feed>
