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: <dda75772-78d7-758c-b020-87ac776fbd9e@huawei.com>
Date:   Fri, 29 Jul 2022 10:03:23 +0800
From:   Kefeng Wang <wangkefeng.wang@...wei.com>
To:     Andrew Morton <akpm@...ux-foundation.org>
CC:     Naoya Horiguchi <naoya.horiguchi@....com>,
        Miaohe Lin <linmiaohe@...wei.com>, <linux-mm@...ck.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] mm: memory-failure: convert to pr_fmt()


On 2022/7/29 9:37, Andrew Morton wrote:
> On Wed, 27 Jul 2022 11:25:11 +0800 Kefeng Wang <wangkefeng.wang@...wei.com> wrote:
>
>> Use pr_fmt to prefix all pr_<level> output, but unpoison_memory()
>> and soft_offline_page() are used by error injection, which have
>> own prefixes like "Unpoison:" and "soft offline:", meanwhile,
>> soft_offline_page() could be used by memory hotremove, so undef
>> pr_fmt before unpoison_pr_info definition to keep the original
>> output for them.
>>
>> ...
>>
>> @@ -2289,6 +2285,7 @@ static int __init memory_failure_init(void)
>>   }
>>   core_initcall(memory_failure_init);
>>   
>> +#undef pr_fmt
>>   #define unpoison_pr_info(fmt, pfn, rs)			\
>>   ({							\
>>   	if (__ratelimit(rs))				\
> This change makes the build fail.

sorry, should be

+#undef pr_fmt
+#define pr_fmt(fmt)     "" fmt

will update in v3

>
> In file included from ./include/linux/kernel.h:29,
>                   from mm/memory-failure.c:39:
> mm/memory-failure.c: In function 'unpoison_memory':
> ./include/linux/printk.h:537:26: error: expected ')' before 'pr_fmt'
>    537 |         printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
>        |                          ^~~~~~
> ./include/linux/printk.h:388:42: note: in definition of macro '__printk_index_emit'
>    388 |                 if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \
>        |                                          ^~~~
> ./include/linux/printk.h:464:26: note: in expansion of macro 'printk_index_wrap'
>    464 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
>        |                          ^~~~~~~~~~~~~~~~~
> ./include/linux/printk.h:537:9: note: in expansion of macro 'printk'
>    537 |         printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
>        |         ^~~~~~
> mm/memory-failure.c:2292:17: note: in expansion of macro 'pr_info'
>   2292 |                 pr_info(fmt, pfn);                      \
>        |                 ^~~~~~~
> mm/memory-failure.c:2326:17: note: in expansion of macro 'unpoison_pr_info'
>   2326 |                 unpoison_pr_info("Unpoison: Disabled after HW memory failure %#lx\n",
>        |                 ^~~~~~~~~~~~~~~~
>
> [1500 lines of the same]
> .

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