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: <20240822114948.GM2164@kernel.org>
Date: Thu, 22 Aug 2024 12:49:48 +0100
From: Simon Horman <horms@...nel.org>
To: David Woodhouse <dwmw2@...radead.org>
Cc: Richard Cochran <richardcochran@...il.com>,
	Peter Hilber <peter.hilber@...nsynergy.com>,
	linux-kernel@...r.kernel.org, virtualization@...ts.linux.dev,
	linux-arm-kernel@...ts.infradead.org, linux-rtc@...r.kernel.org,
	"Ridoux, Julien" <ridouxj@...zon.com>, virtio-dev@...ts.linux.dev,
	"Luu, Ryan" <rluu@...zon.com>,
	"Chashper, David" <chashper@...zon.com>,
	"Mohamed Abuelfotoh, Hazem" <abuehaze@...zon.com>,
	"Christopher S . Hall" <christopher.s.hall@...el.com>,
	Jason Wang <jasowang@...hat.com>, John Stultz <jstultz@...gle.com>,
	"Michael S . Tsirkin" <mst@...hat.com>, netdev@...r.kernel.org,
	Stephen Boyd <sboyd@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Xuan Zhuo <xuanzhuo@...ux.alibaba.com>,
	Marc Zyngier <maz@...nel.org>, Mark Rutland <mark.rutland@....com>,
	Daniel Lezcano <daniel.lezcano@...aro.org>,
	Alessandro Zummo <a.zummo@...ertech.it>,
	Alexandre Belloni <alexandre.belloni@...tlin.com>,
	qemu-devel <qemu-devel@...gnu.org>
Subject: Re: [PATCH v4] ptp: Add vDSO-style vmclock support

On Wed, Aug 21, 2024 at 10:50:47PM +0100, David Woodhouse wrote:

...

> diff --git a/drivers/ptp/ptp_vmclock.c b/drivers/ptp/ptp_vmclock.c

...

> +#define VMCLOCK_FIELD_PRESENT(_c, _f)			  \
> +	(_c)->size >= (offsetof(struct vmclock_abi, _f) + \
> +		       sizeof((_c)->_f))
> +

...

> +static int vmclock_probe(struct platform_device *pdev)

...

> +	/* If there is valid clock information, register a PTP clock */
> +	if (VMCLOCK_FIELD_PRESENT(st->clk, time_frac_sec)) {

Hi David,

Sorry to be always the one with the nit-pick.
Sparse complains about the line above, I believe because the
type of st->clk->size is __le32.

.../ptp_vmclock.c:562:13: warning: restricted __le32 degrades to integer

> +		/* Can return a silent NULL, or an error. */
> +		st->ptp_clock = vmclock_ptp_register(dev, st);
> +		if (IS_ERR(st->ptp_clock)) {
> +			ret = PTR_ERR(st->ptp_clock);
> +			st->ptp_clock = NULL;
> +			vmclock_remove(pdev);
> +			goto out;
> +		}
> +	}

...


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