Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp1029185ybm; Tue, 21 May 2019 07:36:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqwSrin0yU3g/fEGj8ZYuxKSzAnNd1Dh0CKxeMmDhPWAbr59cQOwVT69Ku2Bg98sg1gmZXNR X-Received: by 2002:a65:62c4:: with SMTP id m4mr82883452pgv.308.1558449409301; Tue, 21 May 2019 07:36:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558449409; cv=none; d=google.com; s=arc-20160816; b=L9CgwERwilUaW1xo9JcZji3ykfqDmLqV3pUgVzHndeCjf0zs27gomWURNlvufsq8Gq 8q65vC7g++lJTWlm11TuMs7SL4KexDpNUANLr4h2Zl67jYYgH1fuV9SRYGLwgD8UdntX 4tZ4HQbHwNKkk2J32neYDUl1CziHyup0FPfZowlY5Wgsj9sQVHTFfuiKnIHMgA5mc22L MjVV9Khm9tqhFrnab3lWQPjg1GUtYY/I5Ujj+WIx0ymEcxuIeb5CXWxQgQY5UV7jU5DA KkI+PFezzWBM0TlsHYj02QAIk8gcctPI5wZ9OYlWvsKpU+KKfKDbPwp7aPkil4fjUlqs aycw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=1CCkMJJHE568ZAGpLXYRLDptSWkTjXN54uQ/CPdh1a4=; b=KiHxPPPxV/w/p69teWkB5JbIVSWFN8hTGZa67GYIkCf3AzUC0JC3Zwnh+hTkiM5Hxg UX9cVqel8tSV/rl1ryDsTMYHxuBFgadYEgRwd5mYxMfvCu234roBUevBYFyfgRghKJwE 8v93udzZgL1U0rpFPI2HMRpNsnAtiMa2e03Pod4V00WGte4t+sWM1kr4m7oCqUJQCP2K I8ma3mO/meCPEk3AzN/ytsAr/rGrzwaDFNobLxJQrI8OJ2WAisRfbJpcuuDE3sN1MO3z z+jaXcID33JDrE/pIJ72+SQ7rwfF0/D0OmWMozzXah1MQ2qzPGezgeFDEfNyUdzGVfqf TOcA== ARC-Authentication-Results: i=1; mx.google.com; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x68si22572351pfb.3.2019.05.21.07.36.32; Tue, 21 May 2019 07:36:49 -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; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728318AbfEUOe4 (ORCPT + 99 others); Tue, 21 May 2019 10:34:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52452 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726900AbfEUOe4 (ORCPT ); Tue, 21 May 2019 10:34:56 -0400 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 mx1.redhat.com (Postfix) with ESMTPS id EA2627EBC1; Tue, 21 May 2019 14:34:50 +0000 (UTC) Received: from Diego (unknown [10.43.2.54]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CAC371001F5B; Tue, 21 May 2019 14:34:48 +0000 (UTC) Date: Tue, 21 May 2019 16:34:47 +0200 (CEST) From: Michael Petlan X-X-Sender: Michael@Diego To: Arnaldo Carvalho de Melo cc: Vitaly Chikunov , Peter Zijlstra , Ingo Molnar , linux-kernel@vger.kernel.org, Alexander Shishkin , Hendrik Brueckner , Jiri Olsa , Kim Phillips , Namhyung Kim , Ravi Bangoria Subject: Re: [PATCH] perf arm64: Fix mksyscalltbl when system kernel headers are ahead of the kernel In-Reply-To: <20190521132838.GB26253@kernel.org> Message-ID: References: <20190521030203.1447-1-vt@altlinux.org> <20190521132838.GB26253@kernel.org> User-Agent: Alpine 2.20 (LRH 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 21 May 2019 14:34:56 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 21 May 2019, Arnaldo Carvalho de Melo wrote: > Em Tue, May 21, 2019 at 06:02:03AM +0300, Vitaly Chikunov escreveu: > > When a host system has kernel headers that are newer than a compiling > > kernel, mksyscalltbl fails with errors such as: > > > > : In function 'main': > > :271:44: error: '__NR_kexec_file_load' undeclared (first use in this function) > > :271:44: note: each undeclared identifier is reported only once for each function it appears in > > :272:46: error: '__NR_pidfd_send_signal' undeclared (first use in this function) > > :273:43: error: '__NR_io_uring_setup' undeclared (first use in this function) > > :274:43: error: '__NR_io_uring_enter' undeclared (first use in this function) > > :275:46: error: '__NR_io_uring_register' undeclared (first use in this function) > > tools/perf/arch/arm64/entry/syscalls//mksyscalltbl: line 48: /tmp/create-table-xvUQdD: Permission denied > > > > mksyscalltbl is compiled with default host includes, but run with > > It shouldn't :-\ So with this you're making it use the ones shipped in > tools/include? Good, I'll test it, thanks! > > - Arnaldo > I've hit the issue too, this patch fixes it for me. Tested. Michael > > compiling kernel tree includes, causing some syscall numbers being > > undeclared. > > > > Signed-off-by: Vitaly Chikunov > > Cc: Alexander Shishkin > > Cc: Arnaldo Carvalho de Melo > > Cc: Hendrik Brueckner > > Cc: Ingo Molnar > > Cc: Jiri Olsa > > Cc: Kim Phillips > > Cc: Namhyung Kim > > Cc: Peter Zijlstra > > Cc: Ravi Bangoria > > --- > > tools/perf/arch/arm64/entry/syscalls/mksyscalltbl | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl b/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl > > index c88fd32563eb..459469b7222c 100755 > > --- a/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl > > +++ b/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl > > @@ -56,7 +56,7 @@ create_table() > > echo "};" > > } > > > > -$gcc -E -dM -x c $input \ > > +$gcc -E -dM -x c -I $incpath/include/uapi $input \ > > |sed -ne 's/^#define __NR_//p' \ > > |sort -t' ' -k2 -nu \ > > |create_table > > -- > > 2.11.0 > > -- > > - Arnaldo >