Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp758642ybv; Wed, 19 Feb 2020 08:39:45 -0800 (PST) X-Google-Smtp-Source: APXvYqzN6xHI/UMWZD9TjeJ45pOljxVxMVvYlcvL0EmVzQ03BbNlonnoaYgjQqUUwY2B8VzUtCyL X-Received: by 2002:aca:190a:: with SMTP id l10mr5317605oii.56.1582130385472; Wed, 19 Feb 2020 08:39:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582130385; cv=none; d=google.com; s=arc-20160816; b=PYHBE5zQgTdlxalqxjyCKwCn5BFtiiPbVSQvQA9Jw/tY+5B2IgZv3YL84qUUbD8WtA SLDxypail5M2ubxNWAohGVQlsDKyFPheS2j4F3dYsJDWOSdmp7LAAT1jMmVulTCnFXqq HhiGz4CBXqgOOsGQP1IvXkRh8jd6YGT7P1IwN7lQPSWxxw/2tjGbdsP8/kC5JDb5nVLq +hw77zSIug56Ji7S24Q3y1VsmX2vJha0NfJJ3smWMbzn64kxdCkS3vsCXvhPvO45oNOR wks+rpHRKjBgyORW6C1+RlsdPOYGKYRiLZIWuKF5atb9EKF8BmtJF8Py4D0yt/WMRERb xtfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=oc1iG+0sFqJJpFuBmYp8D6jIrAENImR/n43R/TFZnyw=; b=bWIYncziEQGLYYIVWqLs9z7SjGKFBVl9Qj0cU8vd02CBceHQ25BmOh13pB/xI26xkx Y5xOK9CqfP9D7SzuhFy8uspWEWSwcgmSqdwWemBzVBMMe4jmbbDo35N1qE+uGJg7WdWu 3gNdpZWcqvp3D+y3EmnbbQ2HyyPeJWnkqMlUPiLqpp6QK+TuY59lqfAHOJIIkQTZ7FQ+ 8/7AS5jkcYqJNNORWPRfr+syM7ROgtq6t32x5nMJuW6/tqV6RuI8cLyKWcH6Y6ohJ/hQ +D8XcF7Wd/JDgV5Ij2IhqU5i1RuiC7QClYCQtcmS7ezAHtrd9jA3uAxpUxf+Pj+TuLMO YK5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BvD2WyXL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c189si8713083oig.74.2020.02.19.08.39.33; Wed, 19 Feb 2020 08:39:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BvD2WyXL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726996AbgBSQif (ORCPT + 99 others); Wed, 19 Feb 2020 11:38:35 -0500 Received: from mail-lf1-f67.google.com ([209.85.167.67]:42310 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726717AbgBSQie (ORCPT ); Wed, 19 Feb 2020 11:38:34 -0500 Received: by mail-lf1-f67.google.com with SMTP id y19so612954lfl.9; Wed, 19 Feb 2020 08:38:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=oc1iG+0sFqJJpFuBmYp8D6jIrAENImR/n43R/TFZnyw=; b=BvD2WyXLCVUryS3IROysHumXd7lOaFWsK5xX8FY7TszpdKrxg87K22WgG22BFXbTW9 SDZEOU3LHeFx3Hqhw9XUnVlMICmren3S8VPcyidelhDD8qiQuTnIa55EpyT9yb+Cw1M9 YSJQrKeDxDx7S4DVf6XHTgNNjeHZgJrVHjYX+IJphxq5s1L7Huv6qnN7ScnWmh0szmfS zQ5L5Jr6jjCAYyqPMDxDcVpxDAst9f0l4gmaHXSrlMkaAtqLknDxeN1+0nUFfJvPGAQv 2P8JZZj33zSE4ewTQqorNetCc9CtjWqaH/7RHECd8BOadTgnVcYulx+Jw2ksL1nPFQqv q2nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=oc1iG+0sFqJJpFuBmYp8D6jIrAENImR/n43R/TFZnyw=; b=EjhwbyqWWKL0+7H+hHUuRl30pJzFMz1ZsSx1Scji8GXtGaaQgopZH/LM84Sq91m/Z3 kcinN4O8wC9I9YlneAN2Ydk8P0BATOSPlIDyXLc3+Wtv0f7pM5sK8hjoRxdB1f57v0I9 EYPmtFFpqLf8lcN9Irb++dFBs5W71/buWXJGj5O7mzmBbHAyy1sxuWI4nRBn3oFAV9us NUw1TDKluCr5JCenWPd3SJISLnG5cE2WEZkve3IBYZuU6GQM2rbNZzqcuuZdtUYhmuHA g7GAGpsszcAFxZd/AQ3UwGmJCQyXRY2MqE5Aoer1Kad7zp47ZyiwVqhNvPVrWHVVUPxg WpdA== X-Gm-Message-State: APjAAAVK+Wyl4jUNtfIznblaoZvIyvzO7Weh9jNiRvTxQ7b6E3A5BijB g9XPUyOkIxCxwTMp67/+6+jakhMN X-Received: by 2002:ac2:5964:: with SMTP id h4mr13913125lfp.213.1582130311784; Wed, 19 Feb 2020 08:38:31 -0800 (PST) Received: from [192.168.2.145] (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.googlemail.com with ESMTPSA id u16sm54074lfi.36.2020.02.19.08.38.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Feb 2020 08:38:31 -0800 (PST) Subject: Re: [PATCH v1] partitions/efi: Add 'gpt_sector' kernel cmdline parameter To: Christoph Hellwig Cc: Jens Axboe , Davidlohr Bueso , Colin Cross , Thierry Reding , Jonathan Hunter , =?UTF-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= , David Heidelberg , Peter Geis , linux-efi@vger.kernel.org, linux-tegra@vger.kernel.org, linux-block@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org References: <20200219162339.16192-1-digetx@gmail.com> <20200219162738.GA10644@infradead.org> From: Dmitry Osipenko Message-ID: Date: Wed, 19 Feb 2020 19:38:30 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.0 MIME-Version: 1.0 In-Reply-To: <20200219162738.GA10644@infradead.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 19.02.2020 19:27, Christoph Hellwig пишет: > On Wed, Feb 19, 2020 at 07:23:39PM +0300, Dmitry Osipenko wrote: >> The gpt_sector= causes the GPT partition search to look at the >> specified sector for a valid GPT header if the GPT is not found at the >> beginning or the end of block device. >> >> In particular this is needed for NVIDIA Tegra consumer-grade Android >> devices in order to make them usable with the upstream kernel because >> these devices use a proprietary / closed-source partition table format >> for the EMMC and it's impossible to change the partition's format. Luckily >> there is a GPT table in addition to the proprietary table, which is placed >> in uncommon location of the EMMC storage and bootloader passes the >> location to kernel using "gpt gpt_sector=" cmdline parameters. >> >> This patch is based on the original work done by Colin Cross for the >> downstream Android kernel. > > I don't think a magic command line is the way to go. The best would be > to reverse-engineer the proprietary partition table format. If that is > too hard we can at least key off the odd GPT location based of it's > magic number. I'll try to take a look at RE, pretty sure somebody tried to do that before.