Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1605263 > unrolled thread

memcpy without considering the get_zeroed_page() size returned

Started byPeter Teoh <htmldeveloper@gmail.com>
First post2017-03-21 03:40 +0100
Last post2017-03-21 03:40 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  memcpy without considering the get_zeroed_page() size returned Peter Teoh <htmldeveloper@gmail.com> - 2017-03-21 03:40 +0100

#1605263 — memcpy without considering the get_zeroed_page() size returned

FromPeter Teoh <htmldeveloper@gmail.com>
Date2017-03-21 03:40 +0100
Subjectmemcpy without considering the get_zeroed_page() size returned
Message-ID<tnhSh-5lt-3@gated-at.bofh.it>
https://github.com/torvalds/linux/blob/master/arch/arm64/kernel/vdso.c

/* kuser helpers */
memcpy((void *)vpage + 0x1000 - kuser_sz, __kuser_helper_start,
kuser_sz);
/* sigreturn code */
memcpy((void *)vpage + AARCH32_KERN_SIGRET_CODE_OFFSET,
__aarch32_sigret_code_start, sigret_sz);


I am just curious: depending on the configuration, will it ever
happened that get_zeroed_page() ever produce less amount of memory for
the above memcpy() operation to be successful? Ie, why the offset of
0x1000 is done without ever considering the actual amount of memory
allocated?

Please email me direct (no on LKML mailing list).

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web