Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp2929126pxy; Mon, 3 May 2021 11:06:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxlmebQJGKQim9iW7+i7u3vjG/PI5pNKicm4mLY/ruqdgRj4J9bkoI7cXt/2yZtdKxoEo/2 X-Received: by 2002:a17:906:3949:: with SMTP id g9mr18031296eje.7.1620065181992; Mon, 03 May 2021 11:06:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620065181; cv=none; d=google.com; s=arc-20160816; b=tBzfN2WINrMdozXLTHijkLELJL0O+JDVynGRE5y/NbN4lo6z2mOqidO+JgZf18CzzK kqSKDAJ3hEbIK38GuWetRsFR6UiOZ4Xvc2kl6d71MQZC22FK4YQGl/FIYMmMr/Jo5Lte 4IBA8WGjQXnxfz8rgoEurFH6LzDLfM0/jEQ9JtOpOU9fOBrZgg4FWPE8ty+iewS7Sh5q 5m/379cNqMXXfvWwJwWffN9ihY3qRk7NJ+UM0SfhtEG7wmKTgSlC3ZKXMUui0gh9YRAn B3xc3MrS7qgZpqaUn8pFpbbEiHRucscboTBLR9qFDfFmWF3bi/kYZRHV5iw69y4FE8zF 8auQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=QfWmNFzhd1S/Ji2/R39Bqc12Zh4EulMnH47lj47aGq8=; b=f+qA7Vj9fqJogE1wg1gcjFyvddOinCmBEhXShtiDhu4OA4PTNfiHAFTeqZE65hG5Wt ncfMEN65iXoE6vPF+jllyw6dCjVjbnWUSE77xKoO8gRSwF6cln5lrlXzpdD4egb8uy3v k4pn5alzN9atl8ZzKrgYGeEFyYjLeb+7Av1bkCotaU2daRc3Gig3J47MuL0+M54iL36R vcBLsqxCDFhXV9vNg961rEqAgSrfh25m0ZWqAoVVxK0iFqgVsGn0EFIUiGmw98w9yoTB X2YGM5rW7N1SwalzjsG6YywiO0fmFzFo0qBND9Z5aU18Z7DN1wyFxruPS71VflJoNMa0 poKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=XumoXk4r; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bq19si1167929edb.311.2021.05.03.11.05.56; Mon, 03 May 2021 11:06:21 -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=@infradead.org header.s=desiato.20200630 header.b=XumoXk4r; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233343AbhECMrn (ORCPT + 99 others); Mon, 3 May 2021 08:47:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233158AbhECMrm (ORCPT ); Mon, 3 May 2021 08:47:42 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1BF8C06174A; Mon, 3 May 2021 05:46:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=QfWmNFzhd1S/Ji2/R39Bqc12Zh4EulMnH47lj47aGq8=; b=XumoXk4rcDMvg1IUtUvmE938GI b9X1L0f/kTqhp+eUmDneBVIM+VLK4tcedpSWvAruEG9FrIV+dDDkG6tk9dPnLUIw2aULil5oYw5OZ l3hYxn7VHpVQXPZiVHyY5oS/cRee2er8krYJO9JDfWWTji6bid8Jc0oVN5trfSQc6fw0MfF6NldLt fRrPh5i+52JaYvSqjmnyptQdJ/EQl3DkIWZzPd9/yn0b22j2Uta1ux3PhjLV+HJwWlJxLi0oFVYV2 +/cY512qd4rCd23VnD6vVYYYURxouR+zJIFvt03xYQ6SB/LUBlP3xHPpRXnVRnzD4t1wWmG2P1FRB 9sCS/Ibw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1ldXvz-00Dt54-Ne; Mon, 03 May 2021 12:46:28 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id DF9C83001D0; Mon, 3 May 2021 14:44:21 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id B0B282CEAF0C5; Mon, 3 May 2021 14:44:21 +0200 (CEST) Date: Mon, 3 May 2021 14:44:21 +0200 From: Peter Zijlstra To: "Eric W. Biederman" Cc: Marco Elver , Arnd Bergmann , Florian Weimer , "David S. Miller" , Ingo Molnar , Thomas Gleixner , Peter Collingbourne , Dmitry Vyukov , Alexander Potapenko , sparclinux , linux-arch , Linux Kernel Mailing List , Linux API , kasan-dev Subject: Re: [PATCH 7/3] signal: Deliver all of the perf_data in si_perf Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, May 02, 2021 at 01:39:16PM -0500, Eric W. Biederman wrote: > 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. The data field is fundamentally an address, it is internally a u64 because the perf ring buffer has u64 alignment and it saves on compat crap etc. So for the 32bit/compat case the high bits will always be 0 and truncating into an unsigned long is fine.