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 X-Spam-Level: X-Spam-Status: No, score=-14.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9299AC4707F for ; Thu, 27 May 2021 16:47:08 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 52015613AF for ; Thu, 27 May 2021 16:47:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 52015613AF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RqdcBsaK0Id5Mpv7ttOWPmvq9akr22h80azH+bZrTVM=; b=cSJSpE/YeX3uye B/zGRQlyuxeRr7RwPT0OMqv0vmsxWOO+AFasmO763GAcU87Cg85SsacMFSEwKoerQJze5D+tfm8ib a5EWeOrbZIwzVmRvtbxQNRRQyVKG9mUNUB+wsIbUq6SSXF2okhg0TNSK4pLdcvJT32kCl7VDeWlIo eqeWzI0Xvwl34dvlo91CZt7YwQilAt57TndWE9bdvWkd/Jj54X3akjdGq4pS9mLdBQQcJK0I1VKr8 hXa8wlXA4MvtVrDpokTSyu5HuO+zGO0ezM7MDmOPsFQvqXLPTizs5/U7SYyU7h1X4VHys31QPeDWS GJpIJnhjXuy/OkwXaTYQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lmJ7q-007kI0-Lf; Thu, 27 May 2021 16:44:51 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lmHz4-007Ehu-9h for linux-arm-kernel@lists.infradead.org; Thu, 27 May 2021 15:31:43 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (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 A6171611C2; Thu, 27 May 2021 15:31:41 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1lmHz1-003ynJ-IL; Thu, 27 May 2021 16:31:39 +0100 Date: Thu, 27 May 2021 16:31:38 +0100 Message-ID: <87tumory5h.wl-maz@kernel.org> From: Marc Zyngier To: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, james.morse@arm.com, joey.gouly@arm.com, will@kernel.org Subject: Re: [PATCH v3 00/20] arm64: entry: migrate more code to C In-Reply-To: <20210525183302.56293-1-mark.rutland@arm.com> References: <20210525183302.56293-1-mark.rutland@arm.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, james.morse@arm.com, joey.gouly@arm.com, will@kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210527_083142_424354_4DED4750 X-CRM114-Status: GOOD ( 33.50 ) 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 On Tue, 25 May 2021 19:32:42 +0100, Mark Rutland wrote: > > This series (based on v5.13-rc2) migrates most of the remaining > exception triage assembly to C. All the exception vectors are given C > handlers, so that we can defer all decision making to C code, and the > assembly code can be made simpler and more uniform. At the same time, > I've tried to consolidate all the entry sequencing (e.g. reading > exception registers and calling accounting code) in entry-common.c so > that this is easier to maintain. > > I was recently informed that `noinstr` wasn't protecting entry sequences > from KCOV instrumentation, so I've refactored things so that we can > avoid this by preventing KCOV instrumentation for the entirety of > entry-common.c. I've done likewise for the low-level idle sequences > which have the same problems with instrumentation when RCU isn't > watching, etc. > > I've stopped short of converting the ret_to_user / work_pending loop. > Converting this cleanly will probably need something like the wrappers > generated by SYSCALL_DEFINE() to handle the common entry/exit logic, and > this is easier to build once all the handlers have been converted to C. > Similar is true for portions of kernel_entry and kernel_exit that could > be converted to C. > > It should also be possible to generate the vectors and their associated > assembly handlers in one go by placing these in separate sections and > using .pushsection and .popsection. I've held off doing this for now as > this probably requires some changes to the linker script, and regardless > it should be easier to make that change atop this series. > > So far this has seen some light boot testing, and a day's worth of fuzzing > under Syzkaller, which I intend to leave to soak for a while. > > I've pushed the series to my arm64/entry/rework branch on kernel.org: > > https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/log/?h=arm64/entry/rework > git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arm64/entry/rework > > I've tagged this version as arm64-entry-rework-20210525. > > Since v1 [1] > * Rebase to v5.13-rc2 > * Fold NMI entry/exit sequencing into entry-common.c > * Make NMI entry/exit helpers private to entry-comomn.c > * Prevent KCOV instrumentation of entry-common.c > * Prevent KCOV instrumentation of idle code > > Since v2 [2]: > * Correct commit message description in patch 2 > * Use `el0t` prefix for EL0 handlers for consistency with `el1h` and `el1t` > * Remove `user_exit_irqoff` macro > * Remove leftover bad_mode() prototype > * Add patch to replace el1_inv() with a direct call to __panic_unhandled() > * Accumulate Reviewed-by tags > * Typo fixes > > [1] https://lore.kernel.org/r/20210510155621.52811-1-mark.rutland@arm.com > [2] https://lore.kernel.org/r/20210519123902.2452-1-mark.rutland@arm.com I've been through the patches and couldn't spot anything wrong, although I had to apply the patches and look at the final result. I also tested it lightly on a few odd machines, and nothing caught fire. So FWIW: Acked-by: Marc Zyngier M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel