Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp3007942pxy; Mon, 3 May 2021 12:54:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzha5Y2kCAYS9zIBrZ6iUtucskyBz8IWg38520/204WCcZA+w0p5FWD/+PXM+rdMj6iFks2 X-Received: by 2002:a05:6a00:170c:b029:225:8851:5b3c with SMTP id h12-20020a056a00170cb029022588515b3cmr20697258pfc.0.1620071683643; Mon, 03 May 2021 12:54:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620071683; cv=none; d=google.com; s=arc-20160816; b=RCUon0cNQF2LXVixdmz9daLRiNXwj2tqj48NlyA4lnuzEKz+AJWRtfY2aAn81leF+S OT5cPEj7rmdG/scFQN/5vLhK5QcJCya8clq9CqZpbxeUSubvoyevVma8xpO5jkDLgB35 GCJHcReWLR2At3S017GfA6Nm4slYMh5pXoXY+P01dVF/FLW715tPkPUr/r4xNtGpagB9 Cv2w4msmagmYljYTY1J3v9Esuz8lJDYokqAzQGmv6bs4gItcH+3PuJ0bFOqA/j5bHDXU JEBwFWcm8w3Ch6V0wR69DQeydJ3hCwkFMBuUJqHaC8Evs+pfdDD2B43bfJZS5afYTIh+ BROQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=sL1cfgAwusROayggatCngmy+CDfZipZ8K0S97Q3yq6Q=; b=dICB6ofcfnCatVRySSwcVsazkyIslS6zX43f0j58m06ibHWi2mh9F24y8b+RQPaLrX YTgGA4ve46/oTKxZ9O3CLGTSSlvcX0IPgWFXMPwlF3xieInjzfbkvco8WhAqIZv2SJJW Yfw+S2PCzFxAxOr9QPvP2WMJu+62QfKMmfn4EeXWedlDAq688xLkkbjS9am59ZG5F/70 M1nr9KChq2cxWgGefP9C5X6BcsR8BI2LbvELOXYZ7YqKr7Rpm+xIipfr8nzhMdPqalgR aq+arOmIDieVuqyzeqEHYzXYXaWBtT7ovQpdYgCUMZjJ9nD+1khl1PlDkl+tZ0YtauD9 EdUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=CRqyGcRJ; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q15si15507442pfk.70.2021.05.03.12.54.30; Mon, 03 May 2021 12:54:43 -0700 (PDT) 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; dkim=pass header.i=@google.com header.s=20161025 header.b=CRqyGcRJ; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229603AbhECTyq (ORCPT + 99 others); Mon, 3 May 2021 15:54:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229577AbhECTyp (ORCPT ); Mon, 3 May 2021 15:54:45 -0400 Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD675C061761 for ; Mon, 3 May 2021 12:53:51 -0700 (PDT) Received: by mail-oi1-x22c.google.com with SMTP id k25so6555658oic.4 for ; Mon, 03 May 2021 12:53:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sL1cfgAwusROayggatCngmy+CDfZipZ8K0S97Q3yq6Q=; b=CRqyGcRJzr2t7Pmj7oHIyJjjFWQLWJae/kCMd4aaJk17BYeX/DnQGhh392/1rXNiCq 3+jnOVqKRj2FR+odqa11vu4G+JXB5kSnuoZBhV7IBiWr0MfVSCa9PeXqfPYsewvLvZ6G hSOTPzHmojo+8IKA9lYSVlvLKLijZk64DYfy+EjSjuL7laMXS2e2DCbw8j4ZOWq4V/Po scljdkDPvwGCxWGA53xZTE2JNExwx17RQiuIJZ18Ul/Vjc3NODdA26x7hYe5rY0GGZsq Lur3c5i20XfFU1Y82iznEq14q1DPrpnU/is5Sptlk2NDIxe5jFuPZkwSn8SY7z2JnNLN TDKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sL1cfgAwusROayggatCngmy+CDfZipZ8K0S97Q3yq6Q=; b=Iz5RsIUjkASyvF9FJiSc6/iEB/hE2mq7JyMD2A+IdCFpBT9iSfoCipC7c3FhQw5rEX mOWqzZqfOUdA6X9P1SXqmULbY942ypVBqdXeuoABD7n+DaYEhvjPqzgXeYvz0Mp0VB+o P2SWYJWJlzLxCNgdqa+J8FuJLWbYg0xvGvNA0nNKAoWBYYqRLujpJIcSscbcoDGltWVJ LI1jHsFew8rsvkCkCydZShdu5d1CxhXdEeDCTR6sq7CpZHRvLUuFRF8jDNU0Ky7/owvN DLmmuWL8FKSANg77B8NHDEZi/KjNrVsZzXlK9lBzexPscYc8L3/TvfcAUuyAiemiaVD5 3/Ew== X-Gm-Message-State: AOAM531qQoDcRonXpC7HAzAM5EFeB9zyXcB1jm2PFK4VJsmL1rtjUsT6 77eNRd5/9LfduXb8SPRs4njDPEJBCSJbzvNz1rS50Q== X-Received: by 2002:aca:bb06:: with SMTP id l6mr14657198oif.121.1620071630990; Mon, 03 May 2021 12:53:50 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Marco Elver Date: Mon, 3 May 2021 21:53:39 +0200 Message-ID: Subject: Re: [PATCH 7/3] signal: Deliver all of the perf_data in si_perf To: "Eric W. Biederman" Cc: Peter Zijlstra , Arnd Bergmann , Florian Weimer , "David S. Miller" , Ingo Molnar , Thomas Gleixner , Peter Collingbourne , Dmitry Vyukov , Alexander Potapenko , sparclinux , linux-arch , Linux Kernel Mailing List , Linux API , kasan-dev Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 3 May 2021 at 21:38, Eric W. Biederman wrote: > Peter Zijlstra writes: > > > On Sun, May 02, 2021 at 01:39:16PM -0500, Eric W. Biederman wrote: > > > >> The one thing that this doesn't do is give you a 64bit field > >> on 32bit architectures. > >> > >> On 32bit builds the layout is: > >> > >> int si_signo; > >> int si_errno; > >> int si_code; > >> void __user *_addr; > >> > >> So I believe if the first 3 fields were moved into the _sifields union > >> si_perf could define a 64bit field as it's first member and it would not > >> break anything else. > >> > >> Given that the data field is 64bit that seems desirable. > > > > The data field is fundamentally an address, it is internally a u64 > > because the perf ring buffer has u64 alignment and it saves on compat > > crap etc. > > > > So for the 32bit/compat case the high bits will always be 0 and > > truncating into an unsigned long is fine. > > I see why it is fine to truncate the data field into an unsigned long. > > Other than technical difficulties in extending siginfo_t is there any > reason not to define data as a __u64? No -- like I pointed at earlier, si_perf used to be __u64, but we can't because of the siginfo_t limitation. What we have now is fine, and not worth dwelling over given siginfo limitations. Thanks, -- Marco