Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp3581022ybk; Tue, 19 May 2020 08:05:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRxmTo5Oqx4dtmXzcxLbs3m+bpNRi3LUfEo0ldGm4b/hnOHMd5G13YCNzgVa2ZfD+K3pmd X-Received: by 2002:aa7:d650:: with SMTP id v16mr17483092edr.267.1589900703607; Tue, 19 May 2020 08:05:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589900703; cv=none; d=google.com; s=arc-20160816; b=SUNy9EhZEG5pLXvxq2vKrBI010C3yd9QgyIZLMvkO8a0C7JdwD1pc1xianmNouXL4M 0VG15ey/yu3tdubbBk3vdmYnLQ+b/rh8PzPJ8VUfwpTXxgyRcGVt3DFYDoqViIp7DkV0 sHtWq9wNKMjaV1POf3XNE6ouiuvrBlL0cV698izI7DfS3iHzK+Gpgx+R6fvIYYLsLrJR 8uJzykbcSC1XsRv61900N9m2+Rns2o/yqG16ew/ip7E5qlDDNNpuz1xPJEdoWmLmHag6 C8NiDeKJSKXbJDsNrryDdnfR6+JYgjWKoN0HdH1is9bTk+XVAv/2gav0ki8ZWtFdnHZD Sy/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=1pGtsBo5aOZTLv1u9iVXQX/bDAadqeLEppbHbTjdp4k=; b=A8xjqH8tGYLcqc/8UlI8UibPDGeUYEkZbaj3mSvkCo2GEB40cXyC0SVy8i4x7lpSmL R5gaEKTcvxL4que7VDoJDu8Xgs3MU3NFHRp+JTs2RX2musEzTmVGRkMDGeJaRzPVRJmS fjUWT86glYffjmVi/oKNB/8nDUOs7b+0Mfq8bmW1cjjRyeHvEDBKJ+SL4Yg+D14ytl1+ yS0sZa1QT13PXZXOo/53xxQGsrZ3S7rMWA1qNieVpXio+n2vRq4n78GmsVqm6hTXB3Sl o7ya3sxDQgUlesqbLV4Yf2lFAGLlfredY6+0LEhhR3R0jQN61QzOWGwXW+IHhzjh+5L7 8EiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="IO0t+/Xw"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dc4si7999195edb.565.2020.05.19.08.04.30; Tue, 19 May 2020 08:05:03 -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=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="IO0t+/Xw"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729024AbgESPCP (ORCPT + 99 others); Tue, 19 May 2020 11:02:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728052AbgESPCP (ORCPT ); Tue, 19 May 2020 11:02:15 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:3201:214:fdff:fe10:1be6]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98F43C08C5C0 for ; Tue, 19 May 2020 08:02:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=1pGtsBo5aOZTLv1u9iVXQX/bDAadqeLEppbHbTjdp4k=; b=IO0t+/Xwp5xyMj7qc1jMk6LQR CE/R6Y9eOaBlMnb1FKriyi12K2IFP1vzmt/cm421S0yngnGOi/HZRhFdjiN94gPUNOppJ5fWC1DhY DLB9ky1yKCdHdkm0fpVaGedDOCcPqCa2oiebchwHaRkPv1722dpx37NaVohILYMzxR4XJxBdJqjTm 3l7EDAYm8cXcT/dTfgBEXJKcoxsh/yvKvQbjDkGI9Wd8P1tEoLkYrTUborIBMkWl18JDoOYBzfeIZ Lj5RHmojzi5UrjbakD2DBucM+Ye+bR5GLfP8qkiDbRXyc32Afp8DfmspXGR0tFb3Enn2X0VHLyy2v uO876bNNw==; Received: from shell.armlinux.org.uk ([2001:4d48:ad52:3201:5054:ff:fe00:4ec]:42290) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jb3kr-0005gS-Dc; Tue, 19 May 2020 16:02:05 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1jb3kq-0005ot-5Q; Tue, 19 May 2020 16:02:04 +0100 Date: Tue, 19 May 2020 16:02:04 +0100 From: Russell King - ARM Linux admin To: Andrew Jeffery Cc: linux-arm-kernel@lists.infradead.org, oleg@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ARM: Implement functions for HAVE_FUNCTION_ARG_ACCESS_API Message-ID: <20200519150204.GG1551@shell.armlinux.org.uk> References: <20200519143132.603579-1-andrew@aj.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200519143132.603579-1-andrew@aj.id.au> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 20, 2020 at 12:01:32AM +0930, Andrew Jeffery wrote: > This allows extraction of kernel function arguments via kprobes on ARM. > Based on the arm64 implementation and adapted for the 32-bit AAPCS. > > Signed-off-by: Andrew Jeffery > --- > The description for HAVE_FUNCTION_ARG_ACCESS_API was pretty vague on what was > required. I've implemented enough to enable argument extraction for kprobes; is > there anything else needed to satisfy HAVE_FUNCTION_ARG_ACCESS_API? What about 64-bit arguments? How do they get handled? regs_get_kernel_argument() talks about 'n' being the argument number, and maps this directly to a register. If a function argument prototype is: (something *foo, long long bar, int baz) The foo is in r0, bar is in r2/r3 on EABI, and baz is on the stack. n=0 will return foo. n=1 will be undefined. n=2 will return part of bar, and n=3 will return the other half. Is this what is expected? -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTC for 0.8m (est. 1762m) line in suburbia: sync at 13.1Mbps down 424kbps up