<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/staging/slicoss, branch v3.11</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>staging: slicoss: fix error return code in slic_entry_probe()</title>
<updated>2013-05-13T22:02:28+00:00</updated>
<author>
<name>Wei Yongjun</name>
<email>yongjun_wei@trendmicro.com.cn</email>
</author>
<published>2013-05-13T06:04:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=1154eb51e7fe682153ad21c5ddde51fc5d8d84e9'/>
<id>1154eb51e7fe682153ad21c5ddde51fc5d8d84e9</id>
<content type='text'>
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: slicoss: information leak in ETHTOOL_GSET</title>
<updated>2013-04-05T21:17:00+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2013-04-04T06:29:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=986d75843555d0f6bc4acd11276c7f8f77d246b8'/>
<id>986d75843555d0f6bc4acd11276c7f8f77d246b8</id>
<content type='text'>
There are some fields in "edata" which have not been cleared.  One
example is edata.cmd.  It leaks uninitialized stack information to the
user.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are some fields in "edata" which have not been cleared.  One
example is edata.cmd.  It leaks uninitialized stack information to the
user.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: slicoss: Remove dma_addr_t cast compilation warnings</title>
<updated>2013-03-11T16:24:00+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2013-02-27T00:33:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=01d0a9b474661831cd1ee5d88d5ee3fb80b55a7a'/>
<id>01d0a9b474661831cd1ee5d88d5ee3fb80b55a7a</id>
<content type='text'>
Eliminate some warnings by casting to unsigned long before
casting a dma_addr_t value to a pointer.

btw:

Does slicoss always work on x86-32?
Is a pshmem guaranteed to be accessible
by a 32 bit address?

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Eliminate some warnings by casting to unsigned long before
casting a dma_addr_t value to a pointer.

btw:

Does slicoss always work on x86-32?
Is a pshmem guaranteed to be accessible
by a 32 bit address?

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging/slicoss: Use ether_crc for mac hash calculation</title>
<updated>2013-03-11T16:22:44+00:00</updated>
<author>
<name>Peter Huewe</name>
<email>peterhuewe@gmx.de</email>
</author>
<published>2013-02-19T04:18:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=97b3e0ed1df6cf577be12b96cf80e5f7d90c8323'/>
<id>97b3e0ed1df6cf577be12b96cf80e5f7d90c8323</id>
<content type='text'>
Instead of performing the hash calculation for the mac address by ourself, we
can simply reuse ether_crc and shift only the result according to our
needs.
The code was tested against the previous implementation by verifying both
implementations against each other in userspace for 16200000000 different
mac addresses, changing the vendor bits of the mac address first.

Signed-off-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of performing the hash calculation for the mac address by ourself, we
can simply reuse ether_crc and shift only the result according to our
needs.
The code was tested against the previous implementation by verifying both
implementations against each other in userspace for 16200000000 different
mac addresses, changing the vendor bits of the mac address first.

Signed-off-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging/slicoss: Fix buffer possible overflow in slic_card_locate</title>
<updated>2013-03-11T16:22:44+00:00</updated>
<author>
<name>Peter Huewe</name>
<email>peterhuewe@gmx.de</email>
</author>
<published>2013-02-19T04:18:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=20d403e801272b84e033b8f17d3e45c4f66507c7'/>
<id>20d403e801272b84e033b8f17d3e45c4f66507c7</id>
<content type='text'>
smatch complains about a possible buffer overflow
slicoss.c:3651 slic_card_locate() error: buffer overflow
'physcard-&gt;adapter' 4 &lt;= 4

If the for loop is not exited prematurely i++ is executed after the last
iteration and thus i can be 4, which is out of bounds for
physcard-&gt;adapter.

-&gt; Add check for this condition and simplify the if statement by
inverting the condition.

Signed-off-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
smatch complains about a possible buffer overflow
slicoss.c:3651 slic_card_locate() error: buffer overflow
'physcard-&gt;adapter' 4 &lt;= 4

If the for loop is not exited prematurely i++ is executed after the last
iteration and thus i can be 4, which is out of bounds for
physcard-&gt;adapter.

-&gt; Add check for this condition and simplify the if statement by
inverting the condition.

Signed-off-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging/slicoss: Fix operation may be undefined warning</title>
<updated>2013-03-11T16:22:44+00:00</updated>
<author>
<name>Peter Huewe</name>
<email>peterhuewe@gmx.de</email>
</author>
<published>2013-02-19T04:18:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6d1b80fd886937ad4d6169ffa78cb0075eebce53'/>
<id>6d1b80fd886937ad4d6169ffa78cb0075eebce53</id>
<content type='text'>
gcc complains about an undefined operation:
slicoss.c:1417:19: warning: operation on 'rspq-&gt;pageindex' may be
undefined [-Wsequence-point]

