Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1233756pxj; Wed, 19 May 2021 01:06:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyc5+JeqZZT+sjd/QUr6RRgJlEU0zLVgtTJsXczT6CBUSX3pmTx0I0PrNGnwEh/E7Iwq5Mv X-Received: by 2002:a05:6402:da:: with SMTP id i26mr12953436edu.379.1621411617039; Wed, 19 May 2021 01:06:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621411617; cv=none; d=google.com; s=arc-20160816; b=uAgQVKhbPv9es1wsqgow1tsHlzaGbi04glsy1nCIhOktLgMxM4G78dgPN98h+GBWLt +er+SWYUa75q8yTG9Q45y9yQelLgNxE6pYHl9oIupGU4ah5tbtEit4bivi/RAL/EaRN2 6oGH76tt1WmIeXGoIDdVb6rZjFcsFElPqIsJV8yEib4C0kjtbdnLeLlBzXA66SVnpdwv KjB+Jf3C5fVAHCH2q/6hmJUoLbsgrvXXu0Aqgt6A9ulCQLWIAsipBpyqdnlcgCk0qxQH Uo49dIl/9l1pPYhzncZmC7nJLp815WfImOsY5xsrDl5wZ8Alm3pN0pY+N2xOKssfcAcY RlXw== 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=tYiKNumB/sG3g6UoDTpwUaKhoLR3TJj2KrtveF22its=; b=AImoQAaBDTrU9PuN4OveTFKPGHc1bn3YZnaHp6LtrVJ61cLUcgQkFTIEeV/KcL3WyN VkAzzGBwH5YwLLBQF3TjWc4IlOQvufO5EIZ4j/epXYFr3tgK77CjlHHDj9Y/cW/nTzR/ Ns4ty94hUjd2Faf1g1hAOn0s9pKDkXajogonUP+fpM/eD8h1GG1HYHpZws2srOK/HNUn GR77s4mUTCWL6p3iiv20h528IcxfznySJ8sfpEChPZk6vbci7mmamnma9bAh4YBxuuA/ HOEhTbKpnX3pSGHKZjNjqvRucSUpNJ2FVZwHfok8jqA9znncFoGgsIkUgfO/ETHStI48 VRdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=E4IYESmD; 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 n25si2542092edv.9.2021.05.19.01.06.33; Wed, 19 May 2021 01:06:57 -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=E4IYESmD; 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 S244547AbhEQUyx (ORCPT + 99 others); Mon, 17 May 2021 16:54:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244517AbhEQUyx (ORCPT ); Mon, 17 May 2021 16:54:53 -0400 Received: from mail-oi1-x231.google.com (mail-oi1-x231.google.com [IPv6:2607:f8b0:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4E84C06175F for ; Mon, 17 May 2021 13:53:32 -0700 (PDT) Received: by mail-oi1-x231.google.com with SMTP id v22so7732958oic.2 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=auO3faCJFW5vmTY9QULsbQyYKeGjCCAXPuOrmxR0mfcjQfHt83gX+GVqNnEkJLtQEf TrukNrpRcSjknp+y6sXLPz/oKAawGPMLO97C9B8oF7M5h3WaNS08rU3JxA+N+RBn962P JXc9rN5Y4YdZLbD0dHaKnEft2NI79Pmedrczrd12mqgfyLMglD/GZT4hEebvkntzv1je MPiu4Mc85Xd0/Y43aqJGEyowIO96NTL2/0FMACsHkzQavo3whObCCXWBslww1JcRQnfc m6skTiErrb6KqbQwlHDWYgIYWtuFJ0+1SxhFFATpBjbOvZN8b9+AalZEP0LEvNyCdjPF R/hA== X-Gm-Message-State: AOAM530vmBPR2iZiwhVVCYXCY1fYhL9YzRXavTj4Ex8wLP/WaK5ihndR plDXWlRHXwgMIQYdhSC/4x+mTS+8CHHuwZkBw/u82A== 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-kernel@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