Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1630531pxb; Mon, 8 Mar 2021 02:23:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJwRhxddr/fUWYf9k82/i4j/oGu+fD5nWRgaTep/8iwgSPLyug55xEkHg7ZJIV7+aUv0prJL X-Received: by 2002:a17:906:15cc:: with SMTP id l12mr14565110ejd.280.1615198999652; Mon, 08 Mar 2021 02:23:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615198999; cv=none; d=google.com; s=arc-20160816; b=cr4x83to/mqb5Ohcm4vaZMFQpPD+7H0dPbX9n6BQr8IFu5P9L4LvYoqV7f0yr4JI7o HBXY3FQ2MnxUS3mn13+y70ZDd/IA4ECsG1RnFy830k7p22IrzCp7FzCdVWHiRkn4IPcM vZw72q1XY5I9wJcacsaEyfSoAbC4+tlXkRxomGotwXx2GzGnAI2wcHzu2gcU1FzGPIWG qXwlwaMt7LjuPoDYqAzq3PIvGgGctOxR5lvZsge1nP6wO1e1EzfSUvNUS3qJXbsYmHNO WNqbhIEe+wOwRBRUc2V48vj1LoRM81bZq4eJ5GpN+B+HH+87Pgm9zE28bOG0t8Areo38 /YLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=di+c41by1BjBqSsJuRH0JZJ9mzGYqCsdgLgUzWfKUe0=; b=oqEqB7wkmnGeadfI8YxAPQzJI2qMY5MpdqbQtYp/T5PdQbqVzEkWMfRZY8g3EJN+x3 SlIhkYdTcb4jeKuLHP+T+27hKXXlsWPhIyDzHhmXuWk9x2pjCB+lSh7id+rjyPH77ORn ptfkR4fOkL9eWhyMPQew63IqZmzzUpp7//ZtCwzkRI/z5uLzlj6gIODx7shm2gGECepP TlBB70sm3831OeRpjwDdx3zsVfKY+GDpaz6sU8eRBtf0ZBLw+o/zG82Az0EpMpkT3bpw 1BM9tlBMImQMOaAiYTz9KcbpQL0RQ0G2FIMqcIsiEzkGk1smhOGjBm1GD4xQEOshPT95 5AjA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c11si6790870edy.117.2021.03.08.02.22.57; Mon, 08 Mar 2021 02:23:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231531AbhCHKB1 convert rfc822-to-8bit (ORCPT + 99 others); Mon, 8 Mar 2021 05:01:27 -0500 Received: from eu-smtp-delivery-151.mimecast.com ([185.58.85.151]:40339 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231522AbhCHKB0 (ORCPT ); Mon, 8 Mar 2021 05:01:26 -0500 Received: from AcuMS.aculab.com (156.67.243.126 [156.67.243.126]) (Using TLS) by relay.mimecast.com with ESMTP id uk-mta-126-UoBJENP0MXWJd9ek_G47xg-1; Mon, 08 Mar 2021 10:01:21 +0000 X-MC-Unique: UoBJENP0MXWJd9ek_G47xg-1 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) by AcuMS.aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Mon, 8 Mar 2021 10:01:20 +0000 Received: from AcuMS.Aculab.com ([fe80::43c:695e:880f:8750]) by AcuMS.aculab.com ([fe80::43c:695e:880f:8750%12]) with mapi id 15.00.1347.000; Mon, 8 Mar 2021 10:01:20 +0000 From: David Laight To: 'Peter Zijlstra' , Linus Torvalds CC: Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , "Namhyung Kim" , Linux Kernel Mailing List Subject: RE: "struct perf_sample_data" alignment Thread-Topic: "struct perf_sample_data" alignment Thread-Index: AQHXEZrQ+54heyJXCUKE4zwwZZ2YcKp5304Q Date: Mon, 8 Mar 2021 10:01:20 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=C51A453 smtp.mailfrom=david.laight@aculab.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ... > What I remember is that since perf_sample_data is fairly large, > unconditionally initializing the whole thing is *slow* (and > -fauto-var-init=zero will hurt here). That will hurt everywhere. I can also imagine it hiding bugs and making people shrink on-stack arrays to the point where they either overrun or cause an unexpected error or string truncation. Initialising to zero is a bad choice if the aim is to avoid leaking stack. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)