Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp1236667pxy; Thu, 6 May 2021 03:45:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWT4WAB+pgAA1bKBvzUfqIuc/llA+KUEfjmYKQnWJLLykM7aRLhWrWu2jJt4oTNSyBCGmE X-Received: by 2002:a17:902:7c94:b029:e6:e1d7:62b7 with SMTP id y20-20020a1709027c94b02900e6e1d762b7mr3947487pll.29.1620297924801; Thu, 06 May 2021 03:45:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620297924; cv=none; d=google.com; s=arc-20160816; b=P683EwUbIJIyrMA8XJRTh5to/umwXx73BjJblq9oS6YhosNp9L+fv+lDtSg1ZgS9TS nW75+vBtBsz953cp3K3PTlW2/Pqz7XtjE7lbzmFqWayB+bddtV+WOzX448ekoCr3xD9L 9sUgeuLhDuDonEkicZlNVw3YCS+ZJQEOArUVs+xennphnaBpgkoBm+scuhvuR28iubNm ahSC5Ik/XJFnBw4e4Pr07fhsDe8KnUWU2zjZyxdGBXaSfx1GBGZPd0KeRX98wUaJN+jO tRVzMHel1Vt394oCYFLAHTQk9NNLOPqL7f8540y12KSZ4fg3koH/28hv1ZHIHBLy6Z5Y /PxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=IPAb1iGejVFT6zs+1sVzWtohMm9y7vdT/ZlQY8nTMls=; b=baHtvmZ/7tgMGvEnO5+BUA7NTB4w4Yc9pfw7+PyjVW8G8HEg+5rT+SbgWC4Lc+cpZU lds1BiJ1+AaKT6VG0Z5EA1/pafDOeTpDztBhbKJCilRTWiHlGoU+jVTArx/3AI8qSn0u Y1yUzpZXhTL2OK7juygDeCZYI1QqtbC3t43KLJX0vA4gtsuEBCZ0EwP12Cp0J+oJ3b4d srEUANzyILUcGInI/wIodI1xXX22z+yec1fglH9GvND1mlrNOMHe2q0NvpEM+63bnR8W 3Nk4lt8DFYPX2Ei3nOe3v08dAZiIKFAkGPwLDKmKBO5eWSNGu016rnOmmliqj5aLzYA5 +bUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=CJmSrhq7; 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 c140si2908925pfc.135.2021.05.06.03.45.11; Thu, 06 May 2021 03:45:24 -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=CJmSrhq7; 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 S234508AbhEFKoT (ORCPT + 99 others); Thu, 6 May 2021 06:44:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234589AbhEFKoO (ORCPT ); Thu, 6 May 2021 06:44:14 -0400 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AE76C061574 for ; Thu, 6 May 2021 03:43:15 -0700 (PDT) Received: by mail-wm1-x329.google.com with SMTP id l18-20020a1ced120000b029014c1adff1edso5046660wmh.4 for ; Thu, 06 May 2021 03:43:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=IPAb1iGejVFT6zs+1sVzWtohMm9y7vdT/ZlQY8nTMls=; b=CJmSrhq7QsEwcXPUklSribLNMHu+Ig61DIAKupe53jRXLAcL7635N7xCM+oNG0c4ZY 8ev/ZWDdszW/u9QNVB6h4Y3J2VRIr9GCmQi3hsajdOhjcHn20zwMb/BJf+7COTjwuurh wHLw25CRUjaNL84s07vqWB/ZX75Jvh9KtcUOCC6NvcsmmXSsFwfz9BZfAi+sdNlsHjIO DcQJsIsRiEZ1ql1QOuUAUGU4vMhAKJghQS9lKxJ0RegAfwgAhDlIErJ+tVRq2PlCWnpH zL9OjYqAdu1QCiDlD06rEruffC6Kd2ThS4kSGTXZaX0t5GYXLiHqpRQvJpuNx+vckXH7 FMeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=IPAb1iGejVFT6zs+1sVzWtohMm9y7vdT/ZlQY8nTMls=; b=X14qY+TZu/h21M9BM0FjSIGQBkZc7udA0ZQaNrpDQdcZemSUFB+RtQFeSBBXFcrWS3 yXRpMDqsskqjxhUuQmta2shLUr1FWH7xm0BNaxYzCpnrlbm/aZegXu3Bb3AeYH87Sg0U xjqvOGJ/gv192vNuAHpilwXXLyEhv2HUTseKjiL+ca+vwFuxOAWSmwL3ZezGCCXQa3WD 0p1IzlMb4FHxNG4ReJ4z8Vkk4a8dzeDSszV0eI1d0ChUpVwzTkvOJAaWdymU/uvsvqQD rwfH7XAMEyJOmmY6s7mJvZoB3vIXBYUvWug0SB2YrnEM9hMgd+bN0AGjKb/qcbFafqJW VCzQ== X-Gm-Message-State: AOAM533QE692rlKEaiixRIITg3ATx2/d3SEasGwHihW0VU+AweqYSgga MsM+VcNKHhfnF7Wq6SD+scrDLg== X-Received: by 2002:a1c:55ca:: with SMTP id j193mr14228873wmb.58.1620297793837; Thu, 06 May 2021 03:43:13 -0700 (PDT) Received: from elver.google.com ([2a00:79e0:15:13:56c7:a45c:aa57:32c4]) by smtp.gmail.com with ESMTPSA id 3sm2757392wms.30.2021.05.06.03.43.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 May 2021 03:43:12 -0700 (PDT) Date: Thu, 6 May 2021 12:43:07 +0200 From: Marco Elver To: Geert Uytterhoeven , "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 Subject: Re: [PATCH v3 00/12] signal: sort out si_trapno and si_perf Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.0.5 (2021-01-21) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 06, 2021 at 09:00AM +0200, Geert Uytterhoeven wrote: [...] > No changes needed for other architectures? > All m68k configs are broken with > > arch/m68k/kernel/signal.c:626:35: error: 'siginfo_t' {aka 'struct > siginfo'} has no member named 'si_perf'; did you mean 'si_errno'? > > See e.g. http://kisskb.ellerman.id.au/kisskb/buildresult/14537820/ > > There are still a few more references left to si_perf: > > $ git grep -n -w si_perf > Next/merge.log:2902:Merging userns/for-next (4cf4e48fff05 signal: sort > out si_trapno and si_perf) > arch/m68k/kernel/signal.c:626: BUILD_BUG_ON(offsetof(siginfo_t, > si_perf) != 0x10); > include/uapi/linux/perf_event.h:467: * siginfo_t::si_perf, e.g. to > permit user to identify the event. > tools/testing/selftests/perf_events/sigtrap_threads.c:46:/* Unique > value to check si_perf is correctly set from > perf_event_attr::sig_data. */ I think we're missing the below in "signal: Deliver all of the siginfo perf data in _perf". Thanks, -- Marco ------ >8 ------ diff --git a/arch/m68k/kernel/signal.c b/arch/m68k/kernel/signal.c index a4b7ee1df211..8f215e79e70e 100644 --- a/arch/m68k/kernel/signal.c +++ b/arch/m68k/kernel/signal.c @@ -623,7 +623,8 @@ static inline void siginfo_build_tests(void) BUILD_BUG_ON(offsetof(siginfo_t, si_pkey) != 0x12); /* _sigfault._perf */ - BUILD_BUG_ON(offsetof(siginfo_t, si_perf) != 0x10); + BUILD_BUG_ON(offsetof(siginfo_t, si_perf_data) != 0x10); + BUILD_BUG_ON(offsetof(siginfo_t, si_perf_type) != 0x14); /* _sigpoll */ BUILD_BUG_ON(offsetof(siginfo_t, si_band) != 0x0c); diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h index bf8143505c49..f92880a15645 100644 --- a/include/uapi/linux/perf_event.h +++ b/include/uapi/linux/perf_event.h @@ -464,7 +464,7 @@ struct perf_event_attr { /* * User provided data if sigtrap=1, passed back to user via - * siginfo_t::si_perf, e.g. to permit user to identify the event. + * siginfo_t::si_perf_data, e.g. to permit user to identify the event. */ __u64 sig_data; }; diff --git a/tools/testing/selftests/perf_events/sigtrap_threads.c b/tools/testing/selftests/perf_events/sigtrap_threads.c index fde123066a8c..8e83cf91513a 100644 --- a/tools/testing/selftests/perf_events/sigtrap_threads.c +++ b/tools/testing/selftests/perf_events/sigtrap_threads.c @@ -43,7 +43,7 @@ static struct { siginfo_t first_siginfo; /* First observed siginfo_t. */ } ctx; -/* Unique value to check si_perf is correctly set from perf_event_attr::sig_data. */ +/* Unique value to check si_perf_data is correctly set from perf_event_attr::sig_data. */ #define TEST_SIG_DATA(addr) (~(unsigned long)(addr)) static struct perf_event_attr make_event_attr(bool enabled, volatile void *addr)