Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4188550imm; Fri, 18 May 2018 00:25:50 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoiQQ3flRdR6WagGKzQ4XIsRcOd+sFNkPVt2MePwLTf1cTn80LdsV+QCiIcpcoUMoP55Iiy X-Received: by 2002:a63:4383:: with SMTP id q125-v6mr6690261pga.412.1526628350614; Fri, 18 May 2018 00:25:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526628350; cv=none; d=google.com; s=arc-20160816; b=cOGFlKmyJ9CV2lnkmGo0dW1XG2MgErdKtE5CpDYMGpomtOZZ0bumt4QMtOT1aMOPyi FMufGYqGjp42HuWkNX8SK5sFQirvvrihqN9rx0Xjc5CBhr/odtlOB4ux3YOAnglLxY2S UH4xkz2vAJyrxHg0noYrlwwBSBomFCN/glbCigtSq6lGDfz+OGgxOuRGJ8JefXK4Na4I AqeVk+O0jUpyLH7krndrpBIv2RDTIQ3v8dgv1LsRcREVMpHTKmpZpY+FSr5qm9cSTgTw MsPfPbdJnPD/YlbxYcF2Pb44TLmgcTFvpe3opmnDKEy5MKgicKufxFBY1+nN64a+dji9 etxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=2vLZn5LKFEcTKFWBzlPKvkgT6SFZk0VJ+twotM3khbM=; b=kxgi0njvWWF5ENf6aTZU6wPlDSxfB0g1Vn1SKQaK4DQgjCoZihJOszrpydPM5eOD4U AJnD4PMya+c025+E/JtAUyR9/Gp56cJVOWb0tHWQYPe/OVpBiNL0sziehGxqRYt1jSH1 JBRnWDCHaCzF5gWQPkXCh+EX5JjmPDw3eUaU+5VShxrZFmw8tq/yMMcSzHP4fLphiGJW ghI2qq8+hFuBr394KdRSH6srom4HVTsryUQ6jj5XNhjb8/UNOag+g95NRlQ0BnP11U1q G3Vy2qJ9b2H3hvjxRZOONnUDar3kG8oHd3UATTvSwrsLJHWVY7imO+FnZB80vkbrwqp+ l3JQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Ct4b02QD; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c12-v6si6964868plr.467.2018.05.18.00.25.35; Fri, 18 May 2018 00:25:50 -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=fail header.i=@gmail.com header.s=20161025 header.b=Ct4b02QD; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752095AbeERHYS (ORCPT + 99 others); Fri, 18 May 2018 03:24:18 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:34393 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751320AbeERHYQ (ORCPT ); Fri, 18 May 2018 03:24:16 -0400 Received: by mail-wm0-f67.google.com with SMTP id a137-v6so2323978wme.1 for ; Fri, 18 May 2018 00:24:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=2vLZn5LKFEcTKFWBzlPKvkgT6SFZk0VJ+twotM3khbM=; b=Ct4b02QD8+YbpdNParXniOg0oetOJsA+9IUNJ1NGWKetGK/GcwyYnidgZRX+TNfopH HYY6je5wUW3OFy5F0k4XIpR1dPbNgdw7+yl6Qh5GFVMM3oBYlm+yOqImR8x+M1CpxYMD 32ReexvJyMW11rI4oNwx/4CUdn/tYtXFu5Hti74K16p3H2hV/yxeL5g0BrpCzBSFaI+n +7TtEBgsPAIgFCa5vihWH5Vv0WhdMJ63Z+DQrDkN6lsFenNxPJh0MPwaS79CO7QMHrwE 6cpglyZZ+F4ecsuT6aLsVaqs1iZZURYVl+1XKS9FVgvN0AVqLpzdPn9AB7sB1ollU+Lz 5rDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=2vLZn5LKFEcTKFWBzlPKvkgT6SFZk0VJ+twotM3khbM=; b=KUclJTxlSLr/EjEstsTiS8a0Efg4LFrgh9CxSHNYEiWthovrwg+XHMKHag4nkbwm8I vrBsV1ON+hzGZW0k8QVaaOQVbcjQ2Szu+jc082CrVTXvBdLEkikjdvynen+/oZEs4lBK KhY2nvKuJlKbn5ioxSuhas57rb7S6l/sKrnwOLuiNcwPFZ30w31pn/v1lNxWF5BQ48+1 xvg0wjc+nx/MuxGQ3R8uwfxtNuRc2rejA7baKmtkh82uYXf/H6lto8ayWCFhI8UbNdhl mx1s5xHTLEun4H1J0fyOiZ4bcfW8uOCKMO1Sc8pXnxieGlEEKspxuINC3EboRjxBXW6u BYsQ== X-Gm-Message-State: ALKqPwdj5i0UlWsGbPg7wymnJH+O+YauQSfVt0ptPGZkqpkf5auJCpNc tiMJy6zWy14cReHsjPmZ6Pw= X-Received: by 2002:a1c:a84d:: with SMTP id r74-v6mr3940188wme.114.1526628255513; Fri, 18 May 2018 00:24:15 -0700 (PDT) Received: from gmail.com (2E8B0CD5.catv.pool.telekom.hu. [46.139.12.213]) by smtp.gmail.com with ESMTPSA id g127-v6sm6009246wmf.42.2018.05.18.00.24.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 18 May 2018 00:24:14 -0700 (PDT) Date: Fri, 18 May 2018 09:24:12 +0200 From: Ingo Molnar To: Peter Zijlstra Cc: Josh Poimboeuf , Linus Torvalds , Alexey Dobriyan , Peter Anvin , kernel test robot , Thomas Gleixner , Andrew Lutomirski , Borislav Petkov , Brian Gerst , Denys Vlasenko , Linux Kernel Mailing List , Peter Anvin , tipbuild@zytor.com, LKP Subject: Re: [PATCH] objtool: Detect assembly code falling through to INT3 padding Message-ID: <20180518072412.GC26358@gmail.com> References: <20180515214337.GA18021@avx2> <20180515222211.ods5hzne46hozojq@treble> <20180515224354.zmygmsnlqj5lrdbo@treble> <20180516033044.odb74pdgcn5nacwb@treble> <20180517134934.eog2fgoby5azq5a7@treble> <20180517140118.GT12217@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180517140118.GT12217@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Peter Zijlstra wrote: > On Thu, May 17, 2018 at 08:49:34AM -0500, Josh Poimboeuf wrote: > > With the following commit: > > > > 51bad67ffbce ("x86/asm: Pad assembly functions with INT3 instructions") > > > > ... asm function alignments are padded with INT3, so it's no longer safe > > to fall through to an aligned function. Make sure we catch any such > > cases with objtool. > > > > Note this only adds checking for 64-bit, since objtool doesn't support > > x86-32. > > > > Suggested-by: Thomas Gleixner > > Suggested-by: Linus Torvalds > > Signed-off-by: Josh Poimboeuf > > --- > > arch/x86/kernel/head_64.S | 2 -- > > tools/objtool/arch.h | 3 ++- > > tools/objtool/arch/x86/decode.c | 2 +- > > tools/objtool/check.c | 11 ++++++++++- > > 4 files changed, 13 insertions(+), 5 deletions(-) > > > > diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S > > index 8344dd2f310a..3ed8cec6e765 100644 > > --- a/arch/x86/kernel/head_64.S > > +++ b/arch/x86/kernel/head_64.S > > @@ -285,11 +285,9 @@ ENTRY(early_idt_handler_array) > > .endif > > pushq $i # 72(%rsp) Vector number > > jmp early_idt_handler_common > > - UNWIND_HINT_IRET_REGS > > i = i + 1 > > .fill early_idt_handler_array + i*EARLY_IDT_HANDLER_SIZE - ., 1, 0xcc > > .endr > > - UNWIND_HINT_IRET_REGS offset=16 > > END(early_idt_handler_array) > > > > early_idt_handler_common: > > As noted on IRC; I got slightly confused what this was about. > > Other than that: > > Acked-by: Peter Zijlstra (Intel) And after talking to you on IRC I added this paragraph to the changelog: Also remove incorrect and unnecessary unwinder hints from head_64.S which caused false positives in the new detection code. Thanks, Ingo