Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp1602204ybm; Tue, 21 May 2019 17:31:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqzUhaFTnyihT+yKXSKuDaUSOBxQO2x1wi3u2DHq6+BQ+VPOehpp2o3IlNDvShtMTnVjJkKn X-Received: by 2002:a17:902:e46:: with SMTP id 64mr5417932plw.165.1558485075974; Tue, 21 May 2019 17:31:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558485075; cv=none; d=google.com; s=arc-20160816; b=HvIqgO4WtwDGO6Pw0gEYTT78Wd/CT/LOfWzD0i52egUKtDQBHefN4PnF6/D4u0/GQi X/o8B5q5w6CexrDOYReGo+Yo0KhXBCfueVozOfGUvTAtH6CFRrzcO4aJ2ZFtNOMjZ2+B pSw43o8uXEfdB+78WBiSklpCsLItnvpbD3yKJF3ixfD1CuSMewuZE654HJtSC/Coy1s1 eZBX6l87sQx35sY2e9MVYvRN3TTSh5Fmfb/StMQsLPPYQtJPh3FQZnm3uE+WeZxdqKeH KiZ5kHTGqsMeOI3HblSNEgnRUg71lot8GKjC08En3Pr6lwJGXhv6kD3dubBnKzxlgSLx HvHg== 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:to :date:from:dkim-signature; bh=L39lzAr5bcvmMCGfBSkVAobh5PBuvDAZo/1mKAtyt4I=; b=zTP04zv9hTfZSZ5ym6hFJkC9iNA8xCmYBcyYSXZEX4lUfxatRB4VFfYBJX0Qv1sPOS zcdC44MGmiu1317NT4dFQdg2kt+fnPksZcfNTIq2p6IuVSVmFDeFzcpLFTHNOm0SK2Xv YrYX00EWJZhcuX6nKQ4M64yxtldEVKNzVhLzEV0Y/W+yF+QsroP5CLBH7XI7M1Z8aJNI MGfO3OdzSRBtQjXvWjx0PNxG50wDaFSP9gNvNNPk2JaLqZ0aSynbT+q6I4VbxBr2MWk1 3aQwG6w1GyoSPfTgNBgfOfBwcWzenuOPwyZw6/C60ILnfEYqSwHKr7KuCbFAIj8vNFY9 3reg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fC0XTrKI; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c3si18664102pfr.27.2019.05.21.17.30.59; Tue, 21 May 2019 17:31:15 -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=@gmail.com header.s=20161025 header.b=fC0XTrKI; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727817AbfEVA3w (ORCPT + 99 others); Tue, 21 May 2019 20:29:52 -0400 Received: from mail-qk1-f196.google.com ([209.85.222.196]:33804 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726083AbfEVA3w (ORCPT ); Tue, 21 May 2019 20:29:52 -0400 Received: by mail-qk1-f196.google.com with SMTP id t64so211020qkh.1 for ; Tue, 21 May 2019 17:29:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=L39lzAr5bcvmMCGfBSkVAobh5PBuvDAZo/1mKAtyt4I=; b=fC0XTrKIzChfNuyR/FbSvQtf34gjMnDIHJnxuNdzHGA9/DdXznx2AERKAAwLIVH8Oe 0HOpCPEdWX0d5cK6cxgkMpHb4Okh3kzgolg4duAFp9Ah5e7ASysswnxkiTdNxI372EBt gMr5qstgfL5ICd5NC1si1oQYo8F6YIRmLK5rKaglBnPY1P8eMrQzBEnrFMWZihqWVsbB GERUizNmHWC0aH8YgypJBBMAtSyQz9dw1Ptx/dxeaxja16fTyX9tCL24YmeR9YVb1pgS 4GPGxhQIGUXm4jW94OQ+d1tD0A3+iRRbEPdxLuFkwCHuH1+QnaKe4ZtIIgxZk5Kkyxs8 qzwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=L39lzAr5bcvmMCGfBSkVAobh5PBuvDAZo/1mKAtyt4I=; b=Uglx58ipl1hyzuMi//lbTVSlBe0ByCijQWTJ6sCf+qyYsjrxKNevDX1uMCpaUl7mtX tVNL40Lj9gcafwJkNQRK1fYH7nU9QqHwt3nHIAPsjIYaKjaDYstD9nholaHqbnAQeXy1 f8LeB6zrtsSST1kVANC0WwNKtrHpcikI1yoiGTcmtcF4kj72vkexKgObZKI7ZIzQM39T Xwbx/4kubU0vErlXdFVnv4R9LeZkcHhsKy1oDPfSxnjBmbNtI3P6da8N+UvzUACN3Iit 7DeVzu3ExAU0fS7lfkcbsgu1x8boZ0ZbH3G1SyosY5G2L0mvw+0yqZ88XFgx8sO718Gz Ktdw== X-Gm-Message-State: APjAAAV6CoeyPDVcolCo9FxAGjyZt/UDueNWLGjTEZwwLUxPfYLnHmTj 2cisW9PacrDKKnntLmPhujY= X-Received: by 2002:a37:6d03:: with SMTP id i3mr68159655qkc.112.1558484990780; Tue, 21 May 2019 17:29:50 -0700 (PDT) Received: from quaco.ghostprotocols.net ([179.97.35.11]) by smtp.gmail.com with ESMTPSA id t17sm14194608qte.66.2019.05.21.17.29.48 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 21 May 2019 17:29:48 -0700 (PDT) From: Arnaldo Carvalho de Melo X-Google-Original-From: Arnaldo Carvalho de Melo Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 36F7B404A1; Tue, 21 May 2019 21:29:45 -0300 (-03) Date: Tue, 21 May 2019 21:29:45 -0300 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 Subject: Re: [PATCH] perf arm64: Fix mksyscalltbl when system kernel headers are ahead of the kernel Message-ID: <20190522002945.GF26253@kernel.org> References: <20190521030203.1447-1-vt@altlinux.org> <20190521132838.GB26253@kernel.org> <20190521151918.GD26253@kernel.org> <20190521180354.GE26253@kernel.org> <20190521205322.pasqqgpaaxjx7buy@altlinux.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190521205322.pasqqgpaaxjx7buy@altlinux.org> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Tue, May 21, 2019 at 11:53:23PM +0300, Vitaly Chikunov escreveu: > 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 Yeah, that seems to have been the case, thanks for your patch... > building so you just silently losing syscalls. ... now we're not losing them anymore, as intended from day one :-) Thanks again! > > Thanks, applied. > > Thanks! > > > > > - Arnaldo -- - Arnaldo