From: Ilya Smith <blackzert@gmail.com>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] Additional strict check on ELF file. Checks segments are followed in order of 'p_vaddr ' value ascending. It fixes erorr in total_mapping_size with computation total size. This error happens if segments in ELF file are not in order.
Date: Tue, 27 Feb 2018 15:45:34 +0300 [thread overview]
Message-ID: <AD3CF79A-0AFC-4447-BBC7-8EA5F036B623@gmail.com> (raw)
In-Reply-To: <16811dde-abb3-1504-003c-475d40610f9f@infradead.org>
Thanks for that, I will fix it in next patch. Any other feedback?
Thanks,
Ilya
> 26 февр. 2018 г., в 20:48, Randy Dunlap <rdunlap@infradead.org> написал(а):
>
> On 02/26/2018 07:46 AM, Ilya Smith wrote:
>> Signed-off-by: Ilya Smith <blackzert@gmail.com>
>> ---
>> fs/binfmt_elf.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
>> 1 file changed, 51 insertions(+)
>>
>> diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
>> index bdb201230bae..970b42044240 100644
>> --- a/fs/binfmt_elf.c
>> +++ b/fs/binfmt_elf.c
>> @@ -524,6 +524,52 @@ static inline int arch_check_elf(struct elfhdr *ehdr, bool has_interp,
>>
>> #endif /* !CONFIG_ARCH_BINFMT_ELF_STATE */
>>
>> +/**
>> + * elf_check_phdr() - common check ELF program header.
>> + * @phdr: The program header to check
>> + * @phdr_num: Count of program headers in @phdr from elf header.
>> + *
>> + * Checks ELF binary meets specification.
>> + *
>> + * Return: Zero to proceed with ELF load, non-zero to faile the ELF load
>
> fail
>
>> + * with that return code.
>> + */
>> +static int elf_check_phdr(struct elf_phdr *phdr, unsigned long phdr_num)
>> +{
>
> And it would be nicer/better to have all of the "intro" text in the body of this
> message instead of in another email.
>
> thanks,
> --
> ~Randy
prev parent reply other threads:[~2018-02-27 12:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-26 15:46 [PATCH 0/1] Additional strict check on ELF file Ilya Smith
2018-02-26 15:46 ` [PATCH 1/1] Additional strict check on ELF file. Checks segments are followed in order of 'p_vaddr ' value ascending. It fixes erorr in total_mapping_size with computation total size. This error happens if segments in ELF file are not in order Ilya Smith
2018-02-26 17:48 ` Randy Dunlap
2018-02-27 12:45 ` Ilya Smith [this message]
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=AD3CF79A-0AFC-4447-BBC7-8EA5F036B623@gmail.com \
--to=blackzert@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@infradead.org \
--cc=viro@zeniv.linux.org.uk \
/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
all inboxes | Powered by JetHome®