Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1548290pxj; Wed, 19 May 2021 08:22:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGaJKxN9RlH0737P9lSbFpeNG3zS+g83nI8Djew1QdCcHVkiY/Wi35sMrg1gRrqD0ANC7F X-Received: by 2002:a17:906:2cce:: with SMTP id r14mr12982669ejr.38.1621437767222; Wed, 19 May 2021 08:22:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621437767; cv=none; d=google.com; s=arc-20160816; b=jSk3jN0W1L0ej+oOQpc3j/hNEH1x7zmcFjgfcZylZb+3QsHQD3yHhfqAEkg6gA4x21 eUdApR099Oli9Z5Xckx/MtYKE4q8Fi26O92ok2DVNsXw51aMBifNNgjumldmAzSM4EjH 0k/QfyITVx5wS6pnorXxqJxHWYNpamyHGbaXI7zGCGoxRjDnqKQ/7+pXw8Iv7tyziGsQ /PS3SFlRLO2SHYCphSPj8UKVjNYj9xyNbUsi+Ps72xpxQibFoFxXbY/bMEwFJnthRXVR h+COakldi2CMwvOACZVTpQbkZCkJdR4Vlho8gMWUi/9g3VVHtHRxutPLMvYH12QzESgk 39kA== 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=Bcn5fb5DZjb4YtyFgvoiwHqnuY6hbdNmIIbEt5dAaVo=; b=Yv3IX9JER39k74HRed34rSkttRopqmM5Z8Y1Q9ewVmMKIqMjJn7b8eZUPuq6h9Qpgc KaLcqSl3GbamyHBS53qnGDCuN+LLRGM1vMk5qFuMtavnaDtvmNrBNoBvmKiLucANA0fR Tpalz9AJCis3cE/cfwlmdflaA9ICoiITPxBaM+3qRx1qO/NLuJmL+OYiyxlyJSBWsI+i sE+4sSxGUY50UFOCUTBDfKHXVYci+t2VF1demOBjszmbaLqiAZMA2PXrnX5kfkoUXO9k eBRTuwi1ph19987wxtLYIVw0puD23fcRp9dzmBxlHaijmwkv49GVS39pJ7YBaNOyNU74 fthA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=XDBwjWcK; 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 b15si8366935edd.87.2021.05.19.08.22.04; Wed, 19 May 2021 08:22:47 -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=XDBwjWcK; 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 S1346836AbhERGpj (ORCPT + 99 others); Tue, 18 May 2021 02:45:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346821AbhERGpd (ORCPT ); Tue, 18 May 2021 02:45:33 -0400 Received: from mail-oi1-x229.google.com (mail-oi1-x229.google.com [IPv6:2607:f8b0:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59BB1C061763 for ; Mon, 17 May 2021 23:44:15 -0700 (PDT) Received: by mail-oi1-x229.google.com with SMTP id w127so4993837oig.12 for ; Mon, 17 May 2021 23:44:15 -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=Bcn5fb5DZjb4YtyFgvoiwHqnuY6hbdNmIIbEt5dAaVo=; b=XDBwjWcK7W4iYUwj/u/gw3oqWIeA5hEElNrFlEm/M/WFUJONMDfGqLm0lYCC+OjVVz mBgaZXFe6JWlW8DEdYhnwpSSaIRw0JBMAxOW0eBVYiQFPbdWqcu54BOcbIVGfHSisc53 0eyg+JwZ9Zva8VFoFU411tL9M2+QC38Hjni0baTANedHQf4FpzkVI0oa6ycvizeUlS3n 5kPELVbFvsBKGkfPkPB8Sc/9Eg/h0xc520RY7bKeRNVQmlg8SXch0vnHz/n109DuhTYB 8K9AfhJC/iujNgus17kDXKo/Uh34SKdrvrUQDCjtSEc9j/VfiBuN4vjJ0FXUFAU/LtOV +NUA== 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=Bcn5fb5DZjb4YtyFgvoiwHqnuY6hbdNmIIbEt5dAaVo=; b=dbKEsIcnVOwnw0jy0DRcr1Mqm8Vy6WOCj+goyQEvMWA3sV8LG4fK+T6peINW1DWWJd h9+9MwALHlYXEq9XwaihC+h/CNm9Do9Kew+D9mudpl82ze9Zmb9W8n5sabvVoaKTa3Jd EpcNlYWZbQlfKsYMyO52PMsg0hwTkUHM0XMlk1Y+FxTU3Icw9jqO9H7OB3Co75vejO6a 770+vgFivUapi2bYlW5ggaCqH6wpr3g61RQKFMj1/xBHJ2+cB3R7OUN1Dn3gaxJWsnkk nnj3l8LEMVeq+wXNNg0GoUMVjrSS3fc7aFWxK1IhdhjKOYoEQntLwEkTJiwi7aQpxWAI QyHg== X-Gm-Message-State: AOAM5314fqILxGuWIJK7n+ps2/AAHq8tKZM4yIlq2ewUvNIIvJFyPtPA LlCM0Im8nRE7Mskjnhd1p9RH1pDGJtoJ7X4dyUAUdA== X-Received: by 2002:a05:6808:144f:: with SMTP id x15mr2779174oiv.172.1621320254598; Mon, 17 May 2021 23:44:14 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Marco Elver Date: Tue, 18 May 2021 08:44:03 +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 Tue, 18 May 2021 at 05:47, Eric W. Biederman wrote: > > Marco Elver writes: > > > 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? > > That is the plan. > > I really wonder about alphas use of si_trapno, and alphas use send_sig > instead of force_sig. It could be worth looking into those as it > has the potential to simplify the code. > > >> 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, > > Can I have your Tested-by? Of course, Tested-by: Marco Elver Thanks, -- Marco