From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762311AbdJQNd2 (ORCPT ); Tue, 17 Oct 2017 09:33:28 -0400 Received: from mx2.suse.de ([195.135.220.15]:39233 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755439AbdJQNd1 (ORCPT ); Tue, 17 Oct 2017 09:33:27 -0400 Date: Tue, 17 Oct 2017 15:33:24 +0200 From: Michal Hocko To: Baoquan He Cc: LKML , Linus Torvalds , Kees Cook , Jiri Kosina , Al Viro , Oleg Nesterov , Ingo Molnar Subject: Re: [PATCH 1/2] fs, elf: drop MAP_FIXED usage from elf_map Message-ID: <20171017133324.y2nkse6svunpd5s2@dhcp22.suse.cz> References: <20171004075059.bbx7madwgwflb7ky@dhcp22.suse.cz> <20171016134446.19910-1-mhocko@kernel.org> <20171016134446.19910-2-mhocko@kernel.org> <20171017122614.GJ11198@x1> <20171017125605.7quzqa3swvagyeiq@dhcp22.suse.cz> <20171017132246.GK11198@x1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171017132246.GK11198@x1> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 17-10-17 21:22:46, Baoquan He wrote: [...] > And as I said before, then we will still have the > ungraceful 'mapping total'|'unmapping the rest' method. yes I haven't touched this part and I guess you are right it can be removed now, but this was not my primary concern to adddress so there is still some room for improvements on top. If you want to refactor that part, then feel free to do so but I think that we should address the MAP_FIXED part first. > If from a new code reader's point of view, the newly added elf_vm_mmap() > plus the existing elf_map() may confuse people more. Heh, I strongly suspect that this indirection is the last thing that would make the code hard to grasp. The whole load_elf_binary is a giant and incomprehensible mess. -- Michal Hocko SUSE Labs