From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70F2DC433B4 for ; Sun, 2 May 2021 19:14:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4EF3D61177 for ; Sun, 2 May 2021 19:14:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232372AbhEBTOk (ORCPT ); Sun, 2 May 2021 15:14:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231818AbhEBTOi (ORCPT ); Sun, 2 May 2021 15:14:38 -0400 Received: from mail-oo1-xc32.google.com (mail-oo1-xc32.google.com [IPv6:2607:f8b0:4864:20::c32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B22F1C06138C for ; Sun, 2 May 2021 12:13:46 -0700 (PDT) Received: by mail-oo1-xc32.google.com with SMTP id v14-20020a4ae6ce0000b02901fe68cd377fso111617oot.13 for ; Sun, 02 May 2021 12:13:46 -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=emMfiYi99q3nX4v+CBQmuXsA/kqjvpixR7oLzYPLuiM=; b=eRrh8/FTxx8mY93zg7f5u2PqJag/AV+2CsamonnCrPl50D5ybWNE9RjM9IHFNGK0Hp tsQCQr9ZC0GehGcA6cOcwWjxeWjJU/S5VN/vJm45DBqcCLu0rlO90skMuIBy2K9DlLkg ukIAGtF3hQFZqp6AexAJ9ojqZ6R6plqZsdvVHcD+Q3hnqs3zSlCcUxdIXr8zVrKT0b90 K9S1dNQqshSjqZqacgx4pkJCgXGhv7suX4I0XIqsmEW7olqA2qVrMj9ulfZezJAI479J Sc35Ku4NkEnOxygYrD+m2aeiOpvlD9SRGRymQrSXXTsljf/pKMCvCCY++dEYJEDOAYfq T+PQ== 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=emMfiYi99q3nX4v+CBQmuXsA/kqjvpixR7oLzYPLuiM=; b=g/n0vFnN46J5cZnm1FMNaVKOiW8DT34h4RYH9PBljvwa2NVmu/UFh1RI49IrE0XgpA H0Lb8xCvyFqZbC8cPWkdei/tlYU8TSALR5h/BpTydFD1yJ/+tHMDdRg66r+/4XfflOQl tDzvhLt79S0MDJy7Z05hbRTAUebVPrJSjKJ6+A3L69pD4vueuWOaC1dRzdzMWVj7J5JH 1B7uzxArRbQGxlJRWTAJVZrfOgLUydCtMF+hp1eAmEaKT0zuwky4c4ZJSqO6/9vStkQd +OG6hrtzjg3Qm9tlWfaLQ6UWGUXjV0GAWWXUZ76DfCgtnYMW5LldxUf+fWWSA48VLD+V V3Dw== X-Gm-Message-State: AOAM5328JL5no7wAGYqnJkwAhLQxvQD8crMlNI/mtpPtbroBB1eUkbCK M5nQnfYhKfD2L5yRV2Fios2SeYpOJ3DuMVxbqofEwQ== X-Google-Smtp-Source: ABdhPJxwRjSJbo3C+Nwhf9lgspATPfUeP4Li99I0sKmagHuY+vIt3q37BWEwAiuogCr1O2KSyZDFBjA9IZlwBT6otMg= X-Received: by 2002:a4a:e715:: with SMTP id y21mr2293005oou.54.1619982825669; Sun, 02 May 2021 12:13:45 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Marco Elver Date: Sun, 2 May 2021 21:13:34 +0200 Message-ID: Subject: Re: [PATCH 7/3] signal: Deliver all of the perf_data in si_perf To: "Eric W. Biederman" Cc: Arnd Bergmann , Florian Weimer , "David S. Miller" , Peter Zijlstra , 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 Sun, 2 May 2021 at 20:39, Eric W. Biederman wrote: > > Marco Elver writes: > > > On Sat, 1 May 2021 at 01:44, Eric W. Biederman wrote: > >> > >> Don't abuse si_errno and deliver all of the perf data in si_perf. > >> > >> Signed-off-by: "Eric W. Biederman" > >> --- > > > > Thank you for the fix, this looks cleaner. > > > > Just note that this patch needs to include updates to > > tools/testing/selftests/perf_events. This should do it: > >> sed -i 's/si_perf/si_perf.data/g; s/si_errno/si_perf.type/g' tools/testing/selftests/perf_events/*.c > > > > Subject: s/perf_data/perf data/ ? > > > > For uapi, need to switch to __u32, see below. > > Good point. > > 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. Yes, it's quite unfortunate -- it was __u64 at first, but then we noticed it broke 32-bit architectures like arm: https://lore.kernel.org/linux-arch/20210422191823.79012-1-elver@google.com/ Thanks, -- Marco