Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 173CCC54FB3 for ; Mon, 26 May 2025 16:19:35 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.997608.1378427 (Exim 4.92) (envelope-from ) id 1uJaXg-0001nM-2t; Mon, 26 May 2025 16:19:12 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 997608.1378427; Mon, 26 May 2025 16:19:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uJaXf-0001nF-Ur; Mon, 26 May 2025 16:19:11 +0000 Received: by outflank-mailman (input) for mailman id 997608; Mon, 26 May 2025 16:19:10 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uJaXe-0001n9-Sj for xen-devel@lists.xenproject.org; Mon, 26 May 2025 16:19:10 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.96) (envelope-from ) id 1uJaXd-003R7Z-0N; Mon, 26 May 2025 16:19:09 +0000 Received: from [2a01:e0a:1da:8420:b77:bd5:6e45:7633] (helo=l14) by xenbits.xenproject.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uJaXd-00EFKx-0X; Mon, 26 May 2025 16:19:08 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xenproject.org; s=20200302mail; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=TOX79ZSmgRULME2Nk+t8dw5ev91nIx7AxNQiiFtsGbI=; b=yq8Ra8XR+FLBIw4lnHakNx4rqr ccdqJqBawJiZ5pL2iuGinOI6+RGKft2Jk/X2JmoExCCsv39a1hNmeXxNT3B43Sn61usPWjtF6cfHW GyzzvqofNsZG2Ofw5bOzpw3ApY/w95APDqYmjC7YYyy1eSm3BlRJ8hcTOf0d7KQUoDb8=; Date: Mon, 26 May 2025 18:19:06 +0200 From: Anthony PERARD To: Liam Merwick Cc: dwmw@amazon.co.uk, roger.pau@citrix.com, xen-devel@lists.xenproject.org, qemu-devel@nongnu.org Subject: Re: [PATCH] hw/xen: Fix trace_xs_node_read() params Message-ID: References: <20250523160134.218997-1-liam.merwick@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20250523160134.218997-1-liam.merwick@oracle.com> On Fri, May 23, 2025 at 04:01:34PM +0000, Liam Merwick wrote: > When the '--enable-trace-backends=syslog' build option is configured, > the following compilation error is encountered. > > In file included from /usr/include/sys/syslog.h:207, > from /usr/include/syslog.h:1, > from ./trace/trace-hw_xen.h:224, > from ../hw/xen/trace.h:1, > from ../hw/xen/xen-bus-helper.c:13: > In function ‘syslog’, > inlined from ‘_nocheck__trace_xs_node_read’ at ../hw/xen/trace-events:41:9, > inlined from ‘trace_xs_node_read’ at trace/trace-hw_xen.h:903:9, > inlined from ‘xs_node_read’ at ../hw/xen/xen-bus-helper.c:154:5: > /usr/include/bits/syslog.h:45:3: error: ‘%s’ directive argument is null [-Werror=format-overflow=] > 45 | __syslog_chk (__pri, __USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ()); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Add a check that 'value' is not null before passing it to trace_xs_node_read(). > > Fixes: e6cdeee95990 ("hw/xen: Add xs_node_read() helper function") > Signed-off-by: Liam Merwick Acked-by: Anthony PERARD Thanks, -- Anthony PERARD