<feed xmlns='http://www.w3.org/2005/Atom'>
<title>passt, branch 2023_02_22.4ddbcb9</title>
<subtitle>Plug A Simple Socket Transport</subtitle>
<link rel='alternate' type='text/html' href='https://passt.top/passt/'/>
<entry>
<title>tcp: Disable optimisations for tcp_hash()</title>
<updated>2023-02-22T12:16:22+00:00</updated>
<author>
<name>Stefano Brivio</name>
<email>sbrivio@redhat.com</email>
</author>
<published>2023-02-22T12:12:58+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=4ddbcb9c0c555838b123c018a9ebc9b7e14a87e5'/>
<id>4ddbcb9c0c555838b123c018a9ebc9b7e14a87e5</id>
<content type='text'>
I'm not sure if we're breaking some aliasing rule here, but with gcc
12.2.1 on x86_64 and -flto, the siphash_20b() call in tcp_hash()
doesn't see the connection address -- it gets all zeroes instead.

Fix this temporarily by disabling optimisations for this tcp_hash().

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I'm not sure if we're breaking some aliasing rule here, but with gcc
12.2.1 on x86_64 and -flto, the siphash_20b() call in tcp_hash()
doesn't see the connection address -- it gets all zeroes instead.

Fix this temporarily by disabling optimisations for this tcp_hash().

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>selinux/passt.te: Allow setting socket option on routing netlink socket</title>
<updated>2023-02-21T18:12:37+00:00</updated>
<author>
<name>Stefano Brivio</name>
<email>sbrivio@redhat.com</email>
</author>
<published>2023-02-21T18:09:23+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=933aa1014bb9012fa20974945502c6687beaaebe'/>
<id>933aa1014bb9012fa20974945502c6687beaaebe</id>
<content type='text'>
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>selinux/passt.te: Allow /etc/resolv.conf symlinks to be followed</title>
<updated>2023-02-21T18:12:37+00:00</updated>
<author>
<name>Stefano Brivio</name>
<email>sbrivio@redhat.com</email>
</author>
<published>2023-02-21T18:07:31+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=0c11355e834d542f17073721b6462668680a2c86'/>
<id>0c11355e834d542f17073721b6462668680a2c86</id>
<content type='text'>
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>selinux/passt.te: Allow setcap on the process itself</title>
<updated>2023-02-21T18:12:37+00:00</updated>
<author>
<name>Stefano Brivio</name>
<email>sbrivio@redhat.com</email>
</author>
<published>2023-02-21T18:06:05+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=7d9150db0ac72cde46b48b916daefa6e70a751b0'/>
<id>7d9150db0ac72cde46b48b916daefa6e70a751b0</id>
<content type='text'>
This is needed by the new functions in isolate.c, add the
corresponding rule.

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is needed by the new functions in isolate.c, add the
corresponding rule.

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>selinux: Switch to a more reasonable model for PID and socket files</title>
<updated>2023-02-21T18:12:37+00:00</updated>
<author>
<name>Stefano Brivio</name>
<email>sbrivio@redhat.com</email>
</author>
<published>2023-02-21T18:03:49+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=01801b131f21f126b341f0db069727d6f9bd8d2e'/>
<id>01801b131f21f126b341f0db069727d6f9bd8d2e</id>
<content type='text'>
Instead of restricting PID files to /var/run/passt.pid, which is a
single file and unlikely to be used, use the user_tmp_t type which
should cover any reasonable need.

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of restricting PID files to /var/run/passt.pid, which is a
single file and unlikely to be used, use the user_tmp_t type which
should cover any reasonable need.

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>selinux: Define interfaces for libvirt and similar frameworks</title>
<updated>2023-02-21T18:12:37+00:00</updated>
<author>
<name>Stefano Brivio</name>
<email>sbrivio@redhat.com</email>
</author>
<published>2023-02-21T18:00:13+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=49024476309df1f6f32f34c40e793592687c9f26'/>
<id>49024476309df1f6f32f34c40e793592687c9f26</id>
<content type='text'>
Services running passt will commonly need to transition to its
domain, terminate it, connect and write to its socket.

