Nick Alcock
ae6385af37
braille_console: remove MODULE_LICENSE in non-modules
...
Since commit 8b41fc4454 ("kbuild: create modules.builtin without
Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
are used to identify modules. As a consequence, uses of the macro
in non-modules will cause modprobe to misidentify their containing
object file as a module when it is not (false positives), and modprobe
might succeed rather than failing with a suitable error message.
So remove it in the files in this commit, none of which can be built as
modules.
Signed-off-by: Nick Alcock <nick.alcock@oracle.com >
Suggested-by: Luis Chamberlain <mcgrof@kernel.org >
Cc: Luis Chamberlain <mcgrof@kernel.org >
Cc: linux-modules@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Hitomi Hasegawa <hasegawa-hitomi@fujitsu.com >
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org >
2023-04-13 13:13:53 -07:00
Greg Kroah-Hartman
99ba2ad1db
Merge 6.2-rc5 into char-misc-next
...
We need the char/misc driver fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-22 08:37:23 +01:00
Colin Ian King
3e50b63962
accessibility: speakup: Fix spelling mistake "thw" -> "the"
...
There is a spelling mistake in the module parameter description
for say_word_ctl and an extra space. Fix the spelling mistake and
remove the extraneous space.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com >
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org >
Link: https://lore.kernel.org/r/20221207095202.2282567-1-colin.i.king@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-20 13:06:20 +01:00
Gaosheng Cui
5abbeebd82
tty: fix possible null-ptr-defer in spk_ttyio_release
...
Run the following tests on the qemu platform:
syzkaller:~# modprobe speakup_audptr
input: Speakup as /devices/virtual/input/input4
initialized device: /dev/synth, node (MAJOR 10, MINOR 125)
speakup 3.1.6: initialized
synth name on entry is: (null)
synth probe
spk_ttyio_initialise_ldisc failed because tty_kopen_exclusive returned
failed (errno -16), then remove the module, we will get a null-ptr-defer
problem, as follow:
syzkaller:~# modprobe -r speakup_audptr
releasing synth audptr
BUG: kernel NULL pointer dereference, address: 0000000000000080
#PF: supervisor write access in kernel mode
#PF: error_code(0x0002) - not-present page
PGD 0 P4D 0
Oops: 0002 [#1 ] PREEMPT SMP PTI
CPU: 2 PID: 204 Comm: modprobe Not tainted 6.1.0-rc6-dirty #1
RIP: 0010:mutex_lock+0x14/0x30
Call Trace:
<TASK>
spk_ttyio_release+0x19/0x70 [speakup]
synth_release.part.6+0xac/0xc0 [speakup]
synth_remove+0x56/0x60 [speakup]
__x64_sys_delete_module+0x156/0x250
? fpregs_assert_state_consistent+0x1d/0x50
do_syscall_64+0x37/0x90
entry_SYSCALL_64_after_hwframe+0x63/0xcd
</TASK>
Modules linked in: speakup_audptr(-) speakup
Dumping ftrace buffer:
in_synth->dev was not initialized during modprobe, so we add check
for in_synth->dev to fix this bug.
Fixes: 4f2a81f3a8 ("speakup: Reference synth from tty and tty from synth")
Cc: stable <stable@kernel.org >
Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com >
Link: https://lore.kernel.org/r/20221202060633.217364-1-cuigaosheng1@huawei.com
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-19 16:24:04 +01:00
Samuel Thibault
e68a558fb2
speakup: Fix building as extmod
...
spk_priv_keyinfo.h should be opened from the speakup directory. When
building as extmod we should thus open it from the module directory
rather than the main Linux source.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org >
Link: https://lore.kernel.org/r/20221118012206.j6hq6b6nfx2jhqg6@begin
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-11-23 19:55:03 +01:00
Mushahid Hussain
72b8ec15f9
accessibility: speakup: phonetic spelling while arrowing letter by letter
...
This patch includes an enhancement requested frequently on the mailing
list.[1][2] It adds a variable, cur_phonetic in the spk_vars, which can
be set as a module parameter, as well as in /sys/speakup/cur_phonetic.
This patch also documents cur_phonetic as a sysfs attribute in
sysfs-driver-speakup.
When cur_phonetic=1, it causes speakup to speak letters phonetically if
paused on the character while arrowing through a word.
When a user does not set cur_phonetic to any value, the default value
for it would be 0.
[1]: https://github.com/linux-speakup/speakup/issues/6
[2]: https://github.com/linux-speakup/speakup/issues/5
since V1:
- removed unnecessary lines
Signed-off-by: Mushahid Hussain<mushi.shar@gmail.com >
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org >
Link: https://lore.kernel.org/r/20221115100530.91174-3-mushi.shar@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-11-23 19:47:15 +01:00
Mushahid Hussain
f43241aafe
accessibility: speakup: Specify spk_vars among module parameters
...
This is an enhancement which allows setting default variables for
speakup module at the boot rather than setting the sys variables after
the boot.
Signed-off-by: Mushahid Hussain <mushi.shar@gmail.com >
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org >
Link: https://lore.kernel.org/r/20221115100530.91174-2-mushi.shar@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-11-23 19:47:15 +01:00
Osama Muhammad
a606dd6253
Accessiblity: speakup_acntsa: specifying the default driver parameters among the module params
...
This is an enhancement which allows to specify the default driver
parameters among the module parameters.
Adding default variables to the speakup_acntsa module
allows to easily set that at boot, rather than
setting the sys variables after boot.
More details can be found here:
https://github.com/linux-speakup/speakup/issues/7
Signed-off-by: Osama Muhammad <osmtendev@gmail.com >
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org >
Link: https://lore.kernel.org/r/20221109215108.7933-16-osmtendev@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-11-23 19:46:27 +01:00
Osama Muhammad
cf0b4652d6
Accessiblity: speakup_acntpc: specifying the default driver parameters among the module params
...
This is an enhancement which allows to specify the default driver
parameters among the module parameters.
Adding default variables to the speakup_acntpc module
allows to easily set that at boot, rather than
setting the sys variables after boot.
More details can be found here:
https://github.com/linux-speakup/speakup/issues/7
Signed-off-by: Osama Muhammad <osmtendev@gmail.com >
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org >
Link: https://lore.kernel.org/r/20221109215108.7933-15-osmtendev@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-11-23 19:46:27 +01:00
Osama Muhammad
dfa6c10c89
Accessiblity: speakup_txprt: specifying the default driver parameters among the module params
...
This is an enhancement which allows to specify the default driver
parameters among the module parameters.
Adding a default variables to the speakup_txprt module
allows to easily set that at boot, rather than
setting the sys variables after boot.
More details can be found here:
https://github.com/linux-speakup/speakup/issues/7
Signed-off-by: Osama Muhammad <osmtendev@gmail.com >
Link: https://lore.kernel.org/r/20221109215108.7933-14-osmtendev@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-11-23 19:46:27 +01:00
Osama Muhammad
9744f41fe0
Accessiblity: speakup_spkout: specifying the default driver parameters among the module params
...
This is an enhancement which allows to specify the default driver
parameters among the module parameters.
Adding default variables to the speakup_spkout module
allows to easily set that at boot, rather than
setting the sys variables after boot.
More details can be found here:
https://github.com/linux-speakup/speakup/issues/7
Signed-off-by: Osama Muhammad <osmtendev@gmail.com >
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org >
Link: https://lore.kernel.org/r/20221109215108.7933-13-osmtendev@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-11-23 19:46:27 +01:00
Osama Muhammad
88dce45b32
Accessiblity: speakup_ltlk: specifying the default driver parameters among the module params
...
This is an enhancement which allows to specify the default driver
parameters among the module parameters.
Adding default variables to the speakup_ltlk module
allows to easily set that at boot, rather than
setting the sys variables after boot.
More details can be found here:
https://github.com/linux-speakup/speakup/issues/7
Signed-off-by: Osama Muhammad <osmtendev@gmail.com >
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org >
Link: https://lore.kernel.org/r/20221109215108.7933-12-osmtendev@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-11-23 19:46:27 +01:00
Osama Muhammad
031c122f89
Accessiblity: speakup_keypc: specifying the default driver parameters among the module params
...
This is an enhancement which allows to specify the default driver
parameters among the module parameters.
Adding default variables to the speakup_keypc module
allows to easily set that at boot, rather than
setting the sys variables after boot.
More details can be found here:
https://github.com/linux-speakup/speakup/issues/7
Signed-off-by: Osama Muhammad <osmtendev@gmail.com >
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org >
Link: https://lore.kernel.org/r/20221109215108.7933-11-osmtendev@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-11-23 19:46:26 +01:00
Osama Muhammad
81188dd195
Accessiblity: speakup_dummy: specifying the default driver parameters among the module params
...
This is an enhancement which allows to specify the default driver
parameters among the module parameters.
Adding default variables to the speakup_dummy module
allows to easily set that at boot, rather than
setting the sys variables after boot.
More details can be found here:
https://github.com/linux-speakup/speakup/issues/7
Signed-off-by: Osama Muhammad <osmtendev@gmail.com >
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org >
Link: https://lore.kernel.org/r/20221109215108.7933-10-osmtendev@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-11-23 19:46:26 +01:00
Osama Muhammad
251ca7da30
Accessiblity: speakup_dtlk: specifying the default driver parameters among the module params
...
This is an enhancement which allows to specify the default driver
parameters among the module parameters.
Adding default variables to the speakup_dtlk module
allows to easily set that at boot, rather than
setting the sys variables after boot.
More details can be found here:
https://github.com/linux-speakup/speakup/issues/7
Signed-off-by: Osama Muhammad <osmtendev@gmail.com >
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org >
Link: https://lore.kernel.org/r/20221109215108.7933-9-osmtendev@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-11-23 19:46:26 +01:00
Osama Muhammad
44d3e977dd
Accessiblity: speakup_dectlk: specifying the default driver parameters among the module params
...
This is an enhancement which allows to specify the default driver
parameters among the module parameters.
Adding a default variables to the speakup_dectlk module
allows to easily set that at boot, rather than
setting the sys variables after boot.
More details can be found here:
https://github.com/linux-speakup/speakup/issues/7
Signed-off-by: Osama Muhammad <osmtendev@gmail.com >
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org >
Link: https://lore.kernel.org/r/20221109215108.7933-8-osmtendev@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-11-23 19:46:26 +01:00
Osama Muhammad
b75cfeb116
Accessiblity: speakup_decpc: specifying the default driver parameters among the module params
...
This is an enhancement which allows to specify the default driver
parameters among the module parameters.
Adding default variables to the speakup_decpc module
allows to easily set that at boot, rather than
setting the sys variables after boot.
More details can be found here:
https://github.com/linux-speakup/speakup/issues/7
Signed-off-by: Osama Muhammad <osmtendev@gmail.com >
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org >
Link: https://lore.kernel.org/r/20221109215108.7933-7-osmtendev@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-11-23 19:46:26 +01:00
Osama Muhammad
f613f00eb0
Accessiblity: speakup_decext: specifying the default driver parameters among the module params
...
This is an enhancement which allows to specify the default driver
parameters among the module parameters.
Adding a default variables to the speakup_decext module
allows to easily set that at boot, rather than
setting the sys variables after boot.
More details can be found here:
https://github.com/linux-speakup/speakup/issues/7
Signed-off-by: Osama Muhammad <osmtendev@gmail.com >
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org >
Link: https://lore.kernel.org/r/20221109215108.7933-6-osmtendev@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-11-23 19:46:26 +01:00
Osama Muhammad
95892c4e70
Accessiblity: speakup_bns: specifying the default driver parameters among the module params
...
This is an enhancement which allows to specify the default driver
parameters among the module parameters.
Adding default variables to the speakup_bns module
allows to easily set that at boot, rather than
setting the sys variables after boot.
More details can be found here:
https://github.com/linux-speakup/speakup/issues/7
Signed-off-by: Osama Muhammad <osmtendev@gmail.com >
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org >
Link: https://lore.kernel.org/r/20221109215108.7933-5-osmtendev@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-11-23 19:46:26 +01:00
Osama Muhammad
d5dab7ff97
Accessiblity: speakup_audptr: specifying the default driver parameters among the module params
...
This is an enhancement which allows to specify the default driver
parameters among the module parameters.
Adding a default variables to the speakup_audptr module
allows to easily set that at boot, rather than
setting the sys variables after boot.
More details can be found here:
https://github.com/linux-speakup/speakup/issues/7
Signed-off-by: Osama Muhammad <osmtendev@gmail.com >
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org >
Link: https://lore.kernel.org/r/20221109215108.7933-4-osmtendev@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-11-23 19:46:26 +01:00
Osama Muhammad
5e3e27f040
Accessiblity: speakup_apollo: specifying the default driver parameters among the module params
...
This is an enhancement which allows to specify the default driver
parameters among the module parameters.
Adding default variables to the speakup_apollo module
allows to easily set that at boot, rather than
setting the sys variables after boot.
More details can be found here:
https://github.com/linux-speakup/speakup/issues/7
Signed-off-by: Osama Muhammad <osmtendev@gmail.com >
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org >
Link: https://lore.kernel.org/r/20221109215108.7933-3-osmtendev@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-11-23 19:46:26 +01:00
Osama Muhammad
b9bf27386d
Accessiblity: speakup_soft: specifying the default driver parameters among the module params
...
This is an enhancement which allows to specify the default driver
parameters among the module parameters.
Adding default variables to the speakup_soft module
allows to easily set that at boot, rather than
setting the sys variables after boot.
More details can be found here:
https://github.com/linux-speakup/speakup/issues/7
Signed-off-by: Osama Muhammad <osmtendev@gmail.com >
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org >
Link: https://lore.kernel.org/r/20221109215108.7933-2-osmtendev@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-11-23 19:46:26 +01:00
Đoàn Trần Công Danh
92ca969ff8
speakup: replace utils' u_char with unsigned char
...
drivers/accessibility/speakup/utils.h will be used to compile host tool
to generate metadata.
"u_char" is a non-standard type, which is defined to "unsigned char"
on glibc but not defined by some libc, e.g. musl.
Let's replace "u_char" with "unsigned char"
Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com >
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org >
Cc: stable <stable@kernel.org >
Link: https://lore.kernel.org/r/b75743026aaee2d81efe3d7f2e8fa47f7d0b8ea7.1665736571.git.congdanhqx@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-11-09 15:25:24 +01:00
Mushahid Hussain
0fc801f801
speakup: fix a segfault caused by switching consoles
...
This patch fixes a segfault by adding a null check on synth in
speakup_con_update(). The segfault can be reproduced as follows:
- Login into a text console
- Load speakup and speakup_soft modules
- Remove speakup_soft
- Switch to a graphics console
This is caused by lack of a null check on `synth` in
speakup_con_update().
Here's the sequence that causes the segfault:
- When we remove the speakup_soft, synth_release() sets the synth
to null.
- After that, when we change the virtual console to graphics
console, vt_notifier_call() is fired, which then calls
speakup_con_update().
- Inside speakup_con_update() there's no null check on synth,
so it calls synth_printf().
- Inside synth_printf(), synth_buffer_add() and synth_start(),
both access synth, when it is null and causing a segfault.
Therefore adding a null check on synth solves the issue.
Fixes: 2610df4148 ("staging: speakup: Add pause command used on switching to graphical mode")
Cc: stable <stable@kernel.org >
Signed-off-by: Mushahid Hussain <mushi.shar@gmail.com >
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org >
Link: https://lore.kernel.org/r/20221010165720.397042-1-mushi.shar@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-11-09 15:21:55 +01:00
Samuel Thibault
116769d385
speakup_soft: Add direct module parameter
...
For non-english speech synthesis, it is often desirable to make
speakup_soft pass text directly. Adding a direct parameter to the
speakup_soft module allows to easily set that at boot, rather than
setting the sys variable after boot.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org >
Link: https://lore.kernel.org/r/20220829203625.6s6x57miowu4p664@begin
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-09-01 16:59:59 +02:00