From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 07CFAC433F5 for ; Tue, 29 Mar 2022 02:19:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230261AbiC2CVi (ORCPT ); Mon, 28 Mar 2022 22:21:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229986AbiC2CVg (ORCPT ); Mon, 28 Mar 2022 22:21:36 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89C992717D for ; Mon, 28 Mar 2022 19:19:54 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 49AF521985; Tue, 29 Mar 2022 02:19:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1648520392; h=from:from:reply-to: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=ZPkIZ/XPkzUw3GjYvyN+kAbsucuIGnV2jh6uGeU7IYw=; b=Nqd4JoQK6yUWhkcVCPx/L2AnKtO3DnEXQc+fbSPNlZADjl1RQ/AnZKioJKNOMqj7uCYtte mlyfhrqR5G7T5aodZkGOTeXBCdZNP/AwPQmbqi5WUXVgRfnzaAuIRFfKGk65mptVqC2znn JkIyadYj/SBG+Zs/5tJVyDYX0u1jq4Q= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1648520392; h=from:from:reply-to: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=ZPkIZ/XPkzUw3GjYvyN+kAbsucuIGnV2jh6uGeU7IYw=; b=DzeLs96G9pLdG7R6oZoAvgLb8XvdopgoKAISiuJ/595Gh3Qw9DQ58FbSPP1yZSrbGym2qc edOnjsVfueSeb7Dw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id A0BED13A7E; Tue, 29 Mar 2022 02:19:51 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 2eezE8dsQmLhNQAAMHmgww (envelope-from ); Tue, 29 Mar 2022 02:19:51 +0000 Date: Mon, 28 Mar 2022 23:19:41 -0300 From: Enzo Matsumiya To: CGEL Cc: rth@twiddle.net, ink@jurassic.park.msu.ru, mattst88@gmail.com, paul@paul-moore.com, kbuild-all@lists.01.org, Zeal Robot , linux-kernel@vger.kernel.org, eparis@redhat.com, Yang Yang , linux-audit@redhat.com Subject: Re: [PATCH] audit: do a quick exit when syscall number is invalid Message-ID: <20220329021941.ai3d6fgrkyd5ylto@cyberdelia> References: <20220326094654.2361956-1-yang.yang29@zte.com.cn> <202203270449.WBYQF9X3-lkp@intel.com> <62426553.1c69fb81.bb808.345c@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <62426553.1c69fb81.bb808.345c@mx.google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/29, CGEL wrote: >> In file included from include/linux/init.h:5, >> from kernel/auditsc.c:34: >> kernel/auditsc.c: In function '__audit_syscall_exit': >> >> kernel/auditsc.c:2081:61: error: 'NR_syscalls' undeclared (first use in this function); did you mean 'si_syscall'? >> 2081 | unlikely(context->major < 0 || context->major > NR_syscalls)) >> | ^~~~~~~~~~~ > >Sorry could anybody give a hand to solve this? It works well on x86_64 and arm64. >I have no alpha environment and not familiar to this arch, much thanks! Sorry, no experience either, but from a quick look at arch/alpha/include/asm/unistd.h shows that it's called NR_SYSCALLS for alpha arch, for whatever reason. HTH Enzo From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BE622C433EF for ; Tue, 29 Mar 2022 02:20:06 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-298-MKjHRWomOPi5h9M-tH9uDg-1; Mon, 28 Mar 2022 22:20:01 -0400 X-MC-Unique: MKjHRWomOPi5h9M-tH9uDg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C86D5811E83; Tue, 29 Mar 2022 02:19:59 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 94C5F40D1B9A; Tue, 29 Mar 2022 02:19:58 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 4E0C71949761; Tue, 29 Mar 2022 02:19:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id EB0FF1947BBF for ; Tue, 29 Mar 2022 02:19:56 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id B5C551400C2D; Tue, 29 Mar 2022 02:19:56 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B1DAF141ADA5 for ; Tue, 29 Mar 2022 02:19:56 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 25236800882 for ; Tue, 29 Mar 2022 02:19:56 +0000 (UTC) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-125-On73COsYNbuXZ-OUIP1txg-1; Mon, 28 Mar 2022 22:19:54 -0400 X-MC-Unique: On73COsYNbuXZ-OUIP1txg-1 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 49AF521985; Tue, 29 Mar 2022 02:19:52 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id A0BED13A7E; Tue, 29 Mar 2022 02:19:51 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 2eezE8dsQmLhNQAAMHmgww (envelope-from ); Tue, 29 Mar 2022 02:19:51 +0000 Date: Mon, 28 Mar 2022 23:19:41 -0300 From: Enzo Matsumiya To: CGEL Subject: Re: [PATCH] audit: do a quick exit when syscall number is invalid Message-ID: <20220329021941.ai3d6fgrkyd5ylto@cyberdelia> References: <20220326094654.2361956-1-yang.yang29@zte.com.cn> <202203270449.WBYQF9X3-lkp@intel.com> <62426553.1c69fb81.bb808.345c@mx.google.com> MIME-Version: 1.0 In-Reply-To: <62426553.1c69fb81.bb808.345c@mx.google.com> X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 X-BeenThere: linux-audit@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Audit Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kbuild-all@lists.01.org, Zeal Robot , linux-kernel@vger.kernel.org, eparis@redhat.com, Yang Yang , linux-audit@redhat.com, ink@jurassic.park.msu.ru, mattst88@gmail.com, rth@twiddle.net Errors-To: linux-audit-bounces@redhat.com Sender: "Linux-audit" X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=linux-audit-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" On 03/29, CGEL wrote: >> In file included from include/linux/init.h:5, >> from kernel/auditsc.c:34: >> kernel/auditsc.c: In function '__audit_syscall_exit': >> >> kernel/auditsc.c:2081:61: error: 'NR_syscalls' undeclared (first use in this function); did you mean 'si_syscall'? >> 2081 | unlikely(context->major < 0 || context->major > NR_syscalls)) >> | ^~~~~~~~~~~ > >Sorry could anybody give a hand to solve this? It works well on x86_64 and arm64. >I have no alpha environment and not familiar to this arch, much thanks! Sorry, no experience either, but from a quick look at arch/alpha/include/asm/unistd.h shows that it's called NR_SYSCALLS for alpha arch, for whatever reason. HTH Enzo -- Linux-audit mailing list Linux-audit@redhat.com https://listman.redhat.com/mailman/listinfo/linux-audit From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============2038695469590673773==" MIME-Version: 1.0 From: Enzo Matsumiya To: kbuild-all@lists.01.org Subject: Re: [PATCH] audit: do a quick exit when syscall number is invalid Date: Mon, 28 Mar 2022 23:19:41 -0300 Message-ID: <20220329021941.ai3d6fgrkyd5ylto@cyberdelia> In-Reply-To: <62426553.1c69fb81.bb808.345c@mx.google.com> List-Id: --===============2038695469590673773== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On 03/29, CGEL wrote: >> In file included from include/linux/init.h:5, >> from kernel/auditsc.c:34: >> kernel/auditsc.c: In function '__audit_syscall_exit': >> >> kernel/auditsc.c:2081:61: error: 'NR_syscalls' undeclared (first use = in this function); did you mean 'si_syscall'? >> 2081 | unlikely(context->major < 0 || context->major > N= R_syscalls)) >> | ^= ~~~~~~~~~~ > >Sorry could anybody give a hand to solve this? It works well on x86_64 and= arm64. >I have no alpha environment and not familiar to this arch, much thanks! Sorry, no experience either, but from a quick look at arch/alpha/include/as= m/unistd.h shows that it's called NR_SYSCALLS for alpha arch, for whatever reason. HTH Enzo --===============2038695469590673773==--