From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753169AbdBAXMS (ORCPT ); Wed, 1 Feb 2017 18:12:18 -0500 Received: from bedivere.hansenpartnership.com ([66.63.167.143]:51958 "EHLO bedivere.hansenpartnership.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752070AbdBAXMQ (ORCPT ); Wed, 1 Feb 2017 18:12:16 -0500 Message-ID: <1485990732.2322.40.camel@HansenPartnership.com> Subject: Re: [PATCH] prctl: implement PR_GET_ENDIAN for all architectures From: James Bottomley To: Andrew Morton , Helge Deller Cc: linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org, Michael Kerrisk , linux-api@vger.kernel.org Date: Wed, 01 Feb 2017 15:12:12 -0800 In-Reply-To: <20170131162624.5a85ec47c6ee22e5cc03c4eb@linux-foundation.org> References: <20170128111310.GA13389@ls3530.fritz.box> <20170131162624.5a85ec47c6ee22e5cc03c4eb@linux-foundation.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.16.5 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2017-01-31 at 16:26 -0800, Andrew Morton wrote: > On Sat, 28 Jan 2017 12:13:10 +0100 Helge Deller > wrote: > > > The prctl(PR_GET_ENDIAN) syscall was added to Kernel 2.6.18, but > > implemented for PowerPC only. This trivial patch adds support for > > this syscall for all other architectures. > > Seems reasonable. I guess. Why is this needed? I don't think it is other than for PPC. If you're not variable endian (which is only PPC to date), then you should know a priori what endian you are from the #defines in userspace. James