Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uart: missing syscalls verification #23479

Merged
merged 2 commits into from
Mar 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions drivers/serial/uart_handlers.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,26 @@ static inline void z_vrfy_uart_poll_out(struct device *dev,
}
#include <syscalls/uart_poll_out_mrsh.c>

static inline int z_vrfy_uart_config_get(struct device *dev,
struct uart_config *cfg)
{
Z_OOPS(Z_SYSCALL_DRIVER_UART(dev, config_get));
Z_OOPS(Z_SYSCALL_MEMORY_WRITE(cfg, sizeof(struct uart_config)));

return z_impl_uart_config_get(dev, cfg);
}
#include <syscalls/uart_config_get_mrsh.c>

static inline int z_vrfy_uart_configure(struct device *dev,
const struct uart_config *cfg)
{
Z_OOPS(Z_SYSCALL_DRIVER_UART(dev, config_get));
Z_OOPS(Z_SYSCALL_MEMORY_READ(cfg, sizeof(struct uart_config)));

return z_impl_uart_configure(dev, cfg);
}
#include <syscalls/uart_configure_mrsh.c>

#ifdef CONFIG_UART_ASYNC_API
/* callback_set() excluded as we don't allow ISR callback installation from
* user mode
Expand Down