Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp7485945pxb; Thu, 18 Feb 2021 11:16:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJwH6BbsmeRysHHgv+Gog5gb6a2QfjtiDyD0WwAXSoiKpXZvwltW+wWt0h8ZvOzdB3WjJ8dN X-Received: by 2002:a17:906:63c2:: with SMTP id u2mr5368998ejk.346.1613675816093; Thu, 18 Feb 2021 11:16:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613675816; cv=none; d=google.com; s=arc-20160816; b=Auh/f5jmSJGXLzwg/UBspRuQ8+gKZDIaXa4DTZEdD7fMUBdA5c7m6Vt/RjaMgWNKJP mIDHTTwyC4+cpvh6+5TqNeolSK9orTuQiMLWG2KpXJYc1GsohpZjQQemEf8kT4LHAUN+ NdOoUhpqml9v01gUhj4bJkPmcHgz+Y5xmBhBTNwzWg4GSBDSCV7jGcFmbmQ0fK1ItnUj Tbd1wFNxMXv0v8I8wVgKuDNy1x7uz54h6/1NFaNj7ddVHGk9gSmlleyI1JfluAc+DgX/ jjYEchmzkisL5SeolhPY4WC6mqoNUf3Kln3YsXC1781fDzvfazRSUaD3aBmDmk+7/wZV J8YQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=VW1Q2+1iFqoUfBSiPmkrPPSwmqMxBigF4EWYAHJxNqQ=; b=ZJ9lrbgJPmOVdBo64an/SooSsCrKMucyBUl4Vv+wigMu88NhVmUTaFsKIfLsN+sYnm vzcP6hnM0Y7xzeUSN5UEAupfzsKp3f9qml6sfoYazjN42SxxlHAB3KkzvPYzDPJTRs6d Qr4MCRh1ryER3Jgh4thS84H4ElnGZSun0cCqAMDcu9lHCe8eNxLQ6GLT/f1tiQ0/U3s0 v2tlwFEt95GGETV5PVoBsLurG38dEPD0c4Uad/eQfNEJO/eFYJlzG5oNmRy7f0itopSP 8gKg+IhzGLY0zF1IvzqbIMOlZL6+2IKdCtJfFtfuC7wniv+TVICH5zOdzMHIUNVZ9jcP BkRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YS35kkYs; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bi3si4240608ejb.623.2021.02.18.11.16.13; Thu, 18 Feb 2021 11:16:56 -0800 (PST) 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=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YS35kkYs; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234094AbhBRTP0 (ORCPT + 99 others); Thu, 18 Feb 2021 14:15:26 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:40879 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232704AbhBRRy4 (ORCPT ); Thu, 18 Feb 2021 12:54:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613670800; 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=VW1Q2+1iFqoUfBSiPmkrPPSwmqMxBigF4EWYAHJxNqQ=; b=YS35kkYs/EUSHvCjmHkH/QG4ZJD3xWMYVD0duEG1bDbzh01s0T/B6thvnjfHgpu4AlMsge OELsykKPSn62+BqVyDwWORWoOrKSijGEFix5Kqq5TwpMa1llLckLmnuxW7Ndsrjw0hlCTW 6IhP2P+ln1KoqSMBwSv3omSlaALunZ8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-35-3DI1ck2FMbiiqnThmWtm7Q-1; Thu, 18 Feb 2021 12:53:18 -0500 X-MC-Unique: 3DI1ck2FMbiiqnThmWtm7Q-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 665F96D4E6; Thu, 18 Feb 2021 17:53:17 +0000 (UTC) Received: from treble (ovpn-117-118.rdu2.redhat.com [10.10.117.118]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B85F210023B8; Thu, 18 Feb 2021 17:53:16 +0000 (UTC) Date: Thu, 18 Feb 2021 11:53:14 -0600 From: Josh Poimboeuf To: Peter Zijlstra Cc: linux-kernel@vger.kernel.org, linux-tip-commits@vger.kernel.org, Miroslav Benes , x86@kernel.org Subject: Re: [PATCH] objtool: Fix stack-swizzle for FRAME_POINTER=y Message-ID: <20210218175314.sdrkb3272bzezw3b@treble> References: <161298728344.23325.15458416903870844675.tip-bot2@tip-bot2> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 18, 2021 at 05:21:31PM +0100, Peter Zijlstra wrote: > On Wed, Feb 10, 2021 at 08:01:23PM -0000, tip-bot2 for Peter Zijlstra wrote: > > objtool: Support stack-swizzle > > --- > Subject: objtool: Fix stack-swizzle for FRAME_POINTER=y > From: Peter Zijlstra > Date: Thu Feb 18 17:14:10 CET 2021 > > When objtool encounters the stack-swizzle: > > mov %rsp, (%[tos]) > mov %[tos], %rsp > ... > pop %rsp > > Inside a FRAME_POINTER=y build, things go a little screwy because > clearly we're not adjusting the cfa->base. This then results in the > pop %rsp not being detected as a restore of cfa->base so it will turn > into a regular POP and offset the stack, resulting in: > > kernel/softirq.o: warning: objtool: do_softirq()+0xdb: return with modified stack frame > > Therefore, have "mov %[tos], %rsp" act like a PUSH (it sorta is > anyway) to balance the things out. We're not too concerned with the > actual stack_size for frame-pointer builds, since we don't generate > ORC data for them anyway. > > Fixes: aafeb14e9da2 ("objtool: Support stack-swizzle") > Reported-by: kernel test robot > Signed-off-by: Peter Zijlstra (Intel) Acked-by: Josh Poimboeuf -- Josh