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] [thread-next>] [day] [month] [year] [list]
Message-ID: <1340d57f-3f4e-4873-aa66-e93d3a8f3394@arm.com>
Date: Wed, 11 Sep 2024 09:22:59 +0530
From: Anshuman Khandual <anshuman.khandual@....com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-mm@...ck.org, David Hildenbrand <david@...hat.com>,
 Ryan Roberts <ryan.roberts@....com>, "Mike Rapoport (IBM)"
 <rppt@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2] mm: Drop unused set_pte_safe()



On 9/11/24 01:43, Andrew Morton wrote:
> On Tue, 10 Sep 2024 15:40:26 +0530 Anshuman Khandual <anshuman.khandual@....com> wrote:
> 
>> All set_pte_safe() usage have been dropped after the commit eccd906484d1
>> ("x86/mm: Do not use set_{pud, pmd}_safe() when splitting a large page")
>> This just drops now unused helper set_pte_safe().
>>
>> Besides this macro was buggy due to doing direct dereferencing of the pte,
>> and if it were to be kept, it should have been updated to use a single call
>> to ptep_get().
>>
> 
> arch/x86/mm/init_64.c: In function 'set_pte_init':
> arch/x86/mm/init_64.c:83:17: error: implicit declaration of function 'set_pte_safe'; did you mean 'set_pmd_safe'? [-Werror=implicit-function-declaration]
>    83 |                 set_##type1##_safe(arg1, arg2);                 \
>       |                 ^~~~
> arch/x86/mm/init_64.c:91:1: note: in expansion of macro 'DEFINE_ENTRY'
>    91 | DEFINE_ENTRY(pte, pte, init)
>       | ^~~~~~~~~~~~

kernel_physical_mapping_init()
	__kernel_physical_mapping_init(, init = true)
		phys_p4d_init(, init = true)
			phys_pud_init(, init = true)
				phys_pmd_init(, init = true)
					phys_pte_init(, init = true)
						pte_init(, init = true)
							set_pte_safe()

Right, seems like there is a path to set_pte_safe(). Sure, will drop this
patch and convert the direct access into ptep_get() instead.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