<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/char, branch v2.6.34.12</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/char?h=v2.6.34.12</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/char?h=v2.6.34.12'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-05-17T15:21:38Z</updated>
<entry>
<title>tty: fix warning in synclink driver</title>
<updated>2012-05-17T15:21:38Z</updated>
<author>
<name>Andres Salomon</name>
<email>dilinger@queued.net</email>
</author>
<published>2010-11-09T22:10:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=aac3f5904beea76bcd6da3e047586f4f3b0f0179'/>
<id>urn:sha1:aac3f5904beea76bcd6da3e047586f4f3b0f0179</id>
<content type='text'>
commit dc98d9650891661a20842a8eef9e76536046d897 upstream.

During builds I see the following warning -

  CC [M]  drivers/char/pcmcia/synclink_cs.o
drivers/char/pcmcia/synclink_cs.c:2194: warning: ‘mgslpc_get_icount’ defined but not used

The function is a callback meant to be assigned to get_icount (added during 0587102cf).
Fix accordingly.

Signed-off-by: Andres Salomon &lt;dilinger@queued.net&gt;
Acked-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>nozomi: Fix warning from the previous TIOCGCOUNT changes</title>
<updated>2012-05-17T15:21:38Z</updated>
<author>
<name>Alan Cox</name>
<email>alan@linux.intel.com</email>
</author>
<published>2010-10-26T14:56:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d5bc8dade94aee3483960f4fa015b88d1764d982'/>
<id>urn:sha1:d5bc8dade94aee3483960f4fa015b88d1764d982</id>
<content type='text'>
commit 68e29655cc51761d60d5f27b2738816a5b13e415 upstream.

Just remove a now unused variable

Signed-off-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>tty: icount changeover for other main devices</title>
<updated>2012-05-17T15:21:37Z</updated>
<author>
<name>Alan Cox</name>
<email>alan@linux.intel.com</email>
</author>
<published>2010-09-16T17:21:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=cf7ac236a8a97410d084ff15957b43449ae88d46'/>
<id>urn:sha1:cf7ac236a8a97410d084ff15957b43449ae88d46</id>
<content type='text'>
commit 0587102cf9f427c185bfdeb2cef41e13ee0264b1 upstream.

Again basically cut and paste

Convert the main driver set to use the hooks for GICOUNT

Signed-off-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>tty: Make tiocgicount a handler</title>
<updated>2012-05-17T15:21:37Z</updated>
<author>
<name>Alan Cox</name>
<email>alan@linux.intel.com</email>
</author>
<published>2010-09-16T17:21:24Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ae64ec88e2f05594a92cdff0ee8f5b4582b2daf8'/>
<id>urn:sha1:ae64ec88e2f05594a92cdff0ee8f5b4582b2daf8</id>
<content type='text'>
commit d281da7ff6f70efca0553c288bb883e8605b3862 upstream.

Dan Rosenberg noted that various drivers return the struct with uncleared
fields. Instead of spending forever trying to stomp all the drivers that
get it wrong (and every new driver) do the job in one place.

This first patch adds the needed operations and hooks them up, including
the needed USB midlayer and serial core plumbing.

Signed-off-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>net: Compute protocol sequence numbers and fragment IDs using MD5.</title>
<updated>2012-05-17T15:21:27Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2011-08-04T03:50:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=41fc877e94ead29c23b76601f420e3a3315a9375'/>
<id>urn:sha1:41fc877e94ead29c23b76601f420e3a3315a9375</id>
<content type='text'>
commit 6e5714eaf77d79ae1c8b47e3e040ff5411b717ec upstream.

Computers have become a lot faster since we compromised on the
partial MD4 hash which we use currently for performance reasons.

MD5 is a much safer choice, and is inline with both RFC1948 and
other ISS generators (OpenBSD, Solaris, etc.)

Furthermore, only having 24-bits of the sequence number be truly
unpredictable is a very serious limitation.  So the periodic
regeneration and 8-bit counter have been removed.  We compute and
use a full 32-bit sequence number.

For ipv6, DCCP was found to use a 32-bit truncated initial sequence
number (it needs 43-bits) and that is fixed here as well.

