Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp593685pxb; Wed, 18 Nov 2020 12:04:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJy+MO9eLc+3TH9xvJyapVaMKYmvWL44eb5QHD6rjehH+aD1xJogamCJmGwr0TDI2SD2sFnd X-Received: by 2002:a05:6402:1c99:: with SMTP id cy25mr27765632edb.283.1605729894976; Wed, 18 Nov 2020 12:04:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605729894; cv=none; d=google.com; s=arc-20160816; b=ovFoKDCBh7uVwy/opuVO+2mR0KOQcGkYG2BbUeRYqLuHRsEzYPnP2AqD7vXXs77X1H +9uDHe2bQVbFau3zasiwhkvuAl/rc3EXDWNI5V0qQWYJWy7yzUvLFbk1Da4YxYYjyhPq 1MVQg3bXMwGjRMzz0ua48OhGudQY0es1g5qR/Ze9a8tPgXpAIx/dH0xHFdsYfVxxgPew tf5+Fkelhoj/RS66y0hDQwNa89uwl1Cia1+WbFpJIr7LUBJghOuZAeAX/fj1eRaWfcBx D1BTsRYUiBiJtTJzqlVdR8LHt7PctY7q/yXbHkTpZuwWy0HIXW4sArqLDZi02FOr+s/O ZkLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=nfamm6yR85n27yPvzQk/ne1TuD4r/7HpyTYH+n07NTQ=; b=S8w9XgSnhkXj8KQnisUjSWndnNRFzfk6Rt3/wXasKPlJO0luXs6ENKd7vFymXYZ4rw xXYmfvdQkBSdUQ88GZahXPLUkKT1acFCpICNfWoXiHQBcUU0tzrmHJb5B2Y0FEjw0Y6c ZNd7xnnFCP6fdzZ6vBbR7TUZWpn2GEzx0hP7r9AHAlVvTddhGt1yYkDRydZORQGJcxGG WmbbeKiCMnpnxiNHq7CRVTqECq/XpJpSnrYeZxXUtzhqO3A3w5VevsH3DoSEXHg1p05R cmatCaWsZb8naUBZyFTkj976qOQHTdxusHu++BatXqIvmX/zhU+UXXIRKXY8EZ3E3PUp Wbdw== ARC-Authentication-Results: i=1; mx.google.com; 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 k7si16524482edo.371.2020.11.18.12.04.26; Wed, 18 Nov 2020 12:04:54 -0800 (PST) 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; 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 S1726932AbgKRUCm (ORCPT + 99 others); Wed, 18 Nov 2020 15:02:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:45080 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726141AbgKRUCl (ORCPT ); Wed, 18 Nov 2020 15:02:41 -0500 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D9DDC20782; Wed, 18 Nov 2020 20:02:37 +0000 (UTC) Date: Wed, 18 Nov 2020 15:02:36 -0500 From: Steven Rostedt To: Alexei Starovoitov Cc: Florian Weimer , Peter Zijlstra , Mathieu Desnoyers , linux-kernel , Matt Mullins , Ingo Molnar , Alexei Starovoitov , Daniel Borkmann , Dmitry Vyukov , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , John Fastabend , KP Singh , netdev , bpf , Kees Cook , Josh Poimboeuf , linux-toolchains@vger.kernel.org Subject: Re: violating function pointer signature Message-ID: <20201118150236.65a538eb@gandalf.local.home> In-Reply-To: References: <20201116175107.02db396d@gandalf.local.home> <47463878.48157.1605640510560.JavaMail.zimbra@efficios.com> <20201117142145.43194f1a@gandalf.local.home> <375636043.48251.1605642440621.JavaMail.zimbra@efficios.com> <20201117153451.3015c5c9@gandalf.local.home> <20201118132136.GJ3121378@hirez.programming.kicks-ass.net> <87h7pmwyta.fsf@mid.deneb.enyo.de> <20201118092228.4f6e5930@gandalf.local.home> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 18 Nov 2020 11:46:02 -0800 Alexei Starovoitov wrote: > On Wed, Nov 18, 2020 at 6:22 AM Steven Rostedt wrote: > > > > Thus, all functions will be non-variadic in these cases. > > That's not the only case where it will blow up. > Try this on sparc: > struct foo { > int a; > }; > > struct foo foo_struct(void) { > struct foo f = {}; > return f; > } > int foo_int(void) { > return 0; > } > or this link: > https://godbolt.org/z/EdM47b > > Notice: > jmp %i7+12 > The function that returns small struct will jump to a different > instruction in the caller. > > I think none of the tracepoints return structs and void foo(void) is > fine on x86. > Just pointing out that it's more than just variadic. I also said that this is limited to only functions that have void return. -- Steve