From: Alyssa Rosenzweig <alyssa@rosenzweig.io>
To: sven@svenpeter.dev
Cc: Janne Grunau <j@jannau.net>,
asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/4] soc: apple: rtkit: Cut syslog messages after the first '\0'
Date: Mon, 24 Feb 2025 13:10:41 -0500 [thread overview]
Message-ID: <Z7y2IdBJbIWOpz8r@blossom> (raw)
In-Reply-To: <20250222-apple-soc-misc-v1-4-1a3af494a48a@svenpeter.dev>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Le Sat , Feb 22, 2025 at 04:56:49PM +0000, Sven Peter via B4 Relay a écrit :
> From: Janne Grunau <j@jannau.net>
>
> Certain messages from DCP contain NUL bytes in the random data after the
> NUL terminated syslog message. Since the syslog message ends with '\n'
> this results in a dev_info() message terminated with two newlines and an
> empty printed line in the kernel log.
>
> Signed-off-by: Janne Grunau <j@jannau.net>
> Signed-off-by: Sven Peter <sven@svenpeter.dev>
> ---
> drivers/soc/apple/rtkit.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/soc/apple/rtkit.c b/drivers/soc/apple/rtkit.c
> index b7f4654c3341..595efce265ce 100644
> --- a/drivers/soc/apple/rtkit.c
> +++ b/drivers/soc/apple/rtkit.c
> @@ -476,7 +476,7 @@ static void apple_rtkit_syslog_rx_log(struct apple_rtkit *rtk, u64 msg)
>
> log_context[sizeof(log_context) - 1] = 0;
>
> - msglen = rtk->syslog_msg_size - 1;
> + msglen = strnlen(rtk->syslog_msg_buffer, rtk->syslog_msg_size - 1);
> while (msglen > 0 &&
> should_crop_syslog_char(rtk->syslog_msg_buffer[msglen - 1]))
> msglen--;
>
> --
> 2.34.1
>
>
prev parent reply other threads:[~2025-02-24 18:10 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-22 16:56 [PATCH 0/4] Miscellaneous Apple RTKit fixes Sven Peter via B4 Relay
2025-02-22 16:56 ` Sven Peter
2025-02-22 16:56 ` [PATCH 1/4] soc: apple: rtkit: Add APPLE_RTKIT_PWR_STATE_INIT Sven Peter via B4 Relay
2025-02-22 16:56 ` Sven Peter
2025-02-24 18:03 ` Alyssa Rosenzweig
2025-02-26 15:47 ` Sven Peter
2025-02-22 16:56 ` [PATCH 2/4] soc: apple: rtkit: Implement OSLog buffers properly Sven Peter via B4 Relay
2025-02-22 16:56 ` Sven Peter
2025-02-24 18:09 ` Alyssa Rosenzweig
2025-02-26 16:51 ` Sven Peter
2025-02-26 17:05 ` Alyssa Rosenzweig
2025-02-26 17:29 ` Sven Peter
2025-02-22 16:56 ` [PATCH 3/4] soc: apple: rtkit: Use high prio work queue Sven Peter via B4 Relay
2025-02-22 16:56 ` Sven Peter
2025-02-24 18:10 ` Alyssa Rosenzweig
2025-02-22 16:56 ` [PATCH 4/4] soc: apple: rtkit: Cut syslog messages after the first '\0' Sven Peter via B4 Relay
2025-02-22 16:56 ` Sven Peter
2025-02-24 18:10 ` Alyssa Rosenzweig [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z7y2IdBJbIWOpz8r@blossom \
--to=alyssa@rosenzweig.io \
--cc=asahi@lists.linux.dev \
--cc=j@jannau.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sven@svenpeter.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.