Reported-by: Dan Kaminsky &lt;dan@doxpara.com&gt;
Tested-by: Willy Tarreau &lt;w@1wt.eu&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
[PG: diffstat vs. 6e5714 differs, since no secure_ipv6_id to delete in 34]
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>TTY: ldisc, do not close until there are readers</title>
<updated>2012-05-17T15:20:57Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2011-06-05T12:16:16Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=cdbbca620214953b9f65838fe56ea8c367af8109'/>
<id>urn:sha1:cdbbca620214953b9f65838fe56ea8c367af8109</id>
<content type='text'>
commit 92f6fa09bd453ffe3351fa1f1377a1b7cfa911e6 upstream.

We restored tty_ldisc_wait_idle in 100eeae2c5c (TTY: restore
tty_ldisc_wait_idle). We used it in the ldisc changing path to fix the
case where there are tasks in n_tty_read waiting for data and somebody
tries to change ldisc.

Similar to the case above, there may be also tasks waiting in
n_tty_read while hangup is performed. As 65b770468e98 (tty-ldisc: turn
ldisc user count into a proper refcount) removed the wait-until-idle
from all paths, hangup path won't wait for them to disappear either
now. So add it back even to the hangup path.

There is a difference, we need uninterruptible sleep as there is
obviously HUP signal pending. So tty_ldisc_wait_idle now sleeps
without possibility to be interrupted. This is what original
tty_ldisc_wait_idle did. After the wait idle reintroduction
(100eeae2c5c), we have had interruptible sleeps for the ldisc changing
path. But as there is a 5s timeout anyway, we don't allow it to be
interrupted from now on. It's not worth the added complexity of
deciding what kind of sleep we want.

Before 65b770468e98 tty_ldisc_release was called also from
tty_ldisc_release. It is called from tty_release, so I don't think we
need to restore that one.

This is nicely reproducible after constifying the timing when
drivers/tty/n_tty.c is patched as follows ("TTY: ntty, add one more
sanity check" patch is needed to actually see it explode):
%% -1548,6 +1549,7 @@ static int n_tty_open(struct tty_struct *tty)

        /* These are ugly. Currently a malloc failure here can panic */
        if (!tty-&gt;read_buf) {
+               msleep(100);
                tty-&gt;read_buf = kzalloc(N_TTY_BUF_SIZE, GFP_KERNEL);
                if (!tty-&gt;read_buf)
                        return -ENOMEM;
%% -1785,6 +1788,7 @@ do_it_again:
                                break;
                        }
                        timeout = schedule_timeout(timeout);
+                       msleep(20);
                        continue;
                }
                __set_current_state(TASK_RUNNING);
===== With a process: =====
    while (1) {
        int fd = open(argv[1], O_RDWR);
        read(fd, buf, sizeof(buf));
        close(fd);
    }
===== and its child: =====
        setsid();
        while (1) {
                int fd = open(tty, O_RDWR|O_NOCTTY);
                ioctl(fd, TIOCSCTTY, 1);
                vhangup();
                close(fd);
                usleep(100 * (10 + random() % 1000));
        }
===== EOF =====

References: https://bugzilla.novell.com/show_bug.cgi?id=693374
References: https://bugzilla.novell.com/show_bug.cgi?id=694509
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
[PG: account for char --&gt; tty file rename post 2.6.34]
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>i8k: Avoid lahf in 64-bit code</title>
<updated>2012-05-17T15:20:38Z</updated>
<author>
<name>Luca Tettamanti</name>
<email>kronos.it@gmail.com</email>
</author>
<published>2011-05-25T18:43:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1e08fb3a81dd6c30140642657c60eca861a2400e'/>
<id>urn:sha1:1e08fb3a81dd6c30140642657c60eca861a2400e</id>
<content type='text'>
commit bc1f419c76a2d6450413ce4349f4e4a07be011d5 upstream.

i8k uses lahf to read the flag register in 64-bit code; early x86-64
CPUs, however, lack this instruction and we get an invalid opcode
exception at runtime.
Use pushf to load the flag register into the stack instead.

