From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ED9E1C43334 for ; Thu, 30 Jun 2022 06:56:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=y1nSwG4DF0ZHBfnwTCe5lO9gYQNNR2YBh/63qb+LfOg=; b=ZFo5dh5GCNvxKr lp2yLAD3JVpvQXAXsxjuBVCDVDewYZGrC10yY7DSOkPHu5UwcwK9j0JHIXjnUctJy9/EXxTaokkgI nXFBz0jMssD9x2WN7DOvqvauG1nXO82uA6X9WRYmFE0W+NUuDMDDFs7LiYB4JGXphO2h95Xc+av3M JQdMqfpJ24jYgukndXtk3OJ+fVMfcqqgcIXXZnLk+p0LzPooJ2uZkFERW2kIpK+V4Iave/WT9li77 VNo3EFV63ZXYP0DxQYejwOvwN6aKPYZcOYtK62sMSVklevUQ05rYrazxY7TcW1Lm6fqiJ8U6fdCGC L4rOcK3YvyZkWUwyp6mA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o6o5W-00Fcc0-KF; Thu, 30 Jun 2022 06:55:42 +0000 Received: from smtp-out1.suse.de ([195.135.220.28]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o6o5S-00FcZw-KV for linux-arm-kernel@lists.infradead.org; Thu, 30 Jun 2022 06:55:40 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 1155021C17; Thu, 30 Jun 2022 06:55:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1656572133; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=okYFeQHCpEqkIDhwEg2qpMDyzApIEQNLhlCs/1wRbT8=; b=IR4PmIpGWNfzHgXJeBDOJgxDGd2GV2hVt52Pr+5Oi2R3dRfjC60TkJdxm8EdAm0YDA9n1T e6t5FqpjyCHUsB0BxCG3IUIFuR2e9HBWVrnqYU9vuPlWAOJziwlvXc88359angqNk6Ip+E 3sAadl12d8N4HMmarUk5bvnsJ6EwcJg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1656572133; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=okYFeQHCpEqkIDhwEg2qpMDyzApIEQNLhlCs/1wRbT8=; b=EQAdbyOGd9xMJFKrx8gvnMBF/SL6fFGcf3+4IiqJpDIuJCh/ZtD0B7mR87q/JhX7zfLEwn SZpTY1eWQ1KI2+CA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id EEFB8139E9; Thu, 30 Jun 2022 06:55:32 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id GBWkOORIvWLeIwAAMHmgww (envelope-from ); Thu, 30 Jun 2022 06:55:32 +0000 Date: Thu, 30 Jun 2022 09:55:32 +0300 From: "Ivan T. Ivanov" To: Mark Brown Cc: Catalin Marinas , Will Deacon , Mark Rutland , "Madhavan T . Venkataraman" , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] arm64: Add initial set of stack unwinder self tests Message-ID: <20220630065532.i3alwmaenkooiwxw@suse> References: <20220624141000.88120-1-iivanov@suse.de> <20220624141000.88120-2-iivanov@suse.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220629_235538_868433_1886AD8F X-CRM114-Status: GOOD ( 21.90 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, On 06-29 16:59, Mark Brown wrote: > > On Fri, Jun 24, 2022 at 05:10:00PM +0300, Ivan T. Ivanov wrote: > > Add kunit tests for obvious cases where stack unwind could be needed. > > Like these: > > > > * Unwind a separate task > > * Unwind starting from caller > > * Unwind from irq context > > * Unwind from kprobe handler called via ftrace > > * Unwind from ftrace handler > > * Unwind through kretprobed function > > * Unwind from kretprobe handler > > > > Tests are completely based on code used in s390 unwinder tests. > > Cases which where not relevant to aarch64 where removed and > > some places where adjusted to address aarch64 specifics. > > I think this would be a bit easier to digest if it were a series which > builds things up with the test cases in individual patches, or at least > things like ftrace and kprobes split out a bit more, rather than every > single test all at once. I've got a few *very* superficial comments > below, I think the code is fine but there's several moving pieces to > check. Ok. I will split and resend. > > > +/* > > + * Calls test_arch_stack_walk() which is handy wrapper of aarch64 unwind > > + * functionality, and verifies that the result contains unwindme_func2 > > + *followed by unwindme_func1. > > Missing space. Sure. > > > + ret = register_ftrace_function(fops); > > + if (!ret) { > > + ret = test_unwind_ftraced_func(u); > > + unregister_ftrace_function(fops); > > + } else { > > + kunit_err(current_test, > > + "failed to register ftrace handler (%d)\n", ret); > > + } > > Shouldn't we return an error here? Error will be returned once we remove test_unwind_ftraced_func address from ftrace filters. Regards, Ivan _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel