Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

pinctrl: qcom: make the pinmuxing strict

The strict flag in struct pinmux_ops disallows the usage of the same pin
as a GPIO and for another function. Without it, a rouge user-space
process with enough privileges (or even a buggy driver) can request a
used pin as GPIO and drive it, potentially confusing devices or even
crashing the system. Set it globally for all pinctrl-msm users.

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Bartosz Golaszewski and committed by
Linus Walleij
cc85cb96 480dc195

+1
+1
drivers/pinctrl/qcom/pinctrl-msm.c
··· 268 268 .function_is_gpio = pinmux_generic_function_is_gpio, 269 269 .gpio_request_enable = msm_pinmux_request_gpio, 270 270 .set_mux = msm_pinmux_set_mux, 271 + .strict = true, 271 272 }; 272 273 273 274 static int msm_config_reg(struct msm_pinctrl *pctrl,