All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 214661] New: THREAD_SIZE on x86_64 is 4*PAGE_SIZE, not 2*PAGE_SIZE
@ 2021-10-09  5:19 bugzilla-daemon
  2021-10-09 18:51 ` [Bug 214661] " bugzilla-daemon
  2021-10-10  0:28 ` bugzilla-daemon
  0 siblings, 2 replies; 4+ messages in thread
From: bugzilla-daemon @ 2021-10-09  5:19 UTC (permalink / raw)
  To: linux-man

https://bugzilla.kernel.org/show_bug.cgi?id=214661

            Bug ID: 214661
           Summary: THREAD_SIZE on x86_64 is 4*PAGE_SIZE, not 2*PAGE_SIZE
           Product: Documentation
           Version: unspecified
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: man-pages
          Assignee: documentation_man-pages@kernel-bugs.osdl.org
          Reporter: me@ieevee.com
        Regression: No

According to '/root/linux/arch/x86/include/asm/page_64_types.h', THREAD_SIZE on
x86_64 now is 4*PAGE_SIZE:

#ifdef CONFIG_KASAN
#define KASAN_STACK_ORDER 1
#else
#define KASAN_STACK_ORDER 0
#endif

#define THREAD_SIZE_ORDER       (2 + KASAN_STACK_ORDER)
#define THREAD_SIZE  (PAGE_SIZE << THREAD_SIZE_ORDER)

However, the Documentation/x86/kernel-stacks.rst shows that THREAD_SIZE on
x86_64 is 2*PAGE_SIZE:

Like all other architectures, x86_64 has a kernel stack for every
active thread.  These thread stacks are THREAD_SIZE (2*PAGE_SIZE) big.

I am not quite sure which is correct, Maybe the document needs an upgrade?
Thanks a lot for any reply.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug 214661] THREAD_SIZE on x86_64 is 4*PAGE_SIZE, not 2*PAGE_SIZE
  2021-10-09  5:19 [Bug 214661] New: THREAD_SIZE on x86_64 is 4*PAGE_SIZE, not 2*PAGE_SIZE bugzilla-daemon
@ 2021-10-09 18:51 ` bugzilla-daemon
  2021-10-10  0:28 ` bugzilla-daemon
  1 sibling, 0 replies; 4+ messages in thread
From: bugzilla-daemon @ 2021-10-09 18:51 UTC (permalink / raw)
  To: linux-man

https://bugzilla.kernel.org/show_bug.cgi?id=214661

--- Comment #1 from Alejandro Colomar (man-pages) (alx.manpages@gmail.com) ---
CC += LKML

Hello,

On 10/9/21 7:19 AM, bugzilla-daemon@bugzilla.kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=214661
> 
>              Bug ID: 214661
>             Summary: THREAD_SIZE on x86_64 is 4*PAGE_SIZE, not 2*PAGE_SIZE
>             Product: Documentation
>             Version: unspecified
>            Hardware: All
>                  OS: Linux
>              Status: NEW
>            Severity: normal
>            Priority: P1
>           Component: man-pages

This is incorrect.

The internal kernel documentation is not part of the man-pages.
I checked to see if the manual pages need an update, but I couldn't find 
anything about THREAD_SIZE:

alx@sqli:~/src/linux/man-pages$ grep -rn THREAD_SIZE
alx@sqli:~/src/linux/man-pages$

I can't edit the component, so maybe you need to close the bug and open 
a new one in a different component.

Anyway, thanks for the report!

Alex


