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=-13.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_IN_DEF_DKIM_WL autolearn=no 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 072E5C433ED for ; Mon, 17 May 2021 20:53:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D0B94611B0 for ; Mon, 17 May 2021 20:53:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244525AbhEQUyx (ORCPT ); Mon, 17 May 2021 16:54:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237027AbhEQUyx (ORCPT ); Mon, 17 May 2021 16:54:53 -0400 Received: from mail-oi1-x232.google.com (mail-oi1-x232.google.com [IPv6:2607:f8b0:4864:20::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6C0DC061760 for ; Mon, 17 May 2021 13:53:32 -0700 (PDT) Received: by mail-oi1-x232.google.com with SMTP id x15so7692080oic.13 for ; Mon, 17 May 2021 13:53:32 -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=tYiKNumB/sG3g6UoDTpwUaKhoLR3TJj2KrtveF22its=; b=E4IYESmDgLDJKTJfDF4vUoPzJf3sI7MEpeT+1/mAXEdTQsZpiuuMol/4F+vLlpLrIE sah8VFk6mwDiaNaEeoOzMK/Y6GiT3emWiXvBt3HP8YHmEZmkum/YGqd1Md+A1uvOpenb uAHx856RtWQ1SJrIHA/Cb42hLyw1yEAs1zEkG/KI9N7mAWFbOIVyKZ5V5irdXysHT9UW B0KlW/e/W866hpDt9/A9Rs93Aqhp8wNb73AI5+CVeIl5W51ZF4FsfNLPcj7xvUhSVLVP mMFLmI9uzK/wK0RHafAEZbf7zEXFb9f5nQ/5UtJlXGrumhfnXfSWF4OQIGZRyq620vbs 6KgA== 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=tYiKNumB/sG3g6UoDTpwUaKhoLR3TJj2KrtveF22its=; b=TVSlnkVGOa328wbqSO9/N72y3pqFMGvJT19AbN5GqcQyacV89/w8h66o3688YKIBIu 7nCTWclp0UCl3E6kNhh3kXXJts5SLFpkQvINcJsUVjAXM+yPM74S0MzK+JbjFgBgndtw SadChBX8x6HzLCIQPQOG4ayLsZOFVd7gSLOYCqfx1Kd1YB6blmyP2D8j1FyT6B1ePY/o vxmHA9PnJrvlCOf2898qNE+vevLHwJgLD3GgLFdR8cAKyvgmQMwKUlQ7IL7kNuSeMbVP EKO4QylBEKPP/n6DIrB/NUF0kGda5rPKBjFXRWa10xhlK04ekzhkrJlQU2QtS/Ma/+kw QeaQ== X-Gm-Message-State: AOAM533/pa7mz0vsuLZokb4vbMj1oopIx83tYAATv6JA4BUf1781FPtJ 6NebbiJGAe4rySrIDYmFqZc2L+6WG0b9KONAg6RYOQ== X-Google-Smtp-Source: ABdhPJydkSsTkVe66YjNSKFDH6L71UKujfw4XIMG1b/yqvx8GCOTa67p4xK47kkdF1AolTKy50FI6BZbal8CMHvsKAc= X-Received: by 2002:a05:6808:f94:: with SMTP id o20mr1223000oiw.121.1621284811977; Mon, 17 May 2021 13:53:31 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Marco Elver Date: Mon, 17 May 2021 22:53:20 +0200 Message-ID: Subject: Re: [PATCH v4 0/5] siginfo: ABI fixes for TRAP_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-api@vger.kernel.org On Mon, 17 May 2021 at 21:58, Eric W. Biederman wrote: > > During the merge window an issue with si_perf and the siginfo ABI came > up. The alpha and sparc siginfo structure layout had changed with the > addition of SIGTRAP TRAP_PERF and the new field si_perf. > > The reason only alpha and sparc were affected is that they are the > only architectures that use si_trapno. > > Looking deeper it was discovered that si_trapno is used for only > a few select signals on alpha and sparc, and that none of the > other _sigfault fields past si_addr are used at all. Which means > technically no regression on alpha and sparc. > > While the alignment concerns might be dismissed the abuse of > si_errno by SIGTRAP TRAP_PERF does have the potential to cause > regressions in existing userspace. > > While we still have time before userspace starts using and depending on > the new definition siginfo for SIGTRAP TRAP_PERF this set of changes > cleans up siginfo_t. > > - The si_trapno field is demoted from magic alpha and sparc status and > made an ordinary union member of the _sigfault member of siginfo_t. > Without moving it of course. > > - si_perf is replaced with si_perf_data and si_perf_type ending the > abuse of si_errno. > > - Unnecessary additions to signalfd_siginfo are removed. > > v3: https://lkml.kernel.org/r/m1tuni8ano.fsf_-_@fess.ebiederm.org > v2: https://lkml.kernel.org/r/m14kfjh8et.fsf_-_@fess.ebiederm.org > v1: https://lkml.kernel.org/r/m1zgxfs7zq.fsf_-_@fess.ebiederm.org > > This version drops the tests and fine grained handling of si_trapno > on alpha and sparc (replaced assuming si_trapno is valid for > all but the faults that defined different data). And just to clarify, the rest of the series (including static-asserts) for the next merge-window will be sent once this series is all sorted, correct? > Eric W. Biederman (5): > siginfo: Move si_trapno inside the union inside _si_fault > signal: Implement SIL_FAULT_TRAPNO > signal: Factor force_sig_perf out of perf_sigtrap > signal: Deliver all of the siginfo perf data in _perf > signalfd: Remove SIL_PERF_EVENT fields from signalfd_siginfo Looks good, thank you! I build-tested (defconfig -- x86_64, i386, arm, arm64, m68k, sparc, alpha) this series together with a local patch to pull in the static asserts from v3. Also re-ran perf_events kselftests on x86_64 (native and 32bit compat). Thanks, -- Marco