<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/tty/tty_audit.c, branch v6.19.11</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-03-20T15:00:50+00:00</updated>
<entry>
<title>tty: audit: do not use N_TTY_BUF_SIZE</title>
<updated>2025-03-20T15:00:50+00:00</updated>
<author>
<name>Jiri Slaby (SUSE)</name>
<email>jirislaby@kernel.org</email>
</author>
<published>2025-03-17T07:00:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ec1132dd55ef590fa0553308b1f7da914d505151'/>
<id>urn:sha1:ec1132dd55ef590fa0553308b1f7da914d505151</id>
<content type='text'>
N_TTY_BUF_SIZE -- as the name suggests -- is the N_TTY's buffer size.
There is no reason to couple that to audit's buffer size, so define an
own TTY_AUDIT_BUF_SIZE macro (with the same size).

N_TTY_BUF_SIZE is private and will be moved to n_tty.c later.

Signed-off-by: Jiri Slaby (SUSE) &lt;jirislaby@kernel.org&gt;
Link: https://lore.kernel.org/r/20250317070046.24386-3-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: audit: unify to u8</title>
<updated>2023-08-11T19:12:46+00:00</updated>
<author>
<name>Jiri Slaby (SUSE)</name>
<email>jirislaby@kernel.org</email>
</author>
<published>2023-08-10T09:15:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3e04ba41f22490873a60816ea31c6848d3426255'/>
<id>urn:sha1:3e04ba41f22490873a60816ea31c6848d3426255</id>
<content type='text'>
Somewhere, we use 'char', somewhere 'unsigned char'. Unify to 'u8' as
the rest of the tty layer does.

Signed-off-by: "Jiri Slaby (SUSE)" &lt;jirislaby@kernel.org&gt;
Link: https://lore.kernel.org/r/20230810091510.13006-31-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty_audit: make data of tty_audit_log() const</title>
<updated>2023-06-21T15:57:29+00:00</updated>
<author>
<name>Jiri Slaby</name>
<email>jirislaby@kernel.org</email>
</author>
<published>2023-06-21T10:16:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e534755c9412be07f579acd2947401a9f87a33c8'/>
<id>urn:sha1:e534755c9412be07f579acd2947401a9f87a33c8</id>
<content type='text'>
'data' are only read (passed down to audit_log_n_hex()), so they can be
const -- the same what is expected in audit_log_n_hex(). Only a minor
cleanup to be consistent.

Signed-off-by: Jiri Slaby (SUSE) &lt;jirislaby@kernel.org&gt;
Link: https://lore.kernel.org/r/20230621101611.10580-7-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty_audit: make tty pointers in exposed functions const</title>
<updated>2023-06-21T15:57:29+00:00</updated>
<author>
<name>Jiri Slaby</name>
<email>jirislaby@kernel.org</email>
</author>
<published>2023-06-21T10:16:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e64ed44bce43e003dd154c0bc418a431c15bdf77'/>
<id>urn:sha1:e64ed44bce43e003dd154c0bc418a431c15bdf77</id>
<content type='text'>
Both tty_audit_add_data() and tty_audit_tiocsti() need only to read from
the tty struct, so make the tty parameters of them both const. This
aids the compiler a bit.

Signed-off-by: Jiri Slaby (SUSE) &lt;jirislaby@kernel.org&gt;
Link: https://lore.kernel.org/r/20230621101611.10580-6-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty_audit: make icanon a bool</title>
<updated>2023-06-21T15:57:29+00:00</updated>
<author>
<name>Jiri Slaby</name>
<email>jirislaby@kernel.org</email>
</author>
<published>2023-06-21T10:16:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3e540a7bad8534a9b8845defa051834c9694d86c'/>
<id>urn:sha1:3e540a7bad8534a9b8845defa051834c9694d86c</id>
<content type='text'>
Use bool for tty_audit_buf::icanon in favor of ugly bitfields. And get
rid of "!!" as that is completely unnecessary.

Signed-off-by: Jiri Slaby (SUSE) &lt;jirislaby@kernel.org&gt;
Link: https://lore.kernel.org/r/20230621101611.10580-5-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty_audit: invert the condition in tty_audit_log()</title>
<updated>2023-06-21T15:57:29+00:00</updated>
<author>
<name>Jiri Slaby</name>
<email>jirislaby@kernel.org</email>
</author>
<published>2023-06-21T10:16:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=94f94810efc4b4b337c9f2abc8b0188cef5ccb9b'/>
<id>urn:sha1:94f94810efc4b4b337c9f2abc8b0188cef5ccb9b</id>
<content type='text'>
If we cannot obtain an audit buffer in tty_audit_log(), simply return
from the function. Apart this is mostly preferred in the kernel, it
allows to merge the split audit string while still keeping it readable.

