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] [day] [month] [year] [list]
Message-ID: <04da9bc6-ebfb-4799-bace-c56a9537282e@kernel.org>
Date: Sun, 4 Jan 2026 16:17:40 +0100
From: Sven Peter <sven@...nel.org>
To: Nick Chan <towinchenmi@...il.com>
Cc: asahi@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org,
 linux-kernel@...r.kernel.org, Lee Jones <lee@...nel.org>,
 Janne Grunau <j@...nau.net>, Neal Gompa <neal@...pa.dev>
Subject: Re: [PATCH 1/3] soc: apple: rtkit: Support verison-specific app
 endpoint start

Hi,


On 23.12.25 15:13, Nick Chan wrote:
> Support for protocol versions where app endpoints starts at a
> different endpoint number will be added. Consumer drivers will also
> need to be modified to have them to work with such protocol
> versions.
> 
> Signed-off-by: Nick Chan <towinchenmi@...il.com>
> ---
>   drivers/soc/apple/rtkit-internal.h |  3 ++-
>   drivers/soc/apple/rtkit.c          | 42 +++++++++++++++++++++++++++-----------
>   include/linux/soc/apple/rtkit.h    | 10 +++++++++
>   3 files changed, 42 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/soc/apple/rtkit-internal.h b/drivers/soc/apple/rtkit-internal.h
> index b8d5244678f0100b72173fa9aca80bf9db1b4e5e..52ef7a202120eb8a56c149179389741ec0f5e358 100644
> --- a/drivers/soc/apple/rtkit-internal.h
> +++ b/drivers/soc/apple/rtkit-internal.h

[...]

>   
> +	/*
> +	 * The management endpoint is required to receive the HELLO message
> +	 * and infer the start of app endpoints so assume it is a system
> +	 * endpoint here and update this value when HELLO is received.
> +	 */
> +	rtk->app_ep_start = APPLE_RTKIT_EP_CRASHLOG;

The comment doesn't explain why you set this to APPLE_RTKIT_EP_CRASHLOG.


> +
>   	init_completion(&rtk->epmap_completion);
>   	init_completion(&rtk->iop_pwr_ack_completion);
>   	init_completion(&rtk->ap_pwr_ack_completion);
> @@ -851,6 +860,15 @@ int apple_rtkit_shutdown(struct apple_rtkit *rtk)
>   }
>   EXPORT_SYMBOL_GPL(apple_rtkit_shutdown);
>   
> +u8 apple_rtkit_app_ep_to_ep(struct apple_rtkit *rtk, u8 app_ep)
> +{
> +	if (!apple_rtkit_is_running(rtk))
> +		return 0;

Please don't just silently ignore errors.

> +
> +	return rtk->app_ep_start + app_ep;
> +}
> +EXPORT_SYMBOL_GPL(apple_rtkit_app_ep_to_ep);
> +
>   int apple_rtkit_idle(struct apple_rtkit *rtk)
>   {
>   	int ret;
> diff --git a/include/linux/soc/apple/rtkit.h b/include/linux/soc/apple/rtkit.h
> index 736f530180179bd144cf85eb0f0bd93844d7188a..423cf1022372b124c9b2728445f85a9b3067c707 100644
> --- a/include/linux/soc/apple/rtkit.h
> +++ b/include/linux/soc/apple/rtkit.h
> @@ -172,4 +172,14 @@ int apple_rtkit_send_message(struct apple_rtkit *rtk, u8 ep, u64 message,
>    */
>   int apple_rtkit_poll(struct apple_rtkit *rtk);
>   
> +/*
> + * Convert an endpoint number relative to start of app endpoint to an absolute
> + * endpoint number.


Is this conversion even true for other co-processors that are not SMC or 
does it just work by accident here? Maybe it makes more sense to drop 
this function and decide which endpoint to use in the SMC driver.

The documentation is also a bit confusing, please at least explain what 
"start of app endpoint" means and where/how you would use this function.





Sven


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