<feed xmlns='http://www.w3.org/2005/Atom'>
<title>plan9port/src/libsec/port, branch patch</title>
<subtitle>Plan 9 from User Space (with patches)</subtitle>
<link rel='alternate' type='text/html' href='https://git.rctt.net/plan9port/'/>
<entry>
<title>all: remove $OBJTYPE from build</title>
<updated>2020-12-30T12:53:28+00:00</updated>
<author>
<name>Russ Cox</name>
<email>rsc@swtch.com</email>
</author>
<published>2020-12-30T12:39:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rctt.net/plan9port/commit/?id=99dee78c2d44641ba56e5bb640d732f993b3dfa1'/>
<id>99dee78c2d44641ba56e5bb640d732f993b3dfa1</id>
<content type='text'>
Now that we assume pthreads, the only assembly
left is in libmp and libsec.
We only ever added assembly for 386.
The portable C code is fine for plan9port.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that we assume pthreads, the only assembly
left is in libmp and libsec.
We only ever added assembly for 386.
The portable C code is fine for plan9port.
</pre>
</div>
</content>
</entry>
<entry>
<title>Trivial changes: whitespace and modes.</title>
<updated>2020-01-10T14:54:30+00:00</updated>
<author>
<name>Dan Cross</name>
<email>cross@gajendra.net</email>
</author>
<published>2020-01-10T14:44:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rctt.net/plan9port/commit/?id=fa325e9b42b0bdfb48857d1958d9fb7ceac55151'/>
<id>fa325e9b42b0bdfb48857d1958d9fb7ceac55151</id>
<content type='text'>
Remote whitespace at the ends of lines.
Remove blank lines from the ends of files.
Change modes on source files so that they
are not executable.

Signed-off-by: Dan Cross &lt;cross@gajendra.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remote whitespace at the ends of lines.
Remove blank lines from the ends of files.
Change modes on source files so that they
are not executable.

Signed-off-by: Dan Cross &lt;cross@gajendra.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libsec: avoid undefined C</title>
<updated>2013-03-19T18:35:16+00:00</updated>
<author>
<name>Xi Wang</name>
<email>xi.wang@gmail.com</email>
</author>
<published>2013-03-19T18:35:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rctt.net/plan9port/commit/?id=8a2a5b8f2568a665f00741994c1247f0f7d3dffe'/>
<id>8a2a5b8f2568a665f00741994c1247f0f7d3dffe</id>
<content type='text'>
gcc compiles `p + length &lt; p' into 'length &lt; 0' since pointer overflow is undefined behavior in C.  This breaks the check against a large `length'.

Use `length &gt; pend - p' instead.

There's no need to check `length &lt; 0' since `length' is from length_decode() and should be non-negative.

===

Try the simplified code.

void bar(void);
void foo(unsigned char *p, int length)
{
        if (p + length &lt; p)
                bar();
}

$ gcc -S -o - t.c -O2
...
foo:
.LFB0:
        .cfi_startproc
        testl	%esi, %esi
        js	.L4
        rep
        ret
.L4:
        jmp	bar
        .cfi_endproc

Clearly `p' is not used at all.

R=rsc
CC=plan9port.codebot
https://codereview.appspot.com/7231069
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
gcc compiles `p + length &lt; p' into 'length &lt; 0' since pointer overflow is undefined behavior in C.  This breaks the check against a large `length'.

Use `length &gt; pend - p' instead.

There's no need to check `length &lt; 0' since `length' is from length_decode() and should be non-negative.

===

Try the simplified code.

void bar(void);
void foo(unsigned char *p, int length)
{
        if (p + length &lt; p)
                bar();
}

$ gcc -S -o - t.c -O2
...
foo:
.LFB0:
        .cfi_startproc
        testl	%esi, %esi
        js	.L4
        rep
        ret
.L4:
        jmp	bar
        .cfi_endproc

