Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1354165ybt; Thu, 18 Jun 2020 06:52:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9buY7t1Fo48AGC/KTy78zkah1bng6v+zK/0oWASAy1OMnDv/ApeP0GSQUcJ7MUaAq/lfr X-Received: by 2002:a17:907:40c0:: with SMTP id nu24mr4250676ejb.141.1592488339065; Thu, 18 Jun 2020 06:52:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592488339; cv=none; d=google.com; s=arc-20160816; b=AoTojVbJRYeoLNPjtkOu/Ex4fBOrEoQWMkdfOcm7JvaW0kJ7lXyMY87cXWHUPPV02u TpkcHlDZYVuwk83KJd3DtItsFDBEZZCtfUcFnC3EnDfvLz8h7eI5ZdBmt4M1o8qnJaVG vTiHlZrsGSc5cf0kCpljsP7+BpKqG0Bvtvt678J2/GtL/wId7X3DRhsTbQf4fTKwm13X wMhztz3+zfoTR/RlhK1CPwx0c6ZYpbgp34xV1sLCVJ64t0+Y/AxyiUhjiA/9YJnWfT3O oOJ6XGLGdrNrcnBoOK4/UcM5uHGEUNVVPiCFiRp4CK+tOCUho1YENLCMO9rT8MMUqc+R 6VLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=Qu2piDTpRjdPEK7njN1UjJ14U6zvgl3bMsje0AGb3eg=; b=uYQtbRivPOSSJKHj7sTEGE3lQRvQXoi6xQJIlGH3142aG+1Ss4Q93ktAH4eHeuu6wc BRq9QQ4mEsr0y3MRJfkQ0rK3EbKsU8RHNr9wlTKp6gdeLTmXs2LBdOiu2umPQLCFJgf5 nHHN3vtc7GpKI9whk1VGND7kl+HxjM9tXvnlJFforizkNYsf3ERYUTVS/8eV+QaQ9Vkl pDERML3JdM7Z3kJ9Lxxh+Q7BpzUW7oZ3LxBOvDU+uD9X85/B0uecJpHi6ciDVmNE2iBs Ce6JjCvsTm3tt02ugR7Sf2xKUyJnr6mdTPS++LApklUmifxd87IvP4f1Jyt59cqs2rar aKhQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p11si1887319edq.151.2020.06.18.06.51.56; Thu, 18 Jun 2020 06:52:19 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730414AbgFRNti (ORCPT + 99 others); Thu, 18 Jun 2020 09:49:38 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:55438 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730376AbgFRNth (ORCPT ); Thu, 18 Jun 2020 09:49:37 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id EB4E82876CB688CEB42B; Thu, 18 Jun 2020 21:49:31 +0800 (CST) Received: from [127.0.0.1] (10.67.102.197) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.487.0; Thu, 18 Jun 2020 21:49:21 +0800 Subject: Re: [PATCH] s390: fix build error for sys_call_table_emu To: Heiko Carstens CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , References: <20200618110320.104013-1-nixiaoming@huawei.com> <20200618112702.GB4231@osiris> From: Xiaoming Ni Message-ID: Date: Thu, 18 Jun 2020 21:49:21 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: <20200618112702.GB4231@osiris> Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.102.197] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/6/18 19:27, Heiko Carstens wrote: > On Thu, Jun 18, 2020 at 07:03:20PM +0800, Xiaoming Ni wrote: >> Build error on s390: >> arch/s390/kernel/entry.o: in function `sys_call_table_emu': >> >> (.rodata+0x1288): undefined reference to `__s390_' >> >> In commit ("All arch: remove system call sys_sysctl") >> 148 common fdatasync sys_fdatasync sys_fdatasync >> -149 common _sysctl sys_sysctl compat_sys_sysctl >> +149 common _sysctl sys_ni_syscall >> 150 common mlock sys_mlock sys_mlock >> >> After the patch is integrated, there is a format error in the generated >> arch/s390/include/generated/asm/syscall_table.h: >> SYSCALL(sys_fdatasync, sys_fdatasync) >> SYSCALL(sys_ni_syscall,) /* cause build error */ >> SYSCALL(sys_mlock,sys_mlock) >> >> There are holes in the system call number in >> arch/s390/kernel/syscalls/syscall.tbl. When generating syscall_table.h, >> these hole numbers will be automatically filled with "NI_SYSCALL". >> Therefore, delete the number 149 to fix the current compilation failure. >> Similarly, modify tools/perf/arch/s390/entry/syscalls/syscall.tbl. >> >> Fixes: ("All arch: remove system call sys_sysctl") >> Fixes: https://lore.kernel.org/linuxppc-dev/20200616030734.87257-1-nixiaoming@huawei.com/ >> Reported-by: kernel test robot >> Signed-off-by: Xiaoming Ni >> --- >> arch/s390/kernel/syscalls/syscall.tbl | 1 - >> tools/perf/arch/s390/entry/syscalls/syscall.tbl | 1 - >> 2 files changed, 2 deletions(-) >> >> diff --git a/arch/s390/kernel/syscalls/syscall.tbl b/arch/s390/kernel/syscalls/syscall.tbl >> index f17aaf6fe5de..bcaf93994e3c 100644 >> --- a/arch/s390/kernel/syscalls/syscall.tbl >> +++ b/arch/s390/kernel/syscalls/syscall.tbl >> @@ -138,7 +138,6 @@ >> 146 common writev sys_writev compat_sys_writev >> 147 common getsid sys_getsid sys_getsid >> 148 common fdatasync sys_fdatasync sys_fdatasync >> -149 common _sysctl sys_ni_syscall > > This is not correct. It should be changed to: > > 149 common _sysctl - - > thanks for your guidance > Otherwise the generated __NR__sysctl define will be lost from > unistd.h, which should not happen. Looking at the link above it > _looks_ like a similar mistake was done for arm64. > Using holes will cause the definition of __NR__sysctl to be missing in include/asm/unistd_32.h and include/asm/unistd_64.h For arm64, I observed that "sys_afs_syscall", "sys_get_kernel_syms" and other commented out syscalls have no corresponding definition _NR_XXX in unistd.h, is it not a problem on arm64? /* 127 was sys_create_module */ __SYSCALL(127, sys_ni_syscall) /* 130 was sys_get_kernel_syms */ __SYSCALL(130, sys_ni_syscall) /* 137 was sys_afs_syscall */ __SYSCALL(137, sys_ni_syscall) Thanks Xiaoming Ni