lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tencent_57DE280591BB8727E962ED1AF8FB8628AB05@qq.com>
Date: Mon, 12 May 2025 14:22:37 +0800
From: Feng Lee <379943137@...com>
To: 21cnbao@...il.com
Cc: 379943137@...com,
	akpm@...ux-foundation.org,
	anshuman.khandual@....com,
	david@...hat.com,
	jgg@...pe.ca,
	jhubbard@...dia.com,
	lance.yang@...ux.dev,
	linux-kernel@...r.kernel.org,
	maobibo@...ngson.cn,
	mingo@...nel.org,
	peterx@...hat.com,
	trivial@...nel.org
Subject: Re: [PATCH v3] mm: remove obsolete pgd_offset_gate()

> On Fri, May 9, 2025 at 2:33 PM Feng Lee <379943137@...com> wrote:
>>
>> Remove pgd_offset_gate() completely and simply make the single
>> caller use pgd_offset().
>>
>> It appears that the gate area resides in the kernel-mapped segment
>> exclusively on IA64. Therefore, removing pgd_offset_k is safe since
>> IA64 is now obsolete.
>>
>> Signed-off-by: Feng Lee <379943137@...com>
>
> You missed including the tags from v2 when sending v3.
> These tags were already present in v2 and should have been carried over
> to v3:
>
> Reviewed-by: Barry Song
> Acked-by: David Hildenbrand

Please accept my apologies for any inconvenience caused. As this is my first 
time handling multi-version patch submissions, I am still familiarizing 
myself with the process. I will make sure to study the guidelines thoroughly 
moving forward. Thank you for your patience.

>>
>> ---
>> Changes in v3:
>> - adopt more precise subject descriptions
>> Changes in v2:
>> - remove pgd_offset_gate completely
>> - remove pgd_offset_k from the get_gate_page function completely
>> ---
>> include/linux/pgtable.h | 4 ----
>> mm/gup.c | 5 +----
>> 2 files changed, 1 insertion(+), 8 deletions(-)
>>
>> diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h
>> index b50447ef1c92..f1e890b60460 100644
>> --- a/include/linux/pgtable.h
>> +++ b/include/linux/pgtable.h
>> @@ -1164,10 +1164,6 @@ static inline void arch_swap_restore(swp_entry_t entry, struct folio *folio)
>> }
>> #endif
>>
>> -#ifndef __HAVE_ARCH_PGD_OFFSET_GATE
>> -#define pgd_offset_gate(mm, addr) pgd_offset(mm, addr)
>> -#endif
>> -
>> #ifndef __HAVE_ARCH_MOVE_PTE
>> #define move_pte(pte, old_addr, new_addr) (pte)
>> #endif
>> diff --git a/mm/gup.c b/mm/gup.c
>> index f32168339390..0685403fe510 100644
>> --- a/mm/gup.c
>> +++ b/mm/gup.c
>> @@ -1101,10 +1101,7 @@ static int get_gate_page(struct mm_struct *mm, unsigned long address,
>> /* user gate pages are read-only */
>> if (gup_flags & FOLL_WRITE)
>> return -EFAULT;
>> - if (address > TASK_SIZE)
>> - pgd = pgd_offset_k(address);
>> - else
>> - pgd = pgd_offset_gate(mm, address);
>> + pgd = pgd_offset(mm, address);
>> if (pgd_none(*pgd))
>> return -EFAULT;
>> p4d = p4d_offset(pgd, address);
>> --
>> 2.49.0
>>

Best regards,
Feng


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