<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/tty/vt/consolemap.c, branch v6.18.21</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-08-17T10:46:26+00:00</updated>
<entry>
<title>tty/vt: use guard()s</title>
<updated>2025-08-17T10:46:26+00:00</updated>
<author>
<name>Jiri Slaby (SUSE)</name>
<email>jirislaby@kernel.org</email>
</author>
<published>2025-08-14T07:24:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e730c373b6ff16a177e132859bf6ea4dbb15105f'/>
<id>urn:sha1:e730c373b6ff16a177e132859bf6ea4dbb15105f</id>
<content type='text'>
Having all the new guards, use them in the vt code. This improves
readability, makes error handling easier, and marks locked portions of
code explicit.

A local free_page_ptr __free guard is introduced for
__get_free_page/free_page (with proper casts). This could be made public
in include/. But I am not sure if there are more possible users, so
keeping completely private here.

Signed-off-by: "Jiri Slaby (SUSE)" &lt;jirislaby@kernel.org&gt;
Link: https://lore.kernel.org/r/20250814072456.182853-16-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty/vt: use guard()s in con_font_set/get() and con_{set,get}_unimap()</title>
<updated>2025-08-17T10:46:26+00:00</updated>
<author>
<name>Jiri Slaby (SUSE)</name>
<email>jirislaby@kernel.org</email>
</author>
<published>2025-08-14T07:24:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2fe16088c3c77cd96e64363927ddc98f66de8e8b'/>
<id>urn:sha1:2fe16088c3c77cd96e64363927ddc98f66de8e8b</id>
<content type='text'>
Having all the new guards, use them in the 8250_rsa code. This improves
readability, makes error handling easier, and marks locked portions of
code explicit.

The new __free()-annotated declarations are moved to the allocation points
as is preferred:
https://lore.kernel.org/all/CAHk-=wjvh_LUpa=864joG2JJXs3+viO-kLzLidR2JLyMr4MNwA@mail.gmail.com/

Except font_data in con_font_get(). The scope in there would not match
the expected lifetime. But the declaration is moved closer.

Signed-off-by: "Jiri Slaby (SUSE)" &lt;jirislaby@kernel.org&gt;
Link: https://lore.kernel.org/r/20250814072456.182853-15-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>vt: remove zero-width-space handling from conv_uni_to_pc()</title>
<updated>2025-04-26T09:22:04+00:00</updated>
<author>
<name>Nicolas Pitre</name>
<email>npitre@baylibre.com</email>
</author>
<published>2025-04-17T18:45:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ffae2340a6af9beb580f107ad28afde7b57dea5b'/>
<id>urn:sha1:ffae2340a6af9beb580f107ad28afde7b57dea5b</id>
<content type='text'>
This is now taken care of by ucs_is_zero_width().

Signed-off-by: Nicolas Pitre &lt;npitre@baylibre.com&gt;
Reviewed-by: Jiri Slaby &lt;jirislaby@kernel.org&gt;
Link: https://lore.kernel.org/r/20250417184849.475581-12-nico@fluxnic.net
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Revert "vt: remove zero-white-space handling from conv_uni_to_pc()"</title>
<updated>2025-04-26T09:21:12+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2025-04-26T09:21:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ab67c4622c3618edc35e623b53a0fd1a0a1ef062'/>
<id>urn:sha1:ab67c4622c3618edc35e623b53a0fd1a0a1ef062</id>
<content type='text'>
This reverts commit b35f7a773cbcbfea3bc87a33c7d0f39e34ed83ec.

A new version of the series was submitted, so it's easier to revert the
old one and add the new one due to the changes invovled.

Cc: Nicolas Pitre &lt;nico@fluxnic.net&gt;
Cc: Jiri Slaby &lt;jirislaby@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>vt: remove zero-white-space handling from conv_uni_to_pc()</title>
<updated>2025-04-11T14:55:55+00:00</updated>
<author>
<name>Nicolas Pitre</name>
<email>npitre@baylibre.com</email>
</author>
<published>2025-04-10T19:38:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b35f7a773cbcbfea3bc87a33c7d0f39e34ed83ec'/>
<id>urn:sha1:b35f7a773cbcbfea3bc87a33c7d0f39e34ed83ec</id>
<content type='text'>
This is now taken care of by ucs_is_zero_width(). And in the case where
we do want a padding from some zero-width code point then we should also
give the legacy displays a space character to work with.

