From: Ingo Molnar <mingo@elte.hu> To: alfred@leakybucket.org Cc: linux-kernel@vger.kernel.org Subject: Re: 2 futex questions Date: Wed, 25 Sep 2002 10:23:16 +0200 (CEST) [thread overview] Message-ID: <Pine.LNX.4.44.0209251015320.4690-100000@localhost.localdomain> (raw) In-Reply-To: <20020925003353.GA15418@closet.leakybucket.org> On Tue, 24 Sep 2002 alfred@leakybucket.org wrote: > 1) There's a comment in sys_futex(...) that says pos_in_page must not be > on a page boundary. Could someone explain why? what it wants to say: 'the futex word must not overflow into the next page', ie. the futex word needs to be on a single page. > 2) How is this ever true: > pos_in_page + sizeof(int) > PAGE_SIZE > when checking if pos_in_page is valid? the full test is this: pos_in_page = ((unsigned long)uaddr) % PAGE_SIZE; if ((pos_in_page % __alignof__(int)) != 0 || pos_in_page + sizeof(int) > PAGE_SIZE) return -EINVAL; what it says: 'uaddr must be naturally aligned, and the word must be on a single page'. In theory it's possible that __alignof__(int) != sizeof(int). Ingo
next prev parent reply other threads:[~2002-09-25 8:09 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-09-25 0:33 alfred 2002-09-25 8:23 ` Ingo Molnar [this message] 2002-09-25 1:14 ` [patch] " alfred
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=Pine.LNX.4.44.0209251015320.4690-100000@localhost.localdomain \ --to=mingo@elte.hu \ --cc=alfred@leakybucket.org \ --cc=linux-kernel@vger.kernel.org \ --subject='Re: 2 futex questions' \ /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
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).