From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751550AbcGRLr1 (ORCPT ); Mon, 18 Jul 2016 07:47:27 -0400 Received: from lxorguk.ukuu.org.uk ([81.2.110.251]:50232 "EHLO lxorguk.ukuu.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751364AbcGRLr0 (ORCPT ); Mon, 18 Jul 2016 07:47:26 -0400 Date: Mon, 18 Jul 2016 12:47:07 +0100 From: One Thousand Gnomes To: Nicolas Pitre Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Alexander Viro , David Howells , Greg Ungerer Subject: Re: [PATCH v2 10/10] binfmt_flat: allow compressed flat binary format to work on MMU systems Message-ID: <20160718124707.6adfa9a1@lxorguk.ukuu.org.uk> In-Reply-To: <1468812716-30537-11-git-send-email-nicolas.pitre@linaro.org> References: <1468812716-30537-1-git-send-email-nicolas.pitre@linaro.org> <1468812716-30537-11-git-send-email-nicolas.pitre@linaro.org> Organization: Intel Corporation X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 17 Jul 2016 23:31:56 -0400 Nicolas Pitre wrote: > Let's take the simple and obvious approach by decompressing the binary > into a kernel buffer and then copying it to user space. Those who are > looking for more performance on a MMU system are unlikely to choose this > executable format anyway. The flat loader takes a very casual attitude to overruns and corrupted binaries. It's after all MMUless so has no real security model. If you enable flat for an MMU system then IMHO those all need to be fixed including all the missing overflow checks on the maths on textlen and the like.