lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <sh3doz6uhkvbp4iy76eyhnh7ycigka3gmrod423rmgarhkhlxj@oet5rikyjhee>
Date: Fri, 5 Sep 2025 20:30:11 +0530
From: Manivannan Sadhasivam <mani@...nel.org>
To: Vivek.Pernamitta@...cinc.com
Cc: mhi@...ts.linux.dev, linux-arm-msm@...r.kernel.org, 
	linux-kernel@...r.kernel.org, Vivek Pernamitta <quic_vpernami@...cinc.com>
Subject: Re: [PATCH v3 5/6] bus: mhi: core: Improve mhi_sync_power_up
 handling for SYS_ERR state

On Thu, Aug 21, 2025 at 06:25:37PM GMT, Vivek.Pernamitta@...cinc.com wrote:
> From: Vivek Pernamitta <quic_vpernami@...cinc.com>
> 
> In power-up, reboot, or recovery scenarios, mhi_sync_power_up() is invoked
> by the controller driver to wait for the device to enter Mission Mode.
> 
> However, in some cases, the device may be in SYS_ERR state due to a
> previous device reset. SYS_ERR is a valid state, but currently, the host
> exits at wait_event_timeout() prematurely when MHI_PM_IN_ERROR_STATE is
> detected, causing mhi_sync_power_up() to fail.
> 
> If MHI is torn down before SYS_ERR is serviced, recovery is not possible.
> Instead of aborting, the SYS_ERR handler should process the error and queue
> the next state transition to bring the device into Mission Mode.
> 
> This change ensures mhi_sync_power_up() waits for Mission Mode even
> after SYS_ERR, enabling proper recovery and improving robustness.
> 

Reword the description in imperative mood. Also, if this is an independent fix,
this patch should be moved to the start of the series.

> Signed-off-by: Vivek Pernamitta <quic_vpernami@...cinc.com>
> ---
>  drivers/bus/mhi/host/internal.h | 2 ++
>  drivers/bus/mhi/host/pm.c       | 2 +-
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/bus/mhi/host/internal.h b/drivers/bus/mhi/host/internal.h
> index 034be33565b78eff9bdefd93faa4f3ce93825bad..9e37e5c9a6c7e07d54300adce51c9db9052e477a 100644
> --- a/drivers/bus/mhi/host/internal.h
> +++ b/drivers/bus/mhi/host/internal.h
> @@ -170,6 +170,8 @@ enum mhi_pm_state {
>  							MHI_PM_IN_ERROR_STATE(pm_state))
>  #define MHI_PM_IN_SUSPEND_STATE(pm_state)		(pm_state & \
>  							(MHI_PM_M3_ENTER | MHI_PM_M3))
> +#define MHI_PM_IN_UNRECOVERABLE_ERROR(pm_state)		((pm_state == MHI_PM_FW_DL_ERR) || \

MHI_PM_IN_UNRECOVERABLE_STATE?

- Mani

-- 
மணிவண்ணன் சதாசிவம்

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