From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 79CAA3858D1E for ; Wed, 17 May 2023 17:23:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 79CAA3858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pzKs8-0007kf-3u; Wed, 17 May 2023 13:23:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=In-Reply-To:MIME-Version:References:Subject:To:From: Date; bh=O8PKtQtZ+Gb0WbN2zEEkJuHKtxBHRRVjHXNlJMLi7hs=; b=nI2T7+QgCtXQ1ZGGRPa1 1B55xh+gqFIY1FWFRpE2qQk/IcfAsIt851+YSZjEtbaxpM5otFQo17W2sL84Xp73NPDEfbTzQ+K3D Bua09vaVUSnOga5XK/WpYz6MMODRriKDsxqgm62LOLuopQcZylYrw1hyw7hB1jpLAb3Bz1KaJ7B3P on+mfNs++AnRFfLwZaGm2VbH2lxSChI9FeTXRMwwOCCn0D6dnElZBm1/R68PAmhbQ4Ml21lNvHfpb b+yF8wy4njusKm7khpny1vuCShWfzLEjlh8fTnrIj4eJfVtOLRL1QGkCM8kSz++4/n+G12WPNtCi3 jRKyg5/4zs4pbg==; Received: from [89.207.171.57] (helo=begin) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pzKs6-0006L7-TJ; Wed, 17 May 2023 13:23:30 -0400 Received: from samy by begin with local (Exim 4.96) (envelope-from ) id 1pzKs0-00GukY-17; Wed, 17 May 2023 19:23:24 +0200 Date: Wed, 17 May 2023 19:23:24 +0200 From: Samuel Thibault To: Flavio Cruz Cc: bug-hurd@gnu.org, libc-alpha@sourceware.org Subject: Re: [PATCH glibc] Use TASK_THREAD_TIMES_INFO_COUNT when calling task_info with TASK_THREAD_TIMES_INFO Message-ID: <20230517172324.3rhc7hkvjk4f5k4f@begin> Mail-Followup-To: Flavio Cruz , bug-hurd@gnu.org, libc-alpha@sourceware.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: I am not organized User-Agent: NeoMutt/20170609 (1.8.3) X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_SBL_CSS,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Applied, thanks! Flavio Cruz, le mar. 16 mai 2023 22:59:24 -0400, a ecrit: > This hasn't caused any problems yet but we are passing a pointer to struct > task_thread_times_info which can cause problems if we populate over the > existing size of the struct. > --- > sysdeps/mach/clock_gettime.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sysdeps/mach/clock_gettime.c b/sysdeps/mach/clock_gettime.c > index cc8c821a7f..be775ed2bb 100644 > --- a/sysdeps/mach/clock_gettime.c > +++ b/sysdeps/mach/clock_gettime.c > @@ -62,7 +62,7 @@ __clock_gettime (clockid_t clock_id, struct timespec *ts) > time_value_add (&t, &bi.system_time); > > /* Live threads CPU time. */ > - count = TASK_EVENTS_INFO_COUNT; > + count = TASK_THREAD_TIMES_INFO_COUNT; > err = __task_info (__mach_task_self (), TASK_THREAD_TIMES_INFO, > (task_info_t) &tti, &count); > if (err) > -- > 2.39.2 > -- Samuel --- Pour une évaluation indépendante, transparente et rigoureuse ! Je soutiens la Commission d'Évaluation de l'Inria.