Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp931161ybz; Wed, 29 Apr 2020 11:57:45 -0700 (PDT) X-Google-Smtp-Source: APiQypLh9g1YoPipamtEzv5/vETtlPRop8aeoYgf5GSYl/eA+O/OynUU/l8/7FjGL2Xvb+qTHuqd X-Received: by 2002:a17:906:35d0:: with SMTP id p16mr3918497ejb.77.1588186665319; Wed, 29 Apr 2020 11:57:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588186665; cv=none; d=google.com; s=arc-20160816; b=qpPDkFcWOktc0Dv8e7b4fwvyY1xIthw6u6BZ/RBnwqQ3w7fHXZ4xpsmmkj6t/hvrWz zgjyrCbMdQFSE4nxd7t/6tPwwDBrXvoNtA1WbrqIjx1RNqbDezKgbwDPqSJ/Zd8ynbVR eXBhZiV1wek6hB489WczouAw48oJT7IQydvGZD0ww/31fU3jToE2IH/6/108Z6UA8z8v X7YoMgrGzg9P93qdgCYgJGwR1RhktLzySQby1beyJriOf1xwK6QzIHNbolK4+HKxUGxJ /JzPqs3I9CGAb9Vczw3Myb15Wg1NyhIwXwvYgMyliCjE1/KfBk7tPlN/+1liyvfjrbiE k4hQ== 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=IIaLFaQGg2nyuh0QfLxI7tJeBjanOQ/yrgdSNuszGiQ=; b=dXwwjvIonkVkx/yF7nXm3IpzrzwSLOepzFz+OGnHokqIfrQdMrtOOilpJCy8nMKlCI 9HY0XPGzDBjF81jSzotvBWQD24OSvXzh+iX54lrh9N4K2mZKWDQa/XdvtMSqEffdqUfO xHCBcHFl/BCH03SnGH0mUy34ytpHZwUCHwOLDmM4D7SNyTJd+h543Pt9JGFxkSWtE6wW R7LlXZPcEWH8X7HAcMaNWiPSg3wJgysILfBOTAnkUxfFrWrmxE8yZM2fc2WAcktF5/GC Jzam9wjoqeOSC80mdpo/ZkfvPBJZkQyvLpX8gjK4rcTbnB8BngEIVMELmOBF+LvHzKRf cBTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SKyEC1FR; 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 bq14si4202586ejb.42.2020.04.29.11.57.22; Wed, 29 Apr 2020 11:57:45 -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=SKyEC1FR; 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 S1726951AbgD2Szr (ORCPT + 99 others); Wed, 29 Apr 2020 14:55:47 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:21181 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726423AbgD2Szo (ORCPT ); Wed, 29 Apr 2020 14:55:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588186543; 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=IIaLFaQGg2nyuh0QfLxI7tJeBjanOQ/yrgdSNuszGiQ=; b=SKyEC1FRlfusVwFsPB/rgwOCzhCIyR+GDRa07ZEXfXxrsMC3npdMdrdyDM5ecoTCQAoP1F ra+0EZI9CDOoWDx7YOFlNqGvcDqI1PSbrTII6N1lT/UM/S82/+xcEutZbOlvTDo23CmVT0 Z3cf/fvY4JZ2YSMQ1V7zwErftYeTLPA= 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-70-IJS93RWjOvOESnVGsPZDxw-1; Wed, 29 Apr 2020 14:55:40 -0400 X-MC-Unique: IJS93RWjOvOESnVGsPZDxw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 91BFC45F; Wed, 29 Apr 2020 18:55:39 +0000 (UTC) Received: from treble (ovpn-113-19.rdu2.redhat.com [10.10.113.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D84CC600EF; Wed, 29 Apr 2020 18:55:38 +0000 (UTC) Date: Wed, 29 Apr 2020 13:55:36 -0500 From: Josh Poimboeuf To: Arnd Bergmann Cc: Peter Zijlstra , the arch/x86 maintainers , Linux Kernel Mailing List , Kees Cook Subject: Re: Remaining randconfig objtool warnings, linux-next-20200428 Message-ID: <20200429185536.5xshpcwtn4be4llh@treble> References: <20200428161044.caamvx67t2z4t6vd@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200428161044.caamvx67t2z4t6vd@treble> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 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:10:44AM -0500, Josh Poimboeuf wrote: > > ==> build/x86/0xE0F2ACFF_defconfig/log <== > > kernel/time/posix-stubs.o: warning: objtool: __x64_sys_timer_create()+0x23: sibling call from callable instruction with modified stack frame This one is fixed with the following cleanup: From: Josh Poimboeuf Subject: [PATCH] linkage: Convert syscall alias macros to C There's no need to use inline asm to create ELF alias symbols. Annotated C function declarations can be used instead. This also makes the ordering of the ELF symbol table more logical, with the real function now always coming before the aliases. This makes it easier for objtool, objdump and other tools to differentiate them. This fixes the following warning: kernel/time/posix-stubs.o: warning: objtool: __x64_sys_timer_create()+0x23: sibling call from callable instruction with modified stack frame Reported-by: Arnd Bergmann Signed-off-by: Josh Poimboeuf --- include/linux/linkage.h | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/include/linux/linkage.h b/include/linux/linkage.h index d796ec20d114..2d7dd6361f91 100644 --- a/include/linux/linkage.h +++ b/include/linux/linkage.h @@ -22,18 +22,12 @@ #define asmlinkage CPP_ASMLINKAGE #endif -#ifndef cond_syscall -#define cond_syscall(x) asm( \ - ".weak " __stringify(x) "\n\t" \ - ".set " __stringify(x) "," \ - __stringify(sys_ni_syscall)) +#ifndef SYSCALL_ALIAS +#define SYSCALL_ALIAS(alias, name) __alias(name) typeof(name) alias #endif -#ifndef SYSCALL_ALIAS -#define SYSCALL_ALIAS(alias, name) asm( \ - ".globl " __stringify(alias) "\n\t" \ - ".set " __stringify(alias) "," \ - __stringify(name)) +#ifndef cond_syscall +#define cond_syscall(x) __weak SYSCALL_ALIAS(x, sys_ni_syscall) #endif #define __page_aligned_data __section(.data..page_aligned) __aligned(PAGE_SIZE) -- 2.21.1