From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 77698 invoked by alias); 16 Apr 2019 15:33:28 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 77691 invoked by uid 89); 16 Apr 2019 15:33:28 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=compact, HX-Languages-Length:762, frank X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 16 Apr 2019 15:33:27 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id ADF64356CE; Tue, 16 Apr 2019 15:33:23 +0000 (UTC) Received: from redhat.com (ovpn-116-49.phx2.redhat.com [10.3.116.49]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8C3BE5C205; Tue, 16 Apr 2019 15:33:22 +0000 (UTC) Received: from [127.0.0.1] (helo=vm-rhel7) by redhat.com with esmtp (Exim 4.91) (envelope-from ) id 1hGQ5J-0000Yr-1P; Tue, 16 Apr 2019 11:33:21 -0400 From: fche@redhat.com (Frank Ch. Eigler) To: Frank van der Linden Cc: Subject: Re: [PATCH] arm64: use sregs for syscall probe registers References: <5cb0cb1f.ROdjA4uUKaH5hT/r%fllinden@amazon.com> Date: Tue, 16 Apr 2019 15:33:00 -0000 In-Reply-To: <5cb0cb1f.ROdjA4uUKaH5hT/r%fllinden@amazon.com> (Frank van der Linden's message of "Fri, 12 Apr 2019 17:30:07 +0000") Message-ID: <87a7gqm0cf.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2019-q2/txt/msg00032.txt.bz2 Frank van der Linden writes: > Since syscall wrappers are now active on arm64 (4.19+), arguments need to > be retrieved the right way, by checking if there is a saved set of system > call registers, and using them if there are. [...] This looks good to me. > + if (STAP_ARG_argnum < 1 || STAP_ARG_argnum > 8) { > + snprintf(CONTEXT->error_buffer, sizeof(CONTEXT->error_buffer), > + "Cannot access arg(%lld)", > + (long long)STAP_ARG_argnum); > + CONTEXT->last_error = CONTEXT->error_buffer; > + return; > + } By the way, as listed in [man stap], there are some helper macros to make this a little more compact: if (...) { STAP_ERROR("foo bar %lld", (long long)foo); } - FChE