Signed-off-by: Luca Tettamanti &lt;kronos.it@gmail.com&gt;
Reported-by: Jeff Rickman &lt;jrickman@myamigos.us&gt;
Tested-by: Jeff Rickman &lt;jrickman@myamigos.us&gt;
Tested-by: Harry G McGavran Jr &lt;w5pny@arrl.net&gt;
Cc: Massimo Dal Zotto &lt;dz@debian.org&gt;
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>Fix gcc 4.5.1 miscompiling drivers/char/i8k.c (again)</title>
<updated>2012-03-14T14:57:31Z</updated>
<author>
<name>Jim Bos</name>
<email>jim876@xs4all.nl</email>
</author>
<published>2010-11-15T20:22:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fbcec55297d91428209f49a090c9c344601946f6'/>
<id>urn:sha1:fbcec55297d91428209f49a090c9c344601946f6</id>
<content type='text'>
commit 22d3243de86bc92d874abb7c5b185d5c47aba323 upstream.

The fix in commit 6b4e81db2552 ("i8k: Tell gcc that *regs gets
clobbered") to work around the gcc miscompiling i8k.c to add "+m
(*regs)" caused register pressure problems and a build failure.

Changing the 'asm' statement to 'asm volatile' instead should prevent
that and works around the gcc bug as well, so we can remove the "+m".

[ Background on the gcc bug: a memory clobber fails to mark the function
  the asm resides in as non-pure (aka "__attribute__((const))"), so if
  the function does nothing else that triggers the non-pure logic, gcc
  will think that that function has no side effects at all. As a result,
  callers will be mis-compiled.

  Adding the "+m" made gcc see that it's not a pure function, and so
  does "asm volatile". The problem was never really the need to mark
  "*regs" as changed, since the memory clobber did that part - the
  problem was just a bug in the gcc "pure" function analysis  - Linus ]

Signed-off-by: Jim Bos &lt;jim876@xs4all.nl&gt;
Acked-by: Jakub Jelinek &lt;jakub@redhat.com&gt;
Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
Cc: Andreas Schwab &lt;schwab@linux-m68k.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>i8k: Tell gcc that *regs gets clobbered</title>
<updated>2012-03-14T14:57:31Z</updated>
<author>
<name>Jim Bos</name>
<email>jim876@xs4all.nl</email>
</author>
<published>2010-11-13T11:13:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=222cd6a6b3a1bd46dabdf1d79e0d58a722ef6c85'/>
<id>urn:sha1:222cd6a6b3a1bd46dabdf1d79e0d58a722ef6c85</id>
<content type='text'>
commit 6b4e81db2552bad04100e7d5ddeed7e848f53b48 upstream.

More recent GCC caused the i8k driver to stop working, on Slackware
compiler was upgraded from gcc-4.4.4 to gcc-4.5.1 after which it didn't
work anymore, meaning the driver didn't load or gave total nonsensical
output.

As it turned out the asm(..) statement forgot to mention it modifies the
*regs variable.

Credits to Andi Kleen and Andreas Schwab for providing the fix.

Signed-off-by: Jim Bos &lt;jim876@xs4all.nl&gt;
Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
Cc: Andreas Schwab &lt;schwab@linux-m68k.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>char/tpm: Fix unitialized usage of data buffer</title>
<updated>2012-03-14T14:57:03Z</updated>
<author>
<name>Peter Huewe</name>
<email>huewe.external.infineon@googlemail.com</email>
</author>
<published>2011-03-29T11:31:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=27bd93e2e7df17970903d9f658964d6415fd25a6'/>
<id>urn:sha1:27bd93e2e7df17970903d9f658964d6415fd25a6</id>
<content type='text'>
commit 1309d7afbed112f0e8e90be9af975550caa0076b upstream.

This patch fixes information leakage to the userspace by initializing
the data buffer to zero.

Reported-by: Peter Huewe &lt;huewe.external@infineon.com&gt;
Signed-off-by: Peter Huewe &lt;huewe.external@infineon.com&gt;
Signed-off-by: Marcel Selhorst &lt;m.selhorst@sirrix.com&gt;
[ Also removed the silly "* sizeof(u8)".  If that isn't 1, we have way
  deeper problems than a simple multiplication can fix.   - Linus ]
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
</feed>
