Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8433821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T06:29:34+00:00 2026-06-10T06:29:34+00:00

In Linux, I’ve tried (just for fun) to modify the kernel source in process.c

  • 0

In Linux, I’ve tried (just for fun) to modify the kernel source in process.c create a stack address that has more entropy, i.e. in particular the line:

sp -= get_random_int() % 8192;

When I change this too much, the kernel halts or I get some seemingly undefined behavior. I’m guessing that this causes PAGE_ALIGN() to fail in some way? I’m not that interested in why PAGE_ALIGN() in particular fails, or exactly what piece of code in the kernel that fails (although that too would be nice to know); I’m more interested in why the stack must reside in a particular region at all. What is the architectural reason and motivation behind this? Does this have something to do with how GDT/LDT works in protected mode?

Just to make clear what I’m asking:

Why does the stack have to have the form 0xbfXXXXXX (on 32-bit)? Why cannot the stack be e.g. 0xaaXXXXXX, or any other value?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T06:29:35+00:00Added an answer on June 10, 2026 at 6:29 am

    There is a limit in do_page_fault() as to how far outside the stack vma you can be before it considers it a bad access, perhaps you’re hitting that?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

in Linux kernel source code, I find below code: h++; pending >>= 1; It
Linux work queues are meant to be kernel level threads with process context. I
Linux kernel has the option to enable the TCP receive copy offload feature (
Hello Linux Kernel Driver Gurus! I'm writing a v4l2 driver for a camera that
A linux kernel newbie question. the man pages of mmap state that .. otherwise,
In Linux, what happens when a program (that possibly has multiple threads) receives a
The Linux kernel uses struct pid to represent PID in kernel space.The C code
On linux can we repackage a installed rpm if so how.I remember that the
On Linux, I'm using supbprocess.Popen to run an app. The command line of that
I've got a string that has curly quotes in it. I'd like to replace

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.