Clearly `p' is not used at all.

R=rsc
CC=plan9port.codebot
https://codereview.appspot.com/7231069
</pre>
</div>
</content>
</entry>
<entry>
<title>fix clang warnings reported by Tuncer Ayaz</title>
<updated>2012-10-21T15:25:08+00:00</updated>
<author>
<name>Russ Cox</name>
<email>rsc@swtch.com</email>
</author>
<published>2012-10-21T15:25:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rctt.net/plan9port/commit/?id=0cfb376070a4bef7b4168a9795e025437e1be79f'/>
<id>0cfb376070a4bef7b4168a9795e025437e1be79f</id>
<content type='text'>
R=rsc
http://codereview.appspot.com/6744054
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
R=rsc
http://codereview.appspot.com/6744054
</pre>
</div>
</content>
</entry>
<entry>
<title>libsec: fix dsagen 64-bit bug</title>
<updated>2011-10-05T20:23:01+00:00</updated>
<author>
<name>Russ Cox</name>
<email>rsc@swtch.com</email>
</author>
<published>2011-10-05T20:23:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rctt.net/plan9port/commit/?id=c38ef9e7b60d5a3cab522dc1fe3c7b97e77646ea'/>
<id>c38ef9e7b60d5a3cab522dc1fe3c7b97e77646ea</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>probably_prime: run more than one Miller-Rabin round</title>
<updated>2010-03-12T02:04:42+00:00</updated>
<author>
<name>Russ Cox</name>
<email>rsc@swtch.com</email>
</author>
<published>2010-03-12T02:04:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rctt.net/plan9port/commit/?id=1619f52cbc2096dd2fc93b189890bc8fd0771681'/>
<id>1619f52cbc2096dd2fc93b189890bc8fd0771681</id>
<content type='text'>
R=rsc
http://codereview.appspot.com/462041
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
R=rsc
http://codereview.appspot.com/462041
</pre>
</div>
</content>
</entry>
<entry>
<title>libsec: update primetest to use mpfmt</title>
<updated>2010-03-12T02:04:12+00:00</updated>
<author>
<name>Russ Cox</name>
<email>rsc@swtch.com</email>
</author>
<published>2010-03-12T02:04:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rctt.net/plan9port/commit/?id=a1afc8529d03515d361110edcabb73402527be89'/>
<id>a1afc8529d03515d361110edcabb73402527be89</id>
<content type='text'>
R=rsc
http://codereview.appspot.com/464041
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
R=rsc
http://codereview.appspot.com/464041
</pre>
</div>
</content>
</entry>
<entry>
<title>libsec: use intptr to silence 64-bit warning (Michael Teichgräber)</title>
<updated>2008-03-06T20:14:03+00:00</updated>
<author>
<name>Russ Cox</name>
<email>rsc@swtch.com</email>
</author>
<published>2008-03-06T20:14:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rctt.net/plan9port/commit/?id=350f4d3ede30defbe2956199a67fbb2304f549d7'/>
<id>350f4d3ede30defbe2956199a67fbb2304f549d7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Use gcc -ansi -pedantic in 9c.  Fix many non-C89-isms.</title>
<updated>2006-04-01T19:24:03+00:00</updated>
<author>
<name>rsc</name>
<email>devnull@localhost</email>
</author>
<published>2006-04-01T19:24:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rctt.net/plan9port/commit/?id=cbeb0b26e4c7caa8d1b47de791a7418dc20a4567'/>
<id>cbeb0b26e4c7caa8d1b47de791a7418dc20a4567</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>add dsa x509</title>
<updated>2005-02-13T18:35:11+00:00</updated>
<author>
<name>rsc</name>
<email>devnull@localhost</email>
</author>
<published>2005-02-13T18:35:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rctt.net/plan9port/commit/?id=74fc94d47e68684567f16d3d09b822cdad721e4a'/>
<id>74fc94d47e68684567f16d3d09b822cdad721e4a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
