From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Nicolas Pitre To: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Alexander Viro , David Howells , Greg Ungerer Subject: [PATCH v2 08/10] binfmt_flat: update libraries' data segment pointer with userspace accessors Date: Sun, 17 Jul 2016 23:31:54 -0400 Message-Id: <1468812716-30537-9-git-send-email-nicolas.pitre@linaro.org> In-Reply-To: <1468812716-30537-1-git-send-email-nicolas.pitre@linaro.org> References: <1468812716-30537-1-git-send-email-nicolas.pitre@linaro.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: This is needed on systems with a MMU. This also gets rid of the strangest C code I've seen lateli i.e. an integer indexed with a pointer value within square brackets. That really looked backwards. Signed-off-by: Nicolas Pitre --- fs/binfmt_flat.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c index e981e66bb5..3221ed9d7c 100644 --- a/fs/binfmt_flat.c +++ b/fs/binfmt_flat.c @@ -902,12 +902,19 @@ static int load_flat_binary(struct linux_binprm * bprm) return res; /* Update data segment pointers for all libraries */ - for (i=0; i