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
| ||
|
Date: Mon, 17 Oct 2022 11:43:11 +0000 From: HORIGUCHI NAOYA(堀口 直也) <naoya.horiguchi@....com> To: Miaohe Lin <linmiaohe@...wei.com> CC: Naoya Horiguchi <naoya.horiguchi@...ux.dev>, "linux-mm@...ck.org" <linux-mm@...ck.org>, Andrew Morton <akpm@...ux-foundation.org>, David Hildenbrand <david@...hat.com>, Mike Kravetz <mike.kravetz@...cle.com>, Yang Shi <shy828301@...il.com>, Oscar Salvador <osalvador@...e.de>, Muchun Song <songmuchun@...edance.com>, Jane Chu <jane.chu@...cle.com>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org> Subject: Re: [PATCH v6 4/4] mm/hwpoison: introduce per-memory_block hwpoison counter On Sat, Oct 15, 2022 at 10:28:00AM +0800, Miaohe Lin wrote: > On 2022/10/7 9:07, Naoya Horiguchi wrote: ... > > diff --git a/include/linux/memory.h b/include/linux/memory.h > > index aa619464a1df..ad8cd9bb3239 100644 > > --- a/include/linux/memory.h > > +++ b/include/linux/memory.h > > @@ -85,6 +85,9 @@ struct memory_block { > > unsigned long nr_vmemmap_pages; > > struct memory_group *group; /* group (if any) for this block */ > > struct list_head group_next; /* next block inside memory group */ > > +#if defined(CONFIG_MEMORY_FAILURE) && defined(CONFIG_MEMORY_HOTPLUG) > > + atomic_long_t nr_hwpoison; > > +#endif > > }; > > > > int arch_get_memory_phys_device(unsigned long start_pfn); > > diff --git a/include/linux/mm.h b/include/linux/mm.h > > index 17119dbf8fad..f80269e90772 100644 > > --- a/include/linux/mm.h > > +++ b/include/linux/mm.h > > @@ -3280,6 +3280,7 @@ extern int soft_offline_page(unsigned long pfn, int flags); > > extern int __get_huge_page_for_hwpoison(unsigned long pfn, int flags, > > bool *migratable_cleared); > > extern void num_poisoned_pages_inc(unsigned long pfn); > > +extern void num_poisoned_pages_sub(unsigned long pfn, long i); > > The prototype of this function is: *inline* void num_poisoned_pages_sub(unsigned long pfn, long i). > The combination of inline and extern looks weird to me. Is this a common use case? No, it seems not. I can find a few place of such a comination like task_curr() and raise_softirq_irqoff(), but as long as I understand, there's little meaning (showing explicitly but redundant) to add extern keyword to functions in shared header files. So I think of dropping the extern keyword. > > Anyway, this patch looks good to me. Thanks. > Reviewed-by: Miaohe Lin <linmiaohe@...wei.com> Thank you. - Naoya Horiguchi
Powered by blists - more mailing lists