Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3328570imm; Sun, 14 Oct 2018 17:38:27 -0700 (PDT) X-Google-Smtp-Source: ACcGV602JHzRHhto6nUFfij5zJc7OVq8rSDnvwssDOWMg/ZtD1BALvUEx7EaSyWRf4s73lN5BtSh X-Received: by 2002:a17:902:b212:: with SMTP id t18-v6mr15118906plr.158.1539563907605; Sun, 14 Oct 2018 17:38:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539563907; cv=none; d=google.com; s=arc-20160816; b=Io5KF2Y0U7eLrb77+cLHIyX0MSet20qW+biX2psREh46zCftcV8Fd2oaZ4QKMNlAYN 6BXDD4b7KVOj1j7u93Tec/qGMUwd0gIMAcFxBSqJ8DF+9kEWQTS7i2X5K0gcigBgP8yz 93LiCxOKYrSKjvNOr6v+gEsX4IetLhpAtGSfdMA3O3L/y5BgVyy8rv+hCUCZrq6z1bga z+sCFOsagVjbceLkseNv8lOeSoTDI57iQKYkXVQRkOUtZb2fhrvqzidp0QROIvEEaqrl BAdJ+f9lj81qoOVAh5tb3ptKjdQ9d79Y+7kmVPO6ZrrTC3sDZH8sYo+IXhKLjP/cPozi s7gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=b/Xhw2EK4mi+d59RNeXlr73INQgb0338IFEVhaRhBVU=; b=ea9o7Md8Jf82Ify31ujPoslkXikId6j9nsT01g/MNNtXVSq9KXImoRwDFk5K7RR/vP 3LlDta/UJXr4dS51vSKrdLJIZu1t5cqb+q/gz5WzHp9y9MUu4fj5Lgeks+kzlhzOAuKC 0zQTJGZw8a4w6sXcJiIriwjr6dy16CguYqo88JQ5tFtrXfgG/N7H61+fjuTatxEwBxHU CYD9LxuuumBf3MMR9lmqGLpah/EnfvsSZRxGj8/1ehQ4ev432/y1pRmSvRihhbwEx8Kg ShdONOtBA9n4zh6H58mwFLB4uM/qDvQk56Z/SLnzehT3xEZhoq9ej43lFT78w6zoOGy9 PzVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bjWSTInf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j6-v6si8765916pgb.62.2018.10.14.17.38.10; Sun, 14 Oct 2018 17:38:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bjWSTInf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726463AbeJOIUj (ORCPT + 99 others); Mon, 15 Oct 2018 04:20:39 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:40193 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726186AbeJOIUj (ORCPT ); Mon, 15 Oct 2018 04:20:39 -0400 Received: by mail-pg1-f193.google.com with SMTP id n31-v6so8304930pgm.7 for ; Sun, 14 Oct 2018 17:37:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=b/Xhw2EK4mi+d59RNeXlr73INQgb0338IFEVhaRhBVU=; b=bjWSTInflpJ4vXSG1gpGc3EsEluf5+so9hwwcTwCMK/MJZeZjmCfYcnd0YfeExuyRG lCa2st5Zp1NKjHcBqOMrutc15brV5iq8VJ2PtxPjXAawxffRIThJWqsnJWP6vmrC0ait HS6nESbTlhrnp430Sx+qx6JzD8UxeDJ85hSPBtuO4JB8Vuc5dnFJF8nql/JX57ovDlDT tsL1XAECbl5AilWYka10aweSTWBlTijoHnUSmqrQdPzmIeIGdH+vj39WZ4hy3mxuOQFg cRGxnHE/J3kaWFuLIJNIpKuiqXrU4SEIZI04wFv3z4XLbrauveynBrgfu/tUXz8bdAKm n9mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=b/Xhw2EK4mi+d59RNeXlr73INQgb0338IFEVhaRhBVU=; b=jmwieVPuThnWMN2C6kVWffjHn8EWWj/JDve3P0EoFAjsesKWuaG5sRJKC5Qi8SnYmN VYAyJofo2fPMgzvEn3N3R98YCuYgCNddOlazX6dXDTc0/WtDbmkWGne4uJ5GYUtFV2A/ qPkAKy2dpgIjw47M+VfAFO1q/bSWZosg5Sj9i8VEWsxKhHI8ynE0u5rJU/1zUFEtSCNo FywCnnlEBD5ho7Klz5JCofdMplZykvHKxTwf8o5ocsJlotPQ/kMCzJr1sgQLvKMccM6r 8DZd5RCGa6Akv9XO69EngFVbRaZs/xnIdKdV/3JDLrGuNGklPce2zQcI/q2TSlui0MyU er1w== X-Gm-Message-State: ABuFfoho1yx3jZPulSDiGuFwecb8T1nKA5Nrif5OzWAxV9EZ6l+XLZEy 7fAkHaSxCTx2xkJ28ZLaXbI= X-Received: by 2002:a62:5b43:: with SMTP id p64-v6mr15673839pfb.122.1539563867666; Sun, 14 Oct 2018 17:37:47 -0700 (PDT) Received: from localhost.localdomain (50-197-184-177-static.hfc.comcastbusiness.net. [50.197.184.177]) by smtp.googlemail.com with ESMTPSA id x15-v6sm15489920pfd.27.2018.10.14.17.37.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Oct 2018 17:37:46 -0700 (PDT) From: Nick Desaulniers To: dave.hansen@linux.intel.com, luto@kernel.org, peterz@infradead.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com Cc: natechancellor@gmail.com, Nick Desaulniers , x86@kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] x86/mm: annotate no_context with UNWIND_HINTS Date: Sun, 14 Oct 2018 17:37:26 -0700 Message-Id: <20181015003726.29103-1-nick.desaulniers@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fixes the objtool warning: arch/x86/mm/fault.o: warning: objtool: no_context()+0x220: unreachable instruction Link: https://github.com/ClangBuiltLinux/linux/issues/204 Signed-off-by: Nick Desaulniers --- arch/x86/mm/fault.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index 47bebfe6efa7..057d2178fa19 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c @@ -760,9 +760,11 @@ no_context(struct pt_regs *regs, unsigned long error_code, * and then double-fault, though, because we're likely to * break the console driver and lose most of the stack dump. */ - asm volatile ("movq %[stack], %%rsp\n\t" + asm volatile (UNWIND_HINT_SAVE + "movq %[stack], %%rsp\n\t" "call handle_stack_overflow\n\t" - "1: jmp 1b" + "1: jmp 1b\n\t" + UNWIND_HINT_RESTORE : ASM_CALL_CONSTRAINT : "D" ("kernel stack overflow (page fault)"), "S" (regs), "d" (address), -- 2.17.1