Signed-off-by: Jiri Slaby (SUSE) &lt;jirislaby@kernel.org&gt;
Link: https://lore.kernel.org/r/20230621101611.10580-4-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty_audit: use kzalloc() in tty_audit_buf_alloc()</title>
<updated>2023-06-21T15:57:29+00:00</updated>
<author>
<name>Jiri Slaby</name>
<email>jirislaby@kernel.org</email>
</author>
<published>2023-06-21T10:16:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e1488513abee9f34a7d0f3bd57ee65d2a7e13426'/>
<id>urn:sha1:e1488513abee9f34a7d0f3bd57ee65d2a7e13426</id>
<content type='text'>
tty_audit_buf_alloc() manually erases most of the entries after
kmalloc(). So use kzalloc() and remove the manual sets to zero.

That way, we are sure that we do not omit anything.

Signed-off-by: Jiri Slaby (SUSE) &lt;jirislaby@kernel.org&gt;
Link: https://lore.kernel.org/r/20230621101611.10580-3-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty_audit: use TASK_COMM_LEN for task comm</title>
<updated>2023-06-21T15:57:29+00:00</updated>
<author>
<name>Jiri Slaby</name>
<email>jirislaby@kernel.org</email>
</author>
<published>2023-06-21T10:16:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=777e456852f729fa2942187a43a8eafbaecc6876'/>
<id>urn:sha1:777e456852f729fa2942187a43a8eafbaecc6876</id>
<content type='text'>
This is the preferred way of declaring an array for get_task_comm().

Signed-off-by: Jiri Slaby (SUSE) &lt;jirislaby@kernel.org&gt;
Link: https://lore.kernel.org/r/20230621101611.10580-2-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: audit: move some local functions out of tty.h</title>
<updated>2021-04-15T08:24:58+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2021-04-08T12:51:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=da5d669e00d2c437b3f508d60add417fc74f4bb6'/>
<id>urn:sha1:da5d669e00d2c437b3f508d60add417fc74f4bb6</id>
<content type='text'>
The functions tty_audit_add_data() and tty_audit_tiocsti() are local to
the tty core code, and do not need to be in a "kernel-wide" header file
so move them to drivers/tty/tty.h

Cc: Jiri Slaby &lt;jirislaby@kernel.org&gt;
Link: https://lore.kernel.org/r/20210408125134.3016837-9-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: tty_audit: Demote non-conformant kernel-doc headers</title>
<updated>2020-11-06T09:54:04+00:00</updated>
<author>
<name>Lee Jones</name>
<email>lee.jones@linaro.org</email>
</author>
<published>2020-11-04T19:35:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ffb5d9cf650f5a0596264338d8f783e11f187af7'/>
<id>urn:sha1:ffb5d9cf650f5a0596264338d8f783e11f187af7</id>
<content type='text'>
Fixes the following W=1 kernel build warning(s):

 drivers/tty/tty_audit.c:91: warning: Function parameter or member 'buf' not described in 'tty_audit_buf_push'
 drivers/tty/tty_audit.c:129: warning: Function parameter or member 'sig' not described in 'tty_audit_fork'
 drivers/tty/tty_audit.c:137: warning: Function parameter or member 'tty' not described in 'tty_audit_tiocsti'
 drivers/tty/tty_audit.c:137: warning: Function parameter or member 'ch' not described in 'tty_audit_tiocsti'
 drivers/tty/tty_audit.c:202: warning: Function parameter or member 'tty' not described in 'tty_audit_add_data'
 drivers/tty/tty_audit.c:202: warning: Function parameter or member 'data' not described in 'tty_audit_add_data'
 drivers/tty/tty_audit.c:202: warning: Function parameter or member 'size' not described in 'tty_audit_add_data'

Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Jiri Slaby &lt;jirislaby@kernel.org&gt;
Cc: Miloslav Trmac &lt;mitr@redhat.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Link: https://lore.kernel.org/r/20201104193549.4026187-16-lee.jones@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
