diff options
| author | seteiro <[email protected]> | 2026-11-12 00:40:13 +0800 |
|---|---|---|
| committer | Rbb666 <[email protected]> | 2026-11-13 09:47:35 +0800 |
| commit | 6c955645ec82372469f20746ead53e2ce3b5eda5 (patch) | |
| tree | 65f40ab740bd3d30ee9c92726a35ac6a2a82d315 /components/external | |
| parent | 5114bfecc77b3f433edb8db776b7e5e7ce776f35 (diff) | |
[drivers][serial] marshal RT_DEVICE_CTRL_CONFIG from userspace
Close the remaining userspace ioctl boundary gaps on top of the serial v1/v2
LWP marshaling:
- In serial_fops_ioctl() for both dev_serial.c and dev_serial_v2.c, return 0
directly after updating fd->flags on F_SETFL instead of forwarding to
ops->control(), and reject any unmarshaled/unknown command from an LWP
caller with -RT_ENOSYS instead of passing raw user pointers into
rt_device_control() / serial->ops->control().
- Guard the LWP marshaling block with defined(RT_USING_LWP) &&
defined(ARCH_MM_MMU), matching lwp_user_mm.h.
- In rt_serial_control(), reject baudrate == 0 (e.g. B0 or unmapped speed)
with -RT_EINVAL in TCSETA*/TCSETS* just like RT_DEVICE_CTRL_CONFIG, and
add missing RT_NULL and ops->configure checks in v1/v2 control handlers.
Fixes #11429
Diffstat (limited to 'components/external')
0 files changed, 0 insertions, 0 deletions
