From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 84D983B8BC7; Tue, 2 Jun 2026 09:31:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780392709; cv=none; b=GrEEy4T944gTr7NiL5AbBm38wNERx68UO9lrlusSjf7J628htJCzUuaBb4CXLewsNcbB/XlldcwYJ3p2N1HFdCmmh1+5tU+0sKxYFT7E3/4o9NE8D6/T2o/VoTlnwO0yxrqGPh9Nec29cP2WHY7BQ7NIzyP3zF4GISzi6gIXnEQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780392709; c=relaxed/simple; bh=oVFK0nG008aHrlI8LnIts54WnpxPIH7UStYVo6BNbp0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=eFKp0G73eqy+7WqKD5aqncLKVJHFye0383go5hXx4r7+zvfL/3XlsfLAaTJl5w+Ez5xNpaIJMaEZ1XRXJJB7X6We/iSmQ8XCeQPRq+zfQLHgIX79b0gmD5ui6oQNUzuCYLCKsagWtqZq+V+Pt07dwvx89MqPymf2p5nb6bJOVe0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=G+IpyZ8O; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="G+IpyZ8O" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 323701F00893; Tue, 2 Jun 2026 09:31:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1780392703; bh=l9Fnu7ql/xw3WcbLnwmXcQ6Np+ykb7eXiOcMgZ1/zrA=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=G+IpyZ8ORqglynUsO5PqcmN9TOoMfpn/CrlCCnUVH6YlWLr0MUKCjg8JLpHl2ljOA P1R6cZugmO5ewnx1OWoJ7YSpv8jik4V9TQt/awnIbmC8xYDzNnztKJJ2aobL+VbTtF 5rmc6dw/7bksesUxZVCTCDGWrTr8AI1+AIh8+9dEvy4r9aW3mlUxjPDuRqsitDf7CF CU8CDMNsmCx4lgYkC6HDkWhXZs8sdcB6qbTcE/PP5+v8gQI5O0APeSHUvt5CkKCrrd d6U0aDVmb5bBTaSHV3MYMSd2oxAGkxdVqwMVO8j5MT7AAUrRHRPHCpL9AuriNQaMZO YLyDVj4i3gOqQ== From: Thomas Gleixner To: Rodolfo Giometti , LKML Cc: David Woodhouse , Miroslav Lichvar , John Stultz , Stephen Boyd , Anna-Maria Behnsen , Frederic Weisbecker , thomas.weissschuh@linutronix.de, Arthur Kiyanovski , Vincent Donnefort , Marc Zyngier , Oliver Upton , kvmarm@lists.linux.dev, Oliver Upton , Richard Cochran , netdev@vger.kernel.org, Takashi Iwai , Miri Korenblit , Johannes Berg , Jacob Keller , Tony Nguyen , Saeed Mahameed , Peter Hilber , "Michael S. Tsirkin" , virtualization@lists.linux.dev, linux-wireless@vger.kernel.org, linux-sound@vger.kernel.org, David Woodhouse , Vadim Fedorenko Subject: Re: [patch V2 04/25] pps: Convert to ktime_get_snapshot_id() In-Reply-To: <912a22e8-878f-4763-958b-71052ee69b36@enneenne.com> References: <20260529193435.921555544@kernel.org> <20260529195557.123410250@kernel.org> <912a22e8-878f-4763-958b-71052ee69b36@enneenne.com> Date: Tue, 02 Jun 2026 11:31:40 +0200 Message-ID: <877boh8f0j.ffs@fw13> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Sat, May 30 2026 at 13:08, Rodolfo Giometti wrote: > On 29/05/2026 22:00, Thomas Gleixner wrote: >> static inline void pps_get_ts(struct pps_event_time *ts) >> { >> +#ifdef CONFIG_NTP_PPS >> struct system_time_snapshot snap; >> >> - ktime_get_snapshot(&snap); >> - ts->ts_real = ktime_to_timespec64(snap.real); >> -#ifdef CONFIG_NTP_PPS >> - ts->ts_raw = ktime_to_timespec64(snap.raw); >> + ktime_get_snapshot_id(CLOCK_REALTIME, &snap); >> + ts->ts_real = ktime_to_timespec64(snap.systime); >> + ts->ts_raw = ktime_to_timespec64(snap.monoraw); >> +#else >> + ktime_get_real_ts64(&ts->ts_real); > > /* > * Prevent kernel stack information disclosure if the > * structure is later copied to userspace. > */ > ts->ts_raw = (struct timespec64){0, 0}; Which will fail to build because of: struct pps_event_time { #ifdef CONFIG_NTP_PPS struct timespec64 ts_raw; #endif /* CONFIG_NTP_PPS */ struct timespec64 ts_real; }; No?