lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <eb1e3a64-b1ac-94d0-07f7-c84a83d9b21e@gmail.com>
Date:   Mon, 24 Feb 2020 21:22:34 +0300
From:   Dmitry Osipenko <digetx@...il.com>
To:     Karel Zak <kzak@...hat.com>,
        Stephen Warren <swarren@...dotorg.org>,
        Jens Axboe <axboe@...nel.dk>
Cc:     Christoph Hellwig <hch@...radead.org>,
        Davidlohr Bueso <dave@...olabs.net>,
        Colin Cross <ccross@...roid.com>,
        Thierry Reding <thierry.reding@...il.com>,
        Jonathan Hunter <jonathanh@...dia.com>,
        Michał Mirosław <mirq-linux@...e.qmqm.pl>,
        David Heidelberg <david@...t.cz>,
        Peter Geis <pgwipeout@...il.com>, linux-efi@...r.kernel.org,
        linux-tegra@...r.kernel.org, linux-block@...r.kernel.org,
        linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] partitions/efi: Add 'gpt_sector' kernel cmdline
 parameter

24.02.2020 20:23, Dmitry Osipenko пишет:
> 24.02.2020 19:33, Karel Zak пишет:
>> On Wed, Feb 19, 2020 at 09:59:54AM -0700, Stephen Warren wrote:
>>> On 2/19/20 9:27 AM, Christoph Hellwig wrote:
>>>> On Wed, Feb 19, 2020 at 07:23:39PM +0300, Dmitry Osipenko wrote:
>>>>> The gpt_sector=<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=<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.
>>
>>  +1
>>
>>> I thought that the backup GPT was always present in the standard location;
>>
>> If they have proprietary stuff on begin of the device and valid backup
>> GPT at the end of the device then designer of this junk is crazy, because
>> many GPT fdisk-like tools will try to recover from the backup header and 
>> overwrite the unknown (invalid) stuff at the begin of the device...
> 
> It's a problem created by vendor, but these devices are assumed to run
> Android-only. So it's not really that bad :)
> 

Is there any way to mark parts of block device as read-only? Such that
userspace couldn't write to the RO-marked sectors, I guess that could
help to save someone's bacon.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