Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp1422261ybm; Tue, 21 May 2019 13:54:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqxuMVrNIfdztjN/AV6NCwdpXv+PGrS673PDLv/V8OKCHETndMyWybHfJkN2gw5zadf0Ljpl X-Received: by 2002:a63:7:: with SMTP id 7mr86034529pga.108.1558472088096; Tue, 21 May 2019 13:54:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558472088; cv=none; d=google.com; s=arc-20160816; b=gCD8bLzTgfuNUTzGy96HksnnoO2xggFJZ7gyJlFX4Ig5owAk8eFrgssvhNKc2ugFUf Y6kHrcUtFNlsTjqH2283g3VUGp5KDZxP7YjVK45tDnLseA9l5k18pWxXrWbQ6RGpoAnH LWavMEl51TP6vmtyjIbu6aPIi/ViwmANh/6CLQjmEWOe5OvxG/BaPmQNiSOv5wt1yZSS Aa0DNrTeeoXdk6hXbl9AsVEBnghJuzJwudbqJQfVf9gn9+eVktpKOTnH9BiJo5iZMv+d YW3oBU0RKZrfLsTNv6PQlgeDKNrgoauAyn23Oe4ewd/jNO1BvmjVKq33ff2xrkZ8/+Ab 4wOQ== 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:mail-followup-to :message-id:subject:cc:to:from:date; bh=mx52k4g/w+QRGVMu89wLxN4iYY68G1wfYqLvshV9wpk=; b=KmzwQQ7aqCnU5+o/uuhN13IukpeQ91cGiV0QvsxqbDA+mSgDvMEy0Jwt1jXc/IE5MH suwidcsZRoMt9m+0i27Ji/X46SpNotY8tnJE68pdRh8apKGFqBRB2ZC2YTPlNOUnHEzs 7EHoPuimuSLXKqeMJDjUUG5X1NBXm3pQLiel12TEo4bRooBeYdzGa51jUSM+ug10b6KE YHSS0OmHZRK5W1gRCm0xDRaiuaY/MUtkw+51DCm+GAuskTfeZbJuhvpWupNN6EeICXsv C0H0VDPJPujlAHS3whREl9lzVq3gLShDCLuXpvYY0pl87fCdoOeCAx76tkR3vze5uM2P 3wZQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 205si24941834pfw.107.2019.05.21.13.54.33; Tue, 21 May 2019 13:54:48 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728031AbfEUUx0 (ORCPT + 99 others); Tue, 21 May 2019 16:53:26 -0400 Received: from vmicros1.altlinux.org ([194.107.17.57]:54526 "EHLO vmicros1.altlinux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727981AbfEUUxZ (ORCPT ); Tue, 21 May 2019 16:53:25 -0400 Received: from imap.altlinux.org (imap.altlinux.org [194.107.17.38]) by vmicros1.altlinux.org (Postfix) with ESMTP id 2406172CCD5; Tue, 21 May 2019 23:53:24 +0300 (MSK) Received: from altlinux.org (sole.flsd.net [185.75.180.6]) by imap.altlinux.org (Postfix) with ESMTPSA id F14024A4A14; Tue, 21 May 2019 23:53:23 +0300 (MSK) Date: Tue, 21 May 2019 23:53:23 +0300 From: Vitaly Chikunov To: Arnaldo Carvalho de Melo Cc: Michael Petlan , 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 Message-ID: <20190521205322.pasqqgpaaxjx7buy@altlinux.org> Mail-Followup-To: Arnaldo Carvalho de Melo , Michael Petlan , Peter Zijlstra , Ingo Molnar , linux-kernel@vger.kernel.org, Alexander Shishkin , Hendrik Brueckner , Jiri Olsa , Kim Phillips , Namhyung Kim , Ravi Bangoria References: <20190521030203.1447-1-vt@altlinux.org> <20190521132838.GB26253@kernel.org> <20190521151918.GD26253@kernel.org> <20190521180354.GE26253@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20190521180354.GE26253@kernel.org> User-Agent: NeoMutt/20171215-106-ac61c7 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Arnaldo, On Tue, May 21, 2019 at 03:03:54PM -0300, Arnaldo Carvalho de Melo wrote: > Em Tue, May 21, 2019 at 12:19:18PM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Tue, May 21, 2019 at 04:34:47PM +0200, Michael Petlan escreveu: > > > 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! > > > > I've hit the issue too, this patch fixes it for me. > > > Tested. > > > Thanks, I'll add your Tested-by, appreciated. > > Was this in a cross-build environment? Native? It was native build on aarch64 with both 'hostcc' and 'gcc' arguments of mksyscalltbl being set to gcc. > I'm asking because I test > this on several cross build environments, like on ubuntu 19.04 cross > building to aarch64: > ... > I.e. it didn't fail the build, but in the end these new syscalls are not > there, while with your patch, they are: Probably in your case system headers was older than kernel you are building so you just silently losing syscalls. > Thanks, applied. Thanks! > > - Arnaldo