Received: by 10.192.165.148 with SMTP id m20csp4369874imm; Tue, 8 May 2018 07:26:06 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpWSOpF7mRfQk7huF/Lgld9somEiyRhmnAjJlFAhE5tityQKHG7TCO9wH0H2+EsRMSrmlHk X-Received: by 2002:a63:730c:: with SMTP id o12-v6mr32769307pgc.1.1525789566932; Tue, 08 May 2018 07:26:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525789566; cv=none; d=google.com; s=arc-20160816; b=ZXZue6aK6Cy7/5NP6pucT8uOt67iAvLoY7RbHw8AO5aJe7X5HsPNTO26EISaPD7N6F /42f6D7DV2Sr1jilPFtgTM76H+H4Kl8389jODSaOWWlNPmDKH0O8+G2rKCaos0S+IdhQ e2PoNofRzPt5YWjxqs1WBrPIMs1Uy+1NVlF+6sel7wjuOsqU4stJkDsEiWDF1imI9A6F 3qKudQ5/N/STjXky4e8Hf1ThrAuZfJLwGWUm3ufTN3q+OG+EcH6sOwQS0nco4Y3TEPox 71xudOCRBFViXwN2ni51xzzvIGRmv4OVCwBnJ7XK+RJAiIhRMgDGGJIqVh5zOYNtrt5L JHUA== 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=WsaokcjzNQBnyHg/fEzL9Bxj9ynl/5hJXJxkTCxBg/A=; b=zCMP6PotvgM4sjhRISXXormaII4RhoBCcjtpPj2evWFXMWw94b2LQqZz1cGPY1IqHb v8+VyGqdr3lVZfLm2GGtSDSeuAD4lzjYOVA2UcCgKdMbblda0jNnYsJKSgc7dme5zxsY V4SBOBnedH0fOIuqT9PF4l/jFh1bnPGErJM6BL8WXagWdDNjRWVOt8xe9dwq5cYk1tRI sYp6UnO5kQO9ukM7o1M7tmZjOifDGigAi2bAU1h1TyeIxFmp6A/SfKjQtQZ8AowpNjIg dRb41j8oERI9e94cS5uNudrCCuScPQbr5rJSxVDATpaji+dLYNywnJH8dcfGrRBx6Eer ObXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hp0mTONm; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f2-v6si25418105pli.569.2018.05.08.07.25.52; Tue, 08 May 2018 07:26:06 -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=@kernel.org header.s=default header.b=hp0mTONm; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932531AbeEHOZb (ORCPT + 99 others); Tue, 8 May 2018 10:25:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:45450 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932375AbeEHOZ3 (ORCPT ); Tue, 8 May 2018 10:25:29 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F23E721747; Tue, 8 May 2018 14:25:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1525789528; bh=ZmWg/v9uGqt7cBK1YuoOg9IiBAOnKICVT6dCsTlHFW8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hp0mTONmnzuynM4tDiKewk/PfNcJBU6FC0cargfDzQos2m5GQTenpRdPcJiF/4dHP xJxrYdwbxsZ83JWQjN9kBjO5gxqIo0w+dpNrlMAbxz7f2FSje1FGDHQ8Ye7xJ4DS82 nqE5W+U0CShVBBXzECcR+hdM4RLSb99izzIwKl5E= Date: Tue, 8 May 2018 16:25:15 +0200 From: Greg KH To: Josh Poimboeuf Cc: damian , peterz@infradead.org, linux-kernel@vger.kernel.org Subject: Re: Kernel build with gcc 8 a lot of warnings Message-ID: <20180508142515.GA16111@kroah.com> References: <20180505192112.GA18728@zrhn9910b> <20180507045453.leou4zypnlcck4vr@treble> <20180508055126.GA18724@kroah.com> <20180508133226.uwjbx44fwlxgyzu5@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180508133226.uwjbx44fwlxgyzu5@treble> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 08, 2018 at 08:34:47AM -0500, Josh Poimboeuf wrote: > On Tue, May 08, 2018 at 07:51:26AM +0200, Greg KH wrote: > > On Sun, May 06, 2018 at 11:54:53PM -0500, Josh Poimboeuf wrote: > > > On Sat, May 05, 2018 at 09:21:12PM +0200, damian wrote: > > > > Helllo together, > > > > > > > > Hello everybody, > > > > > > > > is something special to note when kernel build with gcc 8? I receive various warnings from the objtool: > > > > With GCC 7 works all fine. > > > > > > > > kernel/cgroup/cgroup.o: warning: objtool: parse_cgroup_root_flags()+0x40: sibling call from callable instruction with modified stack frame > > > > kernel/cgroup/cgroup.o: warning: objtool: cgroup_addrm_files()+0x2a3: sibling call from callable instruction with modified stack frame > > > > kernel/cgroup/cgroup.o: warning: objtool: cgroup_apply_control_enable()+0x20b: sibling call from callable instruction with modified stack frame > > > > kernel/cgroup/cgroup.o: warning: objtool: rebind_subsystems()+0x296: sibling call from callable instruction with modified stack frame > > > > kernel/cgroup/cgroup.o: warning: objtool: cgroup_sk_alloc_disable()+0x10: sibling call from callable instruction with modified stack frame > > > > kernel/cgroup/cgroup.o: warning: objtool: parse_cgroup_root_flags.cold.45()+0xa: call without frame pointer save/setup > > > > kernel/cgroup/cgroup.o: warning: objtool: cgroup_addrm_files.cold.46()+0x17: call without frame pointer save/setup > > > > kernel/cgroup/cgroup.o: warning: objtool: cgroup_apply_control_enable.cold.47()+0x24: call without frame pointer save/setup > > > > kernel/cgroup/cgroup.o: warning: objtool: rebind_subsystems.cold.48()+0x10: call without frame pointer save/setup > > > > kernel/cgroup/cgroup.o: warning: objtool: cgroup_sk_alloc_disable.cold.49()+0x7: call without frame pointer save/setup > > > > CC kernel/cgroup/stat.o > > > > CC [M] arch/x86/kvm/../../../virt/kvm/kvm_main.o > > > > arch/x86/kernel/acpi/boot.o: warning: objtool: acpi_register_lapic()+0x10: sibling call from callable instruction with modified stack frame > > > > arch/x86/kernel/acpi/boot.o: warning: objtool: acpi_map_cpu()+0x2c: sibling call from callable instruction with modified stack frame > > > > arch/x86/kernel/acpi/boot.o: warning: objtool: acpi_register_lapic.cold.6()+0x7: call without frame pointer save/setup > > > > arch/x86/kernel/acpi/boot.o: warning: objtool: acpi_map_cpu.cold.7()+0x7: call without frame pointer save/setup > > > > > > Thanks, this is a known issue with GCC 8 that I haven't gotten a chance > > > to fix yet. They're related to the fact that GCC 8 is splitting out > > > 'unlikely' code into 'cold' subfunctions in .text.unlikely. > > > > > > I've got some old patches that fix it. Now that GCC 8 is out, I'll need > > > get the patches dusted off and cleaned up for merging. > > > > Any pointers to these patches? Archi linux just changed their default > > compiler to gcc 8 and now I'm seeing this in my local builds :( > > I'm still dusting the code off, but this fixes most of the warnings. > The rest of the code should hopefully be ready soon. > > From: Josh Poimboeuf > Subject: [PATCH] objtool: Detect GCC 8 cold subfunctions > > GCC 8 moves a lot of unlikely code out of line to "cold" subfunctions in > .text.unlikely. Properly detect the new subfunctions and treat them as > extensions of the original functions. > > This fixes a bunch of warnings like: > > kernel/cgroup/cgroup.o: warning: objtool: parse_cgroup_root_flags()+0x33: sibling call from callable instruction with modified stack frame > kernel/cgroup/cgroup.o: warning: objtool: cgroup_addrm_files()+0x290: sibling call from callable instruction with modified stack frame > kernel/cgroup/cgroup.o: warning: objtool: cgroup_apply_control_enable()+0x25b: sibling call from callable instruction with modified stack frame > kernel/cgroup/cgroup.o: warning: objtool: rebind_subsystems()+0x325: sibling call from callable instruction with modified stack frame > > Reported-by: Arnd Bergmann > Signed-off-by: Josh Poimboeuf > --- > tools/objtool/check.c | 7 ++++--- > tools/objtool/elf.c | 3 +++ > tools/objtool/elf.h | 1 + > 3 files changed, 8 insertions(+), 3 deletions(-) Much nicer, thanks for the patch, seems to build things "quieter" now. For the other warnings, they are "safe" to ignore, right? It's just objtool checking to see if all is ok, but the result should be fine no matter what, right? thanks, greg k-h