Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp319277pxu; Fri, 4 Dec 2020 04:14:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJy7YVP6e8ggTg7mO/dFJxbeO2f3MtyruD7cuwJrIBnTz5bfP6dgdB4hSHXE04n/nroe/qd5 X-Received: by 2002:a17:906:a186:: with SMTP id s6mr6822107ejy.193.1607084067676; Fri, 04 Dec 2020 04:14:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607084067; cv=none; d=google.com; s=arc-20160816; b=TmxzsCOK5m3ek5wcietrdplK23Ry5lBcqGZynckPh+iQmvlXj+X4B3bG5uub/7s8vF R8WNTeOc9P+YYdneudkb9NPtypSBwpe0R5VSxiyShYcE3qosCWzoQulPweTYZHHga4EM 5iyXbRpbyjEf7zbePkDnxG2dTdVQeBa7uRV2foEGRYklAm7k1jPKmTcn3Z98Zjp/5ZoV puBOsjE7TyfAOqp6HXXEUtXlbZnvfR3CXA1z9lliI9yFSeopBD77qZXeXAzDhOVzYv42 NYEi43EoqpCJl2tya/ZNfzJy9ONJdK632ZFKCmQaSVgXHkaBSElB2jVlh1cR0eDS7D0C RdpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=CUkQa3Fi52QYp1kqR/FQKb7YwcUQ9KMOoJLQ8rPTg98=; b=pQEKMpvJVk7gQLCxMgsb/w3Ox623JfqnFl42lS0Za1PXI1ColrPVVl1hz542Aali/G KdG6nTnAmgJ96OXUjSu4x1HFLXsNnkYj4+IOhye5t4N3GKX/d7B23pFR7AUqp4Lpl3IF gQ01PBh7oItQgKV2H8Bn/VuynTIFklSDGogbpYBbbra87C3vbySkWUYIV3QMmoerXys9 74AcpEBleo2bj0OP/9Uzdm0y1Dnzrvk58LKuqIkpEKwHYZp7jLHv+UOaN89OK912t/Rr tp8O7BNz6ZfeVOIFRi7ZXJHLU8I0jqqeP3gkCJBUR+JUI15FC2LqZ79bob0c/kK8FTOr EETA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z21si2824650edr.365.2020.12.04.04.14.04; Fri, 04 Dec 2020 04:14:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729744AbgLDMKy (ORCPT + 99 others); Fri, 4 Dec 2020 07:10:54 -0500 Received: from elvis.franken.de ([193.175.24.41]:48102 "EHLO elvis.franken.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729344AbgLDMKx (ORCPT ); Fri, 4 Dec 2020 07:10:53 -0500 Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1kl9ue-0005Nb-00; Fri, 04 Dec 2020 13:10:12 +0100 Received: by alpha.franken.de (Postfix, from userid 1000) id 5F672C02E5; Fri, 4 Dec 2020 13:09:32 +0100 (CET) Date: Fri, 4 Dec 2020 13:09:32 +0100 From: Thomas Bogendoerfer To: Alexander A Sverdlin Cc: linux-mips@vger.kernel.org, Paul Burton , Leonid Rosenboim , Corey Minyard , linux-kernel@vger.kernel.org, Serge Semin , "Maciej W . Rozycki" , Jinyang He , Jiaxun Yang Subject: Re: [PATCH 1/2] MIPS: Don't round up kernel sections size for memblock_add() Message-ID: <20201204120932.GF10011@alpha.franken.de> References: <20201203123649.44046-1-alexander.sverdlin@nokia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201203123649.44046-1-alexander.sverdlin@nokia.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 03, 2020 at 01:36:48PM +0100, Alexander A Sverdlin wrote: > From: Alexander Sverdlin > > Linux doesn't own the memory immediately after the kernel image. On Octeon > bootloader places a shared structure right close after the kernel _end, > refer to "struct cvmx_bootinfo *octeon_bootinfo" in cavium-octeon/setup.c. > > If check_kernel_sections_mem() rounds the PFNs up, first memblock_alloc() > inside early_init_dt_alloc_memory_arch() <= device_tree_init() returns > memory block overlapping with the above octeon_bootinfo structure, which > is being overwritten afterwards. > > Fixes: a94e4f24ec83 ("MIPS: init: Drop boot_mem_map") > Signed-off-by: Alexander Sverdlin > --- > arch/mips/kernel/setup.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) applied to mips-next. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]