Signed-off-by: Nicolas Pitre &lt;npitre@baylibre.com&gt;
Link: https://lore.kernel.org/r/6o2ss437-6nps-s943-1n38-54np5587r08s@syhkavp.arg
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drivers/tty/vt: use standard array-copy-functions</title>
<updated>2023-11-25T07:23:16+00:00</updated>
<author>
<name>Philipp Stanner</name>
<email>pstanner@redhat.com</email>
</author>
<published>2023-11-03T11:12:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e651faa2fba4d387aa00b3c02e9c10232852d2ef'/>
<id>urn:sha1:e651faa2fba4d387aa00b3c02e9c10232852d2ef</id>
<content type='text'>
tty/vt currently uses memdup_user() and vmemdup_array_user() to copy
userspace arrays.

Whereas there is no danger of overflowing, the call to vmemdup_user()
currently utilizes array_size() to calculate the array size
nevertheless. This is not useful because array_size() would return
SIZE_MAX and pass it to vmemdup_user() in case of (the impossible)
overflow.

string.h from the core-API now provides the wrappers memdup_array_user()
and vmemdup_array_user() to copy userspace arrays in a standardized
manner. Additionally, they also perform generic overflow-checks.

Use these wrappers to make it more obvious and readable that arrays are
being copied.

As we are at it, remove two unnecessary empty lines.

Suggested-by: Dave Airlie &lt;airlied@redhat.com&gt;
Signed-off-by: Philipp Stanner &lt;pstanner@redhat.com&gt;
Link: https://lore.kernel.org/r/20231103111207.74621-2-pstanner@redhat.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: stop using ndash in kernel-doc</title>
<updated>2023-10-03T12:31:16+00:00</updated>
<author>
<name>Jiri Slaby (SUSE)</name>
<email>jirislaby@kernel.org</email>
</author>
<published>2023-09-19T08:51:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c38f45ef5fe223671949622eba12918e8f41ffcf'/>
<id>urn:sha1:c38f45ef5fe223671949622eba12918e8f41ffcf</id>
<content type='text'>
An ndash used instead of a single dash renders a bullet to the result.
So use only single dashes in kernel-doc.

Signed-off-by: "Jiri Slaby (SUSE)" &lt;jirislaby@kernel.org&gt;
Link: https://lore.kernel.org/r/20230919085156.1578-11-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty/vt: consolemap: use E_TABSZ for the translations size</title>
<updated>2022-06-27T12:17:12+00:00</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2022-06-14T09:05:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2a9c56cceec04c50490befd5662423e3bb8c476f'/>
<id>urn:sha1:2a9c56cceec04c50490befd5662423e3bb8c476f</id>
<content type='text'>
The code expects "translations" to have 256 (E_TABSZ) values. Use the
macro instead of the constant to be explicit about this.

Suggested-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Link: https://lore.kernel.org/r/20220614090537.15557-8-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty/vt: consolemap: remove dflt reset from con_do_clear_unimap()</title>
<updated>2022-06-27T12:17:12+00:00</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2022-06-14T09:05:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a666c70c0c2c63a60b5672a14b022da9376cffb9'/>
<id>urn:sha1:a666c70c0c2c63a60b5672a14b022da9376cffb9</id>
<content type='text'>
con_do_clear_unimap() sets dflt to NULL and then calls
con_release_unimap() which does the very same as the first thing. So
remove the former as it is apparently superfluous.

Suggested-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Reviewed-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Link: https://lore.kernel.org/r/20220614090537.15557-7-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty/vt: consolemap: improve UNI_*() macros definitions</title>
<updated>2022-06-27T12:17:12+00:00</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2022-06-14T09:05:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1c2f6294a3613b84fc20d6620da078dedbb2ac1e'/>
<id>urn:sha1:1c2f6294a3613b84fc20d6620da078dedbb2ac1e</id>
<content type='text'>
Use FIELD_GET() and GENMASK() helpers instead of direct shifts and ANDs.
This makes the code even more obvious. I didn't know about the helpers
at the time of writing the macros.

Suggested-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Reviewed-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Link: https://lore.kernel.org/r/20220614090537.15557-6-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