The init_daemon_domain() macro now defines the default transition to
the passt_t domain, using the passt_exec_t type.

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Services running passt will commonly need to transition to its
domain, terminate it, connect and write to its socket.

The init_daemon_domain() macro now defines the default transition to
the passt_t domain, using the passt_exec_t type.

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>selinux/passt.if: Fix typo in passt_read_data interface definition</title>
<updated>2023-02-21T18:12:30+00:00</updated>
<author>
<name>Stefano Brivio</name>
<email>sbrivio@redhat.com</email>
</author>
<published>2023-02-21T17:56:07+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=9136f74015106e938db6e91672d502d007d59816'/>
<id>9136f74015106e938db6e91672d502d007d59816</id>
<content type='text'>
This is an example interface, currently unused, so it went undetected:
m4 macros need a backtick at the beginning of a block instead of a
single quote.

Fixes: 1f4b7fa0d75d ("passt, pasta: Add examples of SELinux policy modules")
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is an example interface, currently unused, so it went undetected:
m4 macros need a backtick at the beginning of a block instead of a
single quote.

Fixes: 1f4b7fa0d75d ("passt, pasta: Add examples of SELinux policy modules")
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>conf: Fix typo and logic in conf_ports() check for port binding</title>
<updated>2023-02-16T18:59:07+00:00</updated>
<author>
<name>Stefano Brivio</name>
<email>sbrivio@redhat.com</email>
</author>
<published>2023-02-16T18:46:36+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=4663ccc89a7fcbf9d901a80730ee925fc7f64c59'/>
<id>4663ccc89a7fcbf9d901a80730ee925fc7f64c59</id>
<content type='text'>
Ouch, I accidentally pushed the previous change without running the
tests:

- we need to check, in conf_ports(), that udp_sock_init()
  managed to bind at least a port, not the opposite

- for -T and -U, we have no way to know if we'll manage to bind
  the port later, so never report an error for those

Fixes: 3d0de2c1d727 ("conf, tcp, udp: Exit if we fail to bind sockets for all given ports")
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ouch, I accidentally pushed the previous change without running the
tests:

- we need to check, in conf_ports(), that udp_sock_init()
  managed to bind at least a port, not the opposite

- for -T and -U, we have no way to know if we'll manage to bind
  the port later, so never report an error for those

Fixes: 3d0de2c1d727 ("conf, tcp, udp: Exit if we fail to bind sockets for all given ports")
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>conf, tap: Silence two false positive invalidFunctionArg from cppcheck</title>
<updated>2023-02-16T18:19:23+00:00</updated>
<author>
<name>Stefano Brivio</name>
<email>sbrivio@redhat.com</email>
</author>
<published>2023-02-16T18:19:23+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=36f0199f6ef4183837ae72551a778a4054de43fd'/>
<id>36f0199f6ef4183837ae72551a778a4054de43fd</id>
<content type='text'>
The newly introduced die() calls exit(), but cppcheck doesn't see it
and warns about possibly invalid arguments used after the check which
triggers die(). Add return statements to silence the warnings.

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The newly introduced die() calls exit(), but cppcheck doesn't see it
and warns about possibly invalid arguments used after the check which
triggers die(). Add return statements to silence the warnings.

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tcp: Remove 'zero_len' goto from tcp_data_from_sock</title>
<updated>2023-02-16T17:56:37+00:00</updated>
<author>
<name>David Gibson</name>
<email>david@gibson.dropbear.id.au</email>
</author>
<published>2023-02-16T05:43:11+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=89e0fbfaa777ef28b5269421cc6770589145d4e6'/>
<id>89e0fbfaa777ef28b5269421cc6770589145d4e6</id>
<content type='text'>
This goto exists purely to move this exception case out of line.  Although
that does make the "normal" path a little clearer, it comes at the cost of
not knowing how where control will flow after jumping to the zero_len
label.  The exceptional case isn't that long, so just put it inline.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This goto exists purely to move this exception case out of line.  Although
that does make the "normal" path a little clearer, it comes at the cost of
not knowing how where control will flow after jumping to the zero_len
label.  The exceptional case isn't that long, so just put it inline.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
