From: Vineet Gupta Subject: Re: [PATCH 06/13] arc: define syscall_get_arch() Date: Fri, 9 Nov 2018 11:13:33 -0800 Message-ID: References: <20181109031605.GF21511@altlinux.org> <6C398ED8-30BC-4483-B5CF-1EB2F2699B0D@amacapital.net> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <6C398ED8-30BC-4483-B5CF-1EB2F2699B0D@amacapital.net> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: Andy Lutomirski Cc: "Dmitry V. Levin" , Andy Lutomirski , Paul Moore , Eric Paris , Elvira Khabirova , "linux-snps-arc@lists.infradead.org" , "linux-audit@redhat.com" , "linux-kernel@vger.kernel.org" List-Id: linux-audit@redhat.com On 11/9/18 11:03 AM, Andy Lutomirski wrote: >> Does ptrace (or user of this API) need a unique value per arch. Otherwise instead >> of adding the boilerplate code to all arches, they could simply define AUDIT_ARCH >> and common code could return it. Also the EM_xxx are not there in >> include/uapi/linux/elf.h to begin with since libc elf.h already defines them. >> > A lot of architectures allow multiple audit_arches at runtime due to compat support and similar features, so it really does want to be a function. The goal of this patch set is to get it supported everywhere. > I was wondering if we could have a common syscall_get_arch() simply returning an per-arch AUDIT_ARCH. But seems like the function itself needs to be per arch anyways due to the nuances above.