DBG() is defined as void when DEBUG is not defined,
and DEBUG is explicitly undefined.
It means there is no other way than modifying source code
to get the messages printed.
It was most likely useful in the first days of VDSO, but
today the only 3 DBG() calls don't deserve a special
handling.
Just remove them. If one day someone need such messages back,
use a standard pr_debug() or equivalent.
Signed-off-by: Christophe Leroy <redacted>
---
This is a follow up series, applying on top of the series that
switches powerpc VDSO to _install_special_mapping(),
rebased on today's powerpc/next-test (dd419a93bd99)
v2 removes the modification to arch_setup_additional_pages() to
consider when is_32bit_task() returning true when CONFIG_VDSO32
not set, as this should never happen.
Signed-off-by: Christophe Leroy <redacted>
---
arch/powerpc/kernel/vdso.c | 13 -------------
1 file changed, 13 deletions(-)
vdso_patches[] table is used only at init time.
Mark it __initdata.
Signed-off-by: Christophe Leroy <redacted>
---
arch/powerpc/kernel/vdso.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
To avoid any risk of modification of vital VDSO variables,
declare them __ro_after_init.
vdso32_kbase and vdso64_kbase could be made 'const', but it would
have high impact on all functions using them as the compiler doesn't
expect const property to be discarded.
Signed-off-by: Christophe Leroy <redacted>
---
arch/powerpc/kernel/vdso.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
If vdso initialisation failed, vdso_ready is not set.
Otherwise, vdso_pages is only 0 when it is a 32 bits task
and CONFIG_VDSO32 is not selected.
As arch_setup_additional_pages() now bails out directly in
that case, we don't need to set vdso_pages to 0.
Signed-off-by: Christophe Leroy <redacted>
---
arch/powerpc/kernel/vdso.c | 23 ++++++-----------------
1 file changed, 6 insertions(+), 17 deletions(-)
@@ -176,11 +176,6 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)current->mm->context.vdso_base=0;-/* vDSO has a problem and was disabled, just don't "enable" it for the-*process-*/-if(vdso_pages==0)-return0;/* Add a page to the vdso size for the data page */vdso_pages++;
@@ -710,14 +705,16 @@ static int __init vdso_init(void)*InitializethevDSOimagesinmemory,thatisdonecessary*fixupsofvDSOsymbols,locatetrampolines,etc...*/-if(vdso_setup())-gotosetup_failed;+if(vdso_setup()){+pr_err("vDSO setup failure, not enabled !\n");+return0;+}if(IS_ENABLED(CONFIG_VDSO32)){/* Make sure pages are in the correct state */pagelist=kcalloc(vdso32_pages+1,sizeof(structpage*),GFP_KERNEL);if(!pagelist)-gotoalloc_failed;+return0;pagelist[0]=virt_to_page(vdso_data);
@@ -730,7 +727,7 @@ static int __init vdso_init(void)if(IS_ENABLED(CONFIG_PPC64)){pagelist=kcalloc(vdso64_pages+1,sizeof(structpage*),GFP_KERNEL);if(!pagelist)-gotoalloc_failed;+return0;pagelist[0]=virt_to_page(vdso_data);
@@ -743,14 +740,6 @@ static int __init vdso_init(void)smp_wmb();vdso_ready=1;-return0;--setup_failed:-pr_err("vDSO setup failure, not enabled !\n");-alloc_failed:-vdso32_pages=0;-vdso64_pages=0;-return0;}arch_initcall(vdso_init);
@@ -37,13 +37,12 @@/* The alignment of the vDSO */#define VDSO_ALIGNMENT (1 << 16)+externcharvdso32_start,vdso32_end;staticunsignedintvdso32_pages;-staticvoid*vdso32_kbase;+staticvoid*vdso32_kbase=&vdso32_start;unsignedlongvdso32_sigtramp;unsignedlongvdso32_rt_sigtramp;-externcharvdso32_start,vdso32_end;-externcharvdso64_start,vdso64_end;staticvoid*vdso64_kbase=&vdso64_start;staticunsignedintvdso64_pages;
@@ -689,8 +688,6 @@ static int __init vdso_init(void)*/vdso64_pages=(&vdso64_end-&vdso64_start)>>PAGE_SHIFT;-vdso32_kbase=&vdso32_start;-/**Calculatethesizeofthe32bitsvDSO*/