>            Assignee: documentation_man-pages@kernel-bugs.osdl.org
>            Reporter: me@ieevee.com
>          Regression: No
> 
> According to '/root/linux/arch/x86/include/asm/page_64_types.h', THREAD_SIZE
> on
> x86_64 now is 4*PAGE_SIZE:
> 
> #ifdef CONFIG_KASAN
> #define KASAN_STACK_ORDER 1
> #else
> #define KASAN_STACK_ORDER 0
> #endif
> 
> #define THREAD_SIZE_ORDER       (2 + KASAN_STACK_ORDER)
> #define THREAD_SIZE  (PAGE_SIZE << THREAD_SIZE_ORDER)
> 
> However, the Documentation/x86/kernel-stacks.rst shows that THREAD_SIZE on
> x86_64 is 2*PAGE_SIZE:
> 
> Like all other architectures, x86_64 has a kernel stack for every
> active thread.  These thread stacks are THREAD_SIZE (2*PAGE_SIZE) big.
> 
> I am not quite sure which is correct, Maybe the document needs an upgrade?
> Thanks a lot for any reply.
>

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug 214661] THREAD_SIZE on x86_64 is 4*PAGE_SIZE, not 2*PAGE_SIZE
  2021-10-09  5:19 [Bug 214661] New: THREAD_SIZE on x86_64 is 4*PAGE_SIZE, not 2*PAGE_SIZE bugzilla-daemon
  2021-10-09 18:51 ` [Bug 214661] " bugzilla-daemon
@ 2021-10-10  0:28 ` bugzilla-daemon
  1 sibling, 0 replies; 4+ messages in thread
From: bugzilla-daemon @ 2021-10-10  0:28 UTC (permalink / raw)
  To: linux-man

https://bugzilla.kernel.org/show_bug.cgi?id=214661

silenceshell (me@ieevee.com) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WILL_FIX_LATER

--- Comment #2 from silenceshell (me@ieevee.com) ---
Thanks for your reply!

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Bug 214661] New: THREAD_SIZE on x86_64 is 4*PAGE_SIZE, not 2*PAGE_SIZE
       [not found] <bug-214661-216477@https.bugzilla.kernel.org/>
@ 2021-10-09 18:51 ` Alejandro Colomar (man-pages)
  0 siblings, 0 replies; 4+ messages in thread
From: Alejandro Colomar (man-pages) @ 2021-10-09 18:51 UTC (permalink / raw)
  To: bugzilla-daemon, linux-kernel

CC += LKML

Hello,

On 10/9/21 7:19 AM, bugzilla-daemon@bugzilla.kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=214661
> 
>              Bug ID: 214661
>             Summary: THREAD_SIZE on x86_64 is 4*PAGE_SIZE, not 2*PAGE_SIZE
>             Product: Documentation
>             Version: unspecified
>            Hardware: All
>                  OS: Linux
>              Status: NEW
>            Severity: normal
>            Priority: P1
>           Component: man-pages

This is incorrect.

The internal kernel documentation is not part of the man-pages.
I checked to see if the manual pages need an update, but I couldn't find 
anything about THREAD_SIZE:

alx@sqli:~/src/linux/man-pages$ grep -rn THREAD_SIZE
alx@sqli:~/src/linux/man-pages$

I can't edit the component, so maybe you need to close the bug and open 
a new one in a different component.

Anyway, thanks for the report!

Alex


>            Assignee: documentation_man-pages@kernel-bugs.osdl.org
>            Reporter: me@ieevee.com
>          Regression: No
> 
> According to '/root/linux/arch/x86/include/asm/page_64_types.h', THREAD_SIZE on
> x86_64 now is 4*PAGE_SIZE:
> 
> #ifdef CONFIG_KASAN
> #define KASAN_STACK_ORDER 1
> #else
> #define KASAN_STACK_ORDER 0
> #endif
> 
> #define THREAD_SIZE_ORDER       (2 + KASAN_STACK_ORDER)
> #define THREAD_SIZE  (PAGE_SIZE << THREAD_SIZE_ORDER)
> 
> However, the Documentation/x86/kernel-stacks.rst shows that THREAD_SIZE on
> x86_64 is 2*PAGE_SIZE:
> 
> Like all other architectures, x86_64 has a kernel stack for every
> active thread.  These thread stacks are THREAD_SIZE (2*PAGE_SIZE) big.
> 
> I am not quite sure which is correct, Maybe the document needs an upgrade?
> Thanks a lot for any reply.
> 


-- 
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-10-10  0:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-09  5:19 [Bug 214661] New: THREAD_SIZE on x86_64 is 4*PAGE_SIZE, not 2*PAGE_SIZE bugzilla-daemon
2021-10-09 18:51 ` [Bug 214661] " bugzilla-daemon
2021-10-10  0:28 ` bugzilla-daemon
     [not found] <bug-214661-216477@https.bugzilla.kernel.org/>
2021-10-09 18:51 ` [Bug 214661] New: " Alejandro Colomar (man-pages)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.