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 486C9C433EF for ; Mon, 18 Apr 2022 16:13:16 +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=x/UwH9sHU7CJ/K6iex6Iq8fNDcNLr+A6wK/XzUMpGKg=; b=a1Q0h6NwqoSS8S qoxlO7v/At0QGCMYWhhkgC/MgEFt4UFCugSoeXW/jhDL0j0Zh6nMAAAM0lAKcLR0UvFN5BDuXkkb8 beiinJW83nt08wyxuvckGeCDbNk9Ok8XxtmByGKH3ljb+NuoAH/8efzZJd5Jz1FuYmM4eahfWEOLy lcz9MUS1u00R5GgrAnwsb2wNGC159KaTbvTj+oNHr50k4PocUmqDq4i77ChPuoYJdnTW1sEmn7zl3 yDOfNqRZ9r/TA7ozUrQavFVspQhueJyLB297Qc7N7w2ReaXDG43IIwMVOGgdB2eb9b/mtG3zNP8OK aZBlpvcBzTi3/rH6aRWA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ngTyn-00011O-Nc; Mon, 18 Apr 2022 16:11:57 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ngTyj-00010N-UQ for linux-arm-kernel@lists.infradead.org; Mon, 18 Apr 2022 16:11:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1650298311; h=from:from:reply-to:subject:subject: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=kc5lp6HIebTiS6SD8VstSYY5zjx55zGLVR2F4cO28oE=; b=gap4FhvDjj0FuDlD/SZTbQghQXPHQWb27+qCmCrG9L6EQy7idJcjEFFuC7EZnMO1v4Mi0O nzKMKk4pqAUlJfdopSpafYOTy9EvqAsCkkT74Tu4TuBMJOO3F5ZdtCtmw5djaGqgXzoRML bhPCNi4+Z7uEOPVb5h5Ntl5bs5PytCI= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-355-CdGPRA86OmiEVMUeDyXp-w-1; Mon, 18 Apr 2022 12:11:49 -0400 X-MC-Unique: CdGPRA86OmiEVMUeDyXp-w-1 Received: by mail-qv1-f72.google.com with SMTP id a3-20020a056214062300b00443cd6175c8so12528034qvx.4 for ; Mon, 18 Apr 2022 09:11:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=kc5lp6HIebTiS6SD8VstSYY5zjx55zGLVR2F4cO28oE=; b=ibJ7QEwi8smFJHS950sDW7h8e69lnuBXGnYDck3bXcglAWAzjRX+k81NYP5aS8G732 uSfobg9Osls6teVpWmibKiR3QsfQjg2x3BvEZTp+JPZ7QSruUxedoJMG6or9wnv1N1a3 VAwqNplfAnVVok83wGT3e1Sfal+87/378GPY06gHwt8kGjrevmudveCTkF6iiTZtQJZs 47h4Mbe6nOIpA9N9rbcxfDRT9a3niDOwVJXTjWGpY9Jg3HPOH/Mc33Y8q0tzPCDtjt1+ WUwQKIYmoH+vWEQLzNh+RiQMYrhSze4Q/CZ+/jB3cimkoz2QaJ9NnpXq5pAMYfjweUS9 aQ2Q== X-Gm-Message-State: AOAM530+9VwZ0167A5PhseeEDn3Qiqyg+51PqqW1JfIEkpSS0JDzm4vr XBehS78ZDR85RrqWYLPIIVLkXlDOsE8QkUjw7lCMewvUvNyKV7wdrHjSzmjc6DnEjUM7nBD9N7b gEAm0wn6Tz6AEZ5+eFWntrCyq9Omm+CBuYlY= X-Received: by 2002:a05:622a:1c0d:b0:2ed:1335:97ba with SMTP id bq13-20020a05622a1c0d00b002ed133597bamr7409400qtb.485.1650298309246; Mon, 18 Apr 2022 09:11:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpxyZFBVbqcMwvi9NQe9+Q4Yv/Ps3/MmukjEwG1VNQ8GX8Sud2aR+UhEWRMYin6uluXw4eWA== X-Received: by 2002:a05:622a:1c0d:b0:2ed:1335:97ba with SMTP id bq13-20020a05622a1c0d00b002ed133597bamr7409371qtb.485.1650298308929; Mon, 18 Apr 2022 09:11:48 -0700 (PDT) Received: from treble ([2600:1700:6e32:6c00::35]) by smtp.gmail.com with ESMTPSA id w14-20020ac857ce000000b002f1ccd62225sm8537050qta.79.2022.04.18.09.11.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Apr 2022 09:11:48 -0700 (PDT) Date: Mon, 18 Apr 2022 09:11:45 -0700 From: Josh Poimboeuf To: Chen Zhongjin Cc: "Madhavan T. Venkataraman" , mark.rutland@arm.com, broonie@kernel.org, ardb@kernel.org, nobuta.keiya@fujitsu.com, sjitindarsingh@gmail.com, catalin.marinas@arm.com, will@kernel.org, jmorris@namei.org, linux-arm-kernel@lists.infradead.org, live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH v1 0/9] arm64: livepatch: Use DWARF Call Frame Information for frame pointer validation Message-ID: <20220418161145.hj3ahxqjdgqd3qn2@treble> References: <95691cae4f4504f33d0fc9075541b1e7deefe96f> <20220407202518.19780-1-madvenka@linux.microsoft.com> <20220408002147.pk7clzruj6sawj7z@treble> <15a22f4b-f04a-15e1-8f54-5b3147d8df7d@linux.microsoft.com> <35c99466-9024-a7fd-9632-5d21b3e558f7@huawei.com> <20220416005609.3znhltjlhpg475ff@treble> <0abfa1af-81ec-9048-6f95-cf5dda295139@huawei.com> MIME-Version: 1.0 In-Reply-To: <0abfa1af-81ec-9048-6f95-cf5dda295139@huawei.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jpoimboe@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220418_091154_094614_99AD8B06 X-CRM114-Status: GOOD ( 14.02 ) 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 Mon, Apr 18, 2022 at 08:28:33PM +0800, Chen Zhongjin wrote: > Hi Josh, > > IIUC, ORC on x86 can make reliable stack unwind for this scenario > because objtool validates BP state. > > I'm thinking that on arm64 there's no guarantee that LR will be pushed > onto stack. When we meet similar scenario on arm64, we should recover > (LR, FP) on pt_regs and continue to unwind the stack. And this is > reliable only after we validate (LR, FP). > > So should we track LR on arm64 additionally as track BP on x86? Or can > we just treat (LR, FP) as a pair? because as I know they are always set > up together. Does the arm64 unwinder have a way to detect kernel pt_regs on the stack? If so, the simplest solution is to mark all stacks with kernel regs as unreliable. That's what the x86 FP unwinder does. -- Josh _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel