<feed xmlns='http://www.w3.org/2005/Atom'>
<title>seitan/demo, branch master</title>
<subtitle>Syscall Expressive Interpreter, Transformer and Notifier</subtitle>
<link rel='alternate' type='text/html' href='https://seitan.rocks/seitan/'/>
<entry>
<title>call, emit, match: Add support for vectorised operations, nfnetlink</title>
<updated>2024-08-13T17:00:35+00:00</updated>
<author>
<name>Stefano Brivio</name>
<email>sbrivio@redhat.com</email>
</author>
<published>2024-08-13T16:50:33+00:00</published>
<link rel='alternate' type='text/html' href='https://seitan.rocks/seitan/commit/?id=9bf3b1cc7a94357c250f77f16829c96cbae801fe'/>
<id>9bf3b1cc7a94357c250f77f16829c96cbae801fe</id>
<content type='text'>
We want to add and delete rules with iptables(8), and manipulate set
elements with nft(8).

These are the first users we encounter sending multiple netlink
messages in one sendmsg().

To support matching on those, we need to iterate over several
messages, looking for a matching one, or a mismatching one (depending
on quantifiers and match type), but we don't want to implement program
loops because of security design reasons.

We can't implement a generalised instruction that vectorises existing
ones, either, because we need to support universal and existential
quantifiers in fields that are repeated multiple times, once per each
netlink message, with bitwise operations and non-exact matching types.

Add vectorisation support to OP_CMP and OP_BITWISE instead, with a
generic description for a vector (only sequences of netlink messages
with length in nlmsghdr are supported at the moment) so that,
depending on the quantifiers, we'll repeat those operations as many
times as needed. This way, we don't risk any O(n^2) explosion, and we
are bound by O(m * n) instead, with m compare/bitwise operations for
a given expression, and n number of netlink messages.

Add demos for nft and iptables using the new concepts.

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We want to add and delete rules with iptables(8), and manipulate set
elements with nft(8).

These are the first users we encounter sending multiple netlink
messages in one sendmsg().

To support matching on those, we need to iterate over several
messages, looking for a matching one, or a mismatching one (depending
on quantifiers and match type), but we don't want to implement program
loops because of security design reasons.

We can't implement a generalised instruction that vectorises existing
ones, either, because we need to support universal and existential
quantifiers in fields that are repeated multiple times, once per each
netlink message, with bitwise operations and non-exact matching types.

Add vectorisation support to OP_CMP and OP_BITWISE instead, with a
generic description for a vector (only sequences of netlink messages
with length in nlmsghdr are supported at the moment) so that,
depending on the quantifiers, we'll repeat those operations as many
times as needed. This way, we don't risk any O(n^2) explosion, and we
are bound by O(m * n) instead, with m compare/bitwise operations for
a given expression, and n number of netlink messages.

Add demos for nft and iptables using the new concepts.

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add fsetxattr(), fremovexattr(), open_by_handle_at(), and "virtiofsd demo"</title>
<updated>2024-05-15T06:49:56+00:00</updated>
<author>
<name>Stefano Brivio</name>
<email>sbrivio@redhat.com</email>
</author>
<published>2024-05-15T06:49:56+00:00</published>
<link rel='alternate' type='text/html' href='https://seitan.rocks/seitan/commit/?id=5a9302bab9c9bb3d1577f04678d074fb7af4115f'/>
<id>5a9302bab9c9bb3d1577f04678d074fb7af4115f</id>
<content type='text'>
Mostly assorted fixes, a new FDGET operation (get a copy of the
target file descriptor via pidfd_getfd()) and a new "FD" flag that
means we have to do that on direct tag reference.

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Mostly assorted fixes, a new FDGET operation (get a copy of the
target file descriptor via pidfd_getfd()) and a new "FD" flag that
means we have to do that on direct tag reference.

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>seitan: Add netlink, sendto()/sendmsg(), iovec handling, demo with routes</title>
<updated>2023-12-21T11:45:36+00:00</updated>
<author>
<name>Stefano Brivio</name>
<email>sbrivio@redhat.com</email>
</author>
<published>2023-12-21T11:06:05+00:00</published>
<link rel='alternate' type='text/html' href='https://seitan.rocks/seitan/commit/?id=bdbec30a849807fb5e6841a38cfe0d168e5962b9'/>
<id>bdbec30a849807fb5e6841a38cfe0d168e5962b9</id>
<content type='text'>
A bit rough at the moment, but it does the trick. Bonus: setsockopt()
(with magic values only, not used in any demo yet).

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A bit rough at the moment, but it does the trick. Bonus: setsockopt()
(with magic values only, not used in any demo yet).

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>demo: update connect example with new tag format</title>
<updated>2023-09-04T07:18:13+00:00</updated>
<author>
<name>Alice Frosi</name>
<email>afrosi@redhat.com</email>
</author>
<published>2023-09-04T07:18:13+00:00</published>
<link rel='alternate' type='text/html' href='https://seitan.rocks/seitan/commit/?id=508b2b2f1473b67d41d947a92c368765cb868e17'/>
<id>508b2b2f1473b67d41d947a92c368765cb868e17</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>cooker, seitan: add sched_setscheduler</title>
<updated>2023-09-01T08:37:04+00:00</updated>
<author>
<name>Alice Frosi</name>
<email>afrosi@redhat.com</email>
</author>
<published>2023-09-01T08:16:36+00:00</published>
<link rel='alternate' type='text/html' href='https://seitan.rocks/seitan/commit/?id=59f7f7c241253293c25e001c9340f1deeb138311'/>
<id>59f7f7c241253293c25e001c9340f1deeb138311</id>
<content type='text'>
The sched_setscheduler requires to set the pid of the process we want to
change the priority, this adds a new metadata for getting the target pid
at runtime.

Add a couple of syscalls for the scheduler in the string parsing.

Signed-off-by: Alice Frosi &lt;afrosi@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The sched_setscheduler requires to set the pid of the process we want to
change the priority, this adds a new metadata for getting the target pid
at runtime.

Add a couple of syscalls for the scheduler in the string parsing.

Signed-off-by: Alice Frosi &lt;afrosi@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cooker: simplify tag and add caller metadata</title>
<updated>2023-08-30T08:48:59+00:00</updated>
<author>
<name>Alice Frosi</name>
<email>afrosi@redhat.com</email>
</author>
<published>2023-08-29T09:50:00+00:00</published>
<link rel='alternate' type='text/html' href='https://seitan.rocks/seitan/commit/?id=d3917582873df723aa2a3ddbb6116950292e114c'/>
<id>d3917582873df723aa2a3ddbb6116950292e114c</id>
<content type='text'>
Group the metadata information:
  - simplify the json by removing the 'tag' and only using 'get' and 'set'
    keys
  - get uid and gid at runtime for the target ('caller'). This can be useful when
    the the UID and GID of the target are only known at runtime and they
    need to be used for setting the permissions of files
  - updated example demo/mknod.hjson

Signed-off-by: Alice Frosi &lt;afrosi@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Group the metadata information:
  - simplify the json by removing the 'tag' and only using 'get' and 'set'
    keys
  - get uid and gid at runtime for the target ('caller'). This can be useful when
    the the UID and GID of the target are only known at runtime and they
    need to be used for setting the permissions of files
  - updated example demo/mknod.hjson

Signed-off-by: Alice Frosi &lt;afrosi@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>demo: clean-up leftover files</title>
<updated>2023-08-24T13:41:40+00:00</updated>
<author>
<name>Alice Frosi</name>
<email>afrosi@redhat.com</email>
</author>
<published>2023-08-24T13:41:40+00:00</published>
<link rel='alternate' type='text/html' href='https://seitan.rocks/seitan/commit/?id=6fcea0af3c9a81606b59b9503bffd322c630e342'/>
<id>6fcea0af3c9a81606b59b9503bffd322c630e342</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>demo: clean-up the directory</title>
<updated>2023-08-24T13:36:01+00:00</updated>
<author>
<name>Alice Frosi</name>
<email>afrosi@redhat.com</email>
</author>
<published>2023-08-24T13:36:01+00:00</published>
<link rel='alternate' type='text/html' href='https://seitan.rocks/seitan/commit/?id=cfcf3d3c399c037dd37cce9cf247f6683777697b'/>
<id>cfcf3d3c399c037dd37cce9cf247f6683777697b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>demo: clean-up</title>
<updated>2023-07-04T10:40:49+00:00</updated>
<author>
<name>Alice Frosi</name>
<email>afrosi@redhat.com</email>
</author>
<published>2023-07-04T10:39:56+00:00</published>
<link rel='alternate' type='text/html' href='https://seitan.rocks/seitan/commit/?id=edee15930bc10babade0fe7dcf25baef225c4b53'/>
<id>edee15930bc10babade0fe7dcf25baef225c4b53</id>
<content type='text'>
Remove all the *.gluten and *.bpf files and added the files to gitignore
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove all the *.gluten and *.bpf files and added the files to gitignore
</pre>
</div>
</content>
</entry>
<entry>
<title>cooker, seitan: Add support for GID/UID in context</title>
<updated>2023-06-28T15:47:35+00:00</updated>
<author>
<name>Stefano Brivio</name>
<email>sbrivio@redhat.com</email>
</author>
<published>2023-06-28T15:45:36+00:00</published>
<link rel='alternate' type='text/html' href='https://seitan.rocks/seitan/commit/?id=beeefb214a2dc8917b5a31945e740ecce4536764'/>
<id>beeefb214a2dc8917b5a31945e740ecce4536764</id>
<content type='text'>
Similarly to namespace specifications, the special value "caller", as
well as login/group names and numeric UID/GIDs are supported.

Example of usage in demo/mknod.hjson. Light on checks and with some
TODOs left behind at the moment.

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Similarly to namespace specifications, the special value "caller", as
well as login/group names and numeric UID/GIDs are supported.

Example of usage in demo/mknod.hjson. Light on checks and with some
TODOs left behind at the moment.

Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
