Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp4623205ybz; Tue, 28 Apr 2020 15:05:52 -0700 (PDT) X-Google-Smtp-Source: APiQypLSuPuOseJPmYAhvr3f4eu9Y89QBlfYNtGXRtNsa7dVWY9mhUP+QYvo2oWFRXnESutMCYiN X-Received: by 2002:a05:6402:30ae:: with SMTP id df14mr23105587edb.86.1588111552277; Tue, 28 Apr 2020 15:05:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588111552; cv=none; d=google.com; s=arc-20160816; b=l1Aa5IkiuGoogsqr0AH5sXBc91/pm3igyaqcvDPgjs3bW7wQ+yTyjQ+aZhknsfngyG 2318mkEo7JjksvdadmcmDl6S23boZJzTdE9tJDm9KpsrXfbAaUhFzcZKWFufhSfTt7PM e2j+qOrrBdJvvl/MLcud/Kn2VCy2u4jMLkvFbon8j/a7RbVRVFiuKwgCrdredX4O1eB3 InRTHGp7hUI2yxsL1bPVXTVU1nX5zhUPwlte2KVfE2I9jBH33ewPZ9TPsAYdiZmnceVR 1/CW7xeviDxssz8YQEbHR/MIsGzk87MGqbLB/fdllHrQCjf9Qu3ZqK//o5qNCcwRvsvA eKYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=x7LIuqG5wLPYGYdsv6WIaKm1b4GjVIP8EBSVqTIOO84=; b=ClhmBCM9g1dH8sdNqwCgVDHWXr3uvv6pm3qX/lHigdVz0tC69yhPEW6GyJ42xGk5Yd ivCd9FoJIf/ghPOCd3J62YBoBcq4/uoSdCu4npAqRelZujtq8ZUbQ/na409gnVJeIvWK GmMfdrZVOBql5KVRmgE0hV6l9XvO7NP3jdvU+dMAIgyfyRZ3ikRDbmQ0Q9TIJKeRKyZF fJkWlhZ5i10H8/JC0PdexWcZUEYLu0x2e8U/7dmTQw2+cLWyzJeF4ZJz4TC9zEIunX5o c5qln1muZRjIr0mcmNpL0bY935a2UVxsiqAqSF95v9Q7U2qMviWGWrDWR4xGn2iAya1n 58Qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IJgFgIeV; 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 ch6si2219240edb.412.2020.04.28.15.05.28; Tue, 28 Apr 2020 15:05:52 -0700 (PDT) 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=IJgFgIeV; 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 S1726399AbgD1WEB (ORCPT + 99 others); Tue, 28 Apr 2020 18:04:01 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:60622 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725934AbgD1WEB (ORCPT ); Tue, 28 Apr 2020 18:04:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588111439; 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=x7LIuqG5wLPYGYdsv6WIaKm1b4GjVIP8EBSVqTIOO84=; b=IJgFgIeVxUocrbnUM2JiXj5IidZsWXhZrs29u/cwSIs88Dy+bJzJKBagOEVoPqbRf4QGD9 AobWRtB9CGfGitGanKy+qGXaoLLjLru9jcpFNDp6e/izQ7ZfPLXsdFr5LM8pk4EsJtjiPG iumLlpUYG36orOqrpuiEVAMo6+71Ds8= 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-506-wirY215KMxSdU-8uPhbOsg-1; Tue, 28 Apr 2020 18:03:57 -0400 X-MC-Unique: wirY215KMxSdU-8uPhbOsg-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 570FB1858E2D; Tue, 28 Apr 2020 22:03:56 +0000 (UTC) Received: from treble (ovpn-112-209.rdu2.redhat.com [10.10.112.209]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A65BA1002396; Tue, 28 Apr 2020 22:03:55 +0000 (UTC) Date: Tue, 28 Apr 2020 17:03:53 -0500 From: Josh Poimboeuf To: Peter Zijlstra Cc: Arnd Bergmann , the arch/x86 maintainers , Linux Kernel Mailing List , Kees Cook Subject: Re: Remaining randconfig objtool warnings, linux-next-20200428 Message-ID: <20200428220353.uepo455bj76sym4k@treble> References: <20200428161044.caamvx67t2z4t6vd@treble> <20200428203855.zapf6jhcp6mbft7i@treble> <20200428215554.GA16027@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200428215554.GA16027@hirez.programming.kicks-ass.net> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 28, 2020 at 11:55:54PM +0200, Peter Zijlstra wrote: > On Tue, Apr 28, 2020 at 03:38:55PM -0500, Josh Poimboeuf wrote: > > This one makes no sense to me. It looks like the assembler is inserting > > a jump as part of the alignment padding??? WTH. > > > > 0000000000000980 : > > 980: 48 83 04 24 80 addq $0xffffffffffffff80,(%rsp) > > 985: e8 00 00 00 00 callq 98a > > 986: R_X86_64_PLT32 interrupt_entry-0x4 > > 98a: e8 00 00 00 00 callq 98f > > 98b: R_X86_64_PLT32 smp_spurious_interrupt-0x4 > > 98f: eb 7e jmp a0f > > 991: eb 6d jmp a00 > > 993: 66 66 2e 0f 1f 84 00 data16 nopw %cs:0x0(%rax,%rax,1) > > 99a: 00 00 00 00 > > 99e: 66 66 2e 0f 1f 84 00 data16 nopw %cs:0x0(%rax,%rax,1) > > 9a5: 00 00 00 00 > > 9a9: 66 66 2e 0f 1f 84 00 data16 nopw %cs:0x0(%rax,%rax,1) > > 9b0: 00 00 00 00 > > 9b4: 66 66 2e 0f 1f 84 00 data16 nopw %cs:0x0(%rax,%rax,1) > > 9bb: 00 00 00 00 > > 9bf: 66 66 2e 0f 1f 84 00 data16 nopw %cs:0x0(%rax,%rax,1) > > 9c6: 00 00 00 00 > > 9ca: 66 66 2e 0f 1f 84 00 data16 nopw %cs:0x0(%rax,%rax,1) > > 9d1: 00 00 00 00 > > 9d5: 66 66 2e 0f 1f 84 00 data16 nopw %cs:0x0(%rax,%rax,1) > > 9dc: 00 00 00 00 > > 9e0: 66 66 2e 0f 1f 84 00 data16 nopw %cs:0x0(%rax,%rax,1) > > 9e7: 00 00 00 00 > > 9eb: 66 66 2e 0f 1f 84 00 data16 nopw %cs:0x0(%rax,%rax,1) > > 9f2: 00 00 00 00 > > 9f6: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) > > 9fd: 00 00 00 > > binutils.git/gas/configure/tc-i386.c:i386_generate_nops > > When there's too many NOPs (as here) it generates a JMP across the NOPS. > It makes some sort of sense, at some point executing NOPs is going to be > more expensive than a branch.. But shees.. Urgh. Even if I tell it specifically to pad with NOPs, it still does this "trick". I have no idea how to deal with this in objtool. -- Josh