This is an interesting question that I was also curious about. I'll try to answer the question on following condition:
- kernel version 5.10.7
- arch x86
CONFIG_PGTABLE_LEVELS is 2 (using two level page tables)
- kernel address space is 1G
For each process, the first level page table is called "page global directory", or
pgd. Entry index #768 to index #1023 in
pgd is used to map kernel address. Each process has its own unique 4K-byte page that is used for
pgd. And yes, to your question, entries from #768 to #1023 in
pgd are the same and are duplicated by each process. But this is only a very small part. The second level page table for kernel are still shared across all processes.
Please refer to
pgd_ctor(), to understand how the duplicate part of the first level page table(pgd) is created.