From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 103213 invoked by alias); 15 Oct 2019 20:10:29 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 103203 invoked by uid 89); 15 Oct 2019 20:10:29 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Gm-Message-State:APjAAAU X-HELO: mail-qt1-f196.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=to:cc:references:from:openpgp:autocrypt:subject:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=eBnHgze07FoxM39h2WFT8fJi+j7skgt0Ok7WBz9/h9Y=; b=WQATPjn/geb6Bf8F98IeNqGo+Zpub6CsnLgs14UYDiuZmIcZj1L+pvkFbw20smyWJg OuKTFPlH08tU26W/ITe6ZxBF/XXGERuC79avAGKJhxX2sNUyAdsVzMnh88blhPKXezE6 oD5j3z0QPWnEnEeLIUn5pSMh/HwGwY3NwB0pmjsNniYNG1V/QPuiJCHEURsxcwEF8r/a N6qKs3kvJsVnDdXVMlLV8C9oU1+VugzRaGtSvnolE9Y0z09UxMPF5rdrpmhTbYK8LLOb 0JexLg+/jUwhiEQhyGiuxTStu2zvTHn7eKVl0lxwlJkNmA5vavIjqbpWj4seG0eQuQ2Q xwEQ== Return-Path: To: Florian Weimer Cc: libc-alpha@sourceware.org, "Paul A . Clarke" References: <20191011191554.10870-1-adhemerval.zanella@linaro.org> <87sgnudygv.fsf@oldenburg2.str.redhat.com> From: Adhemerval Zanella Openpgp: preference=signencrypt Subject: Re: [PATCH 1/3] ipc: Refactor sysvipc internal definitions Message-ID: <4dd27d9e-3520-5f3d-188a-d1320ccb7ea7@linaro.org> Date: Tue, 15 Oct 2019 20:10:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <87sgnudygv.fsf@oldenburg2.str.redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-SW-Source: 2019-10/txt/msg00471.txt.bz2 On 15/10/2019 08:45, Florian Weimer wrote: > * Adhemerval Zanella: > >> This patch refactor the internal sysvipc in two main points: >> >> 1. Add a new __ASSUME_SYSVIPC_DEFAULT_IPC_64 to infer the __IPC_64 >> value in wire-up or ipc syscall. The defaut value assumed for > > Sorry, would you please re-phrase? I don't understand the wire-up > terminology in this context. The 'wire-up' here means the syscall is done by its own entrypoint defined by a __NR_ number instead of a multiplexed one, in this case the __NR_ipc. Maybe the following is more clear: 1. Add a new __ASSUME_SYSVIPC_DEFAULT_IPC_64 to infer the __IPC_64 value to be used along either the multiplexed __NR_ipc or wired-up syscall. > >> __IPC_64 is also changed from 0x100 to 0x0, aligning with Linux >> generic UAPI. The idea is to simplify the Linux 5.1 wire-up for >> sysvipc syscalls for some 32-bit ABIs (which expectes __IPC_64 >> being 0x0) and simplify new ports (which would not require add >> a ipc_priv.h to override the __IPC_64 value). > > Replace “would not required add a ipc_priv.h” with “will no longer need > to add ipc_priv.h”? Ack. > > >> 2. It removes some duplicated definition from sysvipc compat code >> at ipc_priv.h. The idea is also to make it simpler to enable >> the new wireup sysvipc on Linux v5.1. > > Again, I don't understand this terminology. This idea is to consolidate the __old_ipc_perm and other arch-specific definitions that are duplicated over the architectures. Maybe: 2. It also removed some duplicated internal definition used on compat sysvipc symbols defined at ipc_priv.h (more specifically the __old_ipc_perm, SEMCTL_ARG_ADDRESS, MSGRCV_ARGS, and SEMTIMEDOP_IPC_ARGS). The idea is also to make it simpler to enable the new wire-up sysvipc syscall provided by Linux v5.1. > >> diff --git a/sysdeps/unix/sysv/linux/alpha/kernel-features.h b/sysdeps/unix/sysv/linux/alpha/kernel-features.h >> index 3928b4b62c..ac127adff7 100644 >> --- a/sysdeps/unix/sysv/linux/alpha/kernel-features.h >> +++ b/sysdeps/unix/sysv/linux/alpha/kernel-features.h >> @@ -52,4 +52,7 @@ >> # undef __ASSUME_STATX >> #endif >> >> +/* Alpha support old sysvipc even being a 64-bit architecture. */ >> +#undef __ASSUME_SYSVIPC_DEFAULT_IPC_64 > > s/support/requires/? Ack. > >> diff --git a/sysdeps/unix/sysv/linux/alpha/ipc_priv.h b/sysdeps/unix/sysv/linux/alpha/ipc_priv.h >> index 881d943063..0bf9da5694 100644 >> --- a/sysdeps/unix/sysv/linux/alpha/ipc_priv.h >> +++ b/sysdeps/unix/sysv/linux/alpha/ipc_priv.h > >> +#define __OLD_IPC_SEQ_TYPE unsigned short int >> +#include > > Isn't that the __OLD_IPC_SEQ_TYPE default? (This applies to other > architectures as well. > > In fact, __OLD_IPC_SEQ_TYPE appears to be unsighed short int always, so > I think it shouldn't be parameterized. Indeed, I will remove. > >> diff --git a/sysdeps/unix/sysv/linux/mips/mips64/ipc_priv.h b/sysdeps/unix/sysv/linux/mips/mips64/ipc_priv.h >> index 10d5c52dd0..459ee3d2e7 100644 >> --- a/sysdeps/unix/sysv/linux/mips/mips64/ipc_priv.h >> +++ b/sysdeps/unix/sysv/linux/mips/mips64/ipc_priv.h > >> +#define __OLD_IPC_SEQ_TYPE unsigned short int >> +#include > > See above. Ack. > > Rest looks okay to me. > > Thanks, > Florian >