[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 2/3] module: add Error arguments to module_load_one and mo
From: |
Markus Armbruster |
Subject: |
Re: [PATCH v3 2/3] module: add Error arguments to module_load_one and module_load_qom_one |
Date: |
Thu, 22 Sep 2022 17:09:52 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Kevin Wolf <kwolf@redhat.com> writes:
> Am 21.09.2022 um 14:08 hat Markus Armbruster geschrieben:
>> Kevin Wolf <kwolf@redhat.com> writes:
>>
>> > Am 21.09.2022 um 06:45 hat Markus Armbruster geschrieben:
>> >> Can we detect presence of compressed blocks on open?
>> >
>> > We seem to read in the full metadata of the image in dmg_open(). So I
>> > think it would be possible to detect it there.
>> >
>> > dmg_read_mish_block() is what fills in s->types. However, it never fills
>> > in types that it doesn't know (and it pretends it doesn't know the types
>> > of compressed blocks whose module is not loaded). So instead of checking
>> > it in dmg_open() after dmg_read_mish_block() has completed, you would
>> > have to catch the situation already in dmg_read_mish_block() while
>> > parsing the image file, which should be entirely doable if you want.
>>
>> In most cases, "open fails because some blocks are known to be
>> unreadable" is much better UX than "everything goes swimmingly until you
>> try to read one of the known-unreadable blocks".
>>
>> Even when your software manages not to eat your data, surprise bad
>> blocks are still likely to result in a bad day.
>
> That's fair. On the other hand, not allowing the user to read the part
> of data that is perfectly readable would be bad, too.
>
> Maybe the right solution would be to have a driver option like
> "unknown-block-types=io-error|fail-open" (probably with better names),
> and then having "fail-open" as the new default would be reasonable
> enough.
Makes sense.
- [PATCH v3 1/3] module: removed unused function argument "mayfail", (continued)
- [PATCH v3 1/3] module: removed unused function argument "mayfail", Claudio Fontana, 2022/09/08
- [PATCH v3 2/3] module: add Error arguments to module_load_one and module_load_qom_one, Claudio Fontana, 2022/09/08
- Re: [PATCH v3 2/3] module: add Error arguments to module_load_one and module_load_qom_one, Richard Henderson, 2022/09/08
- Re: [PATCH v3 2/3] module: add Error arguments to module_load_one and module_load_qom_one, Claudio Fontana, 2022/09/08
- Re: [PATCH v3 2/3] module: add Error arguments to module_load_one and module_load_qom_one, Claudio Fontana, 2022/09/08
- Re: [PATCH v3 2/3] module: add Error arguments to module_load_one and module_load_qom_one, Kevin Wolf, 2022/09/20
- Re: [PATCH v3 2/3] module: add Error arguments to module_load_one and module_load_qom_one, Markus Armbruster, 2022/09/21
- Re: [PATCH v3 2/3] module: add Error arguments to module_load_one and module_load_qom_one, Kevin Wolf, 2022/09/21
- Re: [PATCH v3 2/3] module: add Error arguments to module_load_one and module_load_qom_one, Markus Armbruster, 2022/09/21
- Re: [PATCH v3 2/3] module: add Error arguments to module_load_one and module_load_qom_one, Kevin Wolf, 2022/09/22
- Re: [PATCH v3 2/3] module: add Error arguments to module_load_one and module_load_qom_one,
Markus Armbruster <=
- Re: [PATCH v3 2/3] module: add Error arguments to module_load_one and module_load_qom_one, Claudio Fontana, 2022/09/21
- Re: [PATCH v3 2/3] module: add Error arguments to module_load_one and module_load_qom_one, Kevin Wolf, 2022/09/21
- Re: [PATCH v3 2/3] module: add Error arguments to module_load_one and module_load_qom_one, Claudio Fontana, 2022/09/23
- Re: [PATCH v3 2/3] module: add Error arguments to module_load_one and module_load_qom_one, Kevin Wolf, 2022/09/23
- Re: [PATCH v3 2/3] module: add Error arguments to module_load_one and module_load_qom_one, Claudio Fontana, 2022/09/23
- Re: [PATCH v3 2/3] module: add Error arguments to module_load_one and module_load_qom_one, Kevin Wolf, 2022/09/23
- Re: [PATCH v3 2/3] module: add Error arguments to module_load_one and module_load_qom_one, Claudio Fontana, 2022/09/23