The intended operation was (probably) to retrieve the pageindex + 1 and let
it wrap around if it reaches the num_pages.

Signed-off-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
gcc complains about an undefined operation:
slicoss.c:1417:19: warning: operation on 'rspq-&gt;pageindex' may be
undefined [-Wsequence-point]

The intended operation was (probably) to retrieve the pageindex + 1 and let
it wrap around if it reaches the num_pages.

Signed-off-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging/slicoss: Remove always true if statement</title>
<updated>2013-03-11T16:22:43+00:00</updated>
<author>
<name>Peter Huewe</name>
<email>peterhuewe@gmx.de</email>
</author>
<published>2013-02-19T04:18:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=cbb0920b9b5090c7006404d8c6533f8ca03cf2ed'/>
<id>cbb0920b9b5090c7006404d8c6533f8ca03cf2ed</id>
<content type='text'>
skbtype is assigned once to NORMAL_ETHFRAME and then checked if it is
NORMAL_ETHFRAME -&gt; remove the checks.

This also gets rid of the (false positive) smatch warning:
slicoss.c:2829 slic_xmit_start() error: potential NULL dereference
'hcmd'.

Signed-off-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
skbtype is assigned once to NORMAL_ETHFRAME and then checked if it is
NORMAL_ETHFRAME -&gt; remove the checks.

This also gets rid of the (false positive) smatch warning:
slicoss.c:2829 slic_xmit_start() error: potential NULL dereference
'hcmd'.

Signed-off-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging/slicoss: Check pointer before dereferencing</title>
<updated>2013-03-11T16:22:43+00:00</updated>
<author>
<name>Peter Huewe</name>
<email>peterhuewe@gmx.de</email>
</author>
<published>2013-02-19T04:13:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=81372118c6fc12d41b6e978b915cc010fe6e5700'/>
<id>81372118c6fc12d41b6e978b915cc010fe6e5700</id>
<content type='text'>
Smatch complains that the variable adapter is dereferenced before it is
checked:
slicoss.c:906 slic_timer_load_check() warn: variable dereferenced before
check 'adapter' (see line 904)

-&gt; move the assignment after the check.

Signed-off-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Smatch complains that the variable adapter is dereferenced before it is
checked:
slicoss.c:906 slic_timer_load_check() warn: variable dereferenced before
check 'adapter' (see line 904)

-&gt; move the assignment after the check.

Signed-off-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: slicoss: Fix space-related checkpatch.pl warnings</title>
<updated>2013-01-17T21:53:06+00:00</updated>
<author>
<name>Cruz Julian Bishop</name>
<email>cruzjbishop@gmail.com</email>
</author>
<published>2013-01-14T02:29:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=2fbedf67ed3ad2ee08b96cbc3c56c7d81db14de9'/>
<id>2fbedf67ed3ad2ee08b96cbc3c56c7d81db14de9</id>
<content type='text'>
This fixes all instances of
	"Please, no spaces at start of a new line"
	"Please, no spaces before tabs"

Please note that I probably got the warning names wrong,
but they should be close enough for usage here :)

Additional post-commit note: There is one comment on line 230ish in slic.h
that appears to have lost it's formatting. It was fine when I was working
in Geany, but it caught my eye in the below diff. Sorry if it actually happened!

Signed-off-by: Cruz Julian Bishop &lt;cruzjbishop@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes all instances of
	"Please, no spaces at start of a new line"
	"Please, no spaces before tabs"

Please note that I probably got the warning names wrong,
but they should be close enough for usage here :)

Additional post-commit note: There is one comment on line 230ish in slic.h
that appears to have lost it's formatting. It was fine when I was working
in Geany, but it caught my eye in the below diff. Sorry if it actually happened!

Signed-off-by: Cruz Julian Bishop &lt;cruzjbishop@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: slicoss: Fix three checkpatch.pl errors in slicoss.c</title>
<updated>2013-01-17T21:53:06+00:00</updated>
<author>
<name>Cruz Julian Bishop</name>
<email>cruzjbishop@gmail.com</email>
</author>
<published>2013-01-14T02:29:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=83682cd2fede86c064abac691a5a7091671cfed6'/>
<id>83682cd2fede86c064abac691a5a7091671cfed6</id>
<content type='text'>
The errors fixed are all instances of
"ERROR: do not use assignment in if condition"

Signed-off-by: Cruz Julian Bishop &lt;cruzjbishop@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The errors fixed are all instances of
"ERROR: do not use assignment in if condition"

Signed-off-by: Cruz Julian Bishop &lt;cruzjbishop@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
