From: Prakhar Srivastava <prsriva@linux.microsoft.com>
To: Thiago Jung Bauermann <bauerman@linux.ibm.com>,
Mimi Zohar <zohar@linux.ibm.com>
Cc: mark.rutland@arm.com, jean-philippe@linaro.org, arnd@arndb.de,
yamada.masahiro@socionext.com, sboyd@kernel.org,
catalin.marinas@arm.com, kexec@lists.infradead.org,
linux-kernel@vger.kernel.org, takahiro.akashi@linaro.org,
kristina.martsenko@arm.org, duwe@lst.de,
linux-arm-kernel@lists.infradead.org, james.morse@arm.org,
linux-integrity@vger.kernel.org, tglx@linutronix.de,
allison@lohutok.net
Subject: Re: [RFC PATCH v1 1/1] Add support for arm64 to carry ima measurement log in kexec_file_load
Date: Thu, 19 Sep 2019 17:32:04 -0700 [thread overview]
Message-ID: <ed2dc633-c691-6789-9c70-e7d37f436a49@linux.microsoft.com> (raw)
In-Reply-To: <871rwd2ay8.fsf@morokweng.localdomain>
On 9/18/2019 8:59 PM, Thiago Jung Bauermann wrote:
> Mimi Zohar <zohar@linux.ibm.com> writes:
>
>> On Wed, 2019-09-18 at 10:15 -0400, Mimi Zohar wrote:
>>
>>>> + uint64_t tmp_start, tmp_end;
>>>> +
>>>> + propStart = of_find_property(of_chosen, "linux,ima-kexec-buffer",
>>>> + NULL);
>>>> + if (propStart) {
>>>> + tmp_start = fdt64_to_cpu(*((const fdt64_t *) propStart));
>>>> + ret = of_remove_property(of_chosen, propStart);
>>>> + if (!ret) {
>>>> + return ret;
>>>> + }
>>>> +
>>>> + propEnd = of_find_property(of_chosen,
>>>> + "linux,ima-kexec-buffer-end", NULL);
>>>> + if (!propEnd) {
>>>> + return -EINVAL;
>>>> + }
>>>> +
>>>> + tmp_end = fdt64_to_cpu(*((const fdt64_t *) propEnd));
>>>> +
>>>> + ret = of_remove_property(of_chosen, propEnd);
>>>> + if (!ret) {
>>>> + return ret;
>>>> + }
>>> There seems to be quite a bit of code duplication in this function and
>>> in ima_get_kexec_buffer(). It could probably be cleaned up with some
>>> refactoring.
>> Sorry, my mistake. One calls of_get_property(), while the other calls
>> of_find_property().
> of_get_property() is a thin wrapper around of_find_property(), so if
> that's the only difference I think they can still be merged.
I will move to using of_get_property and see if i can reduce the code
further.
Also address other comments by Mimi in my next iteration.
Thanks,
Prakhar Srivastava
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-09-20 0:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-13 22:50 [RFC PATCH v1 0/1] Add support for arm64 to carry ima measurement log in kexec_file_load Prakhar Srivastava
2019-09-13 22:50 ` [RFC PATCH v1 1/1] " Prakhar Srivastava
2019-09-18 14:15 ` Mimi Zohar
2019-09-18 21:21 ` Mimi Zohar
2019-09-19 3:59 ` Thiago Jung Bauermann
2019-09-20 0:32 ` Prakhar Srivastava [this message]
2019-09-20 3:07 ` Thiago Jung Bauermann
2019-09-24 19:54 ` prsriva
2019-09-24 20:25 ` Thiago Jung Bauermann
2019-09-24 20:27 ` prsriva
-- strict thread matches above, loose matches on Subject: below --
2019-09-09 23:14 [RFC PATCH v1 0/1] " Prakhar Srivastava
2019-09-09 23:14 ` [RFC PATCH v1 1/1] " Prakhar Srivastava
2019-09-06 23:51 [RFC][PATCH v1 0/1] " Prakhar Srivastava
2019-09-06 23:51 ` [RFC][PATCH v1 1/1] " Prakhar Srivastava
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ed2dc633-c691-6789-9c70-e7d37f436a49@linux.microsoft.com \
--to=prsriva@linux.microsoft.com \
--cc=allison@lohutok.net \
--cc=arnd@arndb.de \
--cc=bauerman@linux.ibm.com \
--cc=catalin.marinas@arm.com \
--cc=duwe@lst.de \
--cc=james.morse@arm.org \
--cc=jean-philippe@linaro.org \
--cc=kexec@lists.infradead.org \
--cc=kristina.martsenko@arm.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=sboyd@kernel.org \
--cc=takahiro.akashi@linaro.org \
--cc=tglx@linutronix.de \
--cc=yamada.masahiro@socionext.com \
--cc=zohar@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).