On Wed, Jun 19, 2024 at 08:44:21AM GMT, LEROY Christophe wrote: > Le 18/06/2024 à 21:41, Maxwell Bland a écrit : > > On Tue, Jun 18, 2024 at 06:38:24PM GMT, LEROY Christophe wrote: > >> Le 18/06/2024 à 16:40, Maxwell Bland a écrit : > >> Don't you mean pmd_leaf() here instead of pgd_leaf() ? > > thank you for catching these, will fix in v5. > > Maybe we could have a nicer code with something like: > > static inline bool has_non_leaf_ptdump() > { > return IS_ENABLED(CONFIG_ARCH_SUPPORTS_NON_LEAF_PTDUMP); > } > > static int ptdump_p4d_entry(...) > { > ... > if (has_non_leaf_ptdump() || pgd_leaf(val)) > ... > } Hi Christophe, nice, thank you! I incorporated this critique as well. Forward pointer to v5: https://lore.kernel.org/all/2bcb3htsjhepxdybpw2bwot2jnuezl3p5mnj5rhjwgitlsufe7@xzhkyntridw3/#t Maxwell