syscalls/mprotect04: Fix compilation error for ia64
PATCH 1/1 syscalls/mprotect04: Fix compilation error for ia64
---
Hi,
or should we drop ia64 support as the architecture is obsolete? Since we don't test this arch, there are some other build failures (at least on old SLES I tested the patch).
Kind regards,
Petr
testcases/kernel/syscalls/mprotect/mprotect04.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
testcases/kernel/syscalls/mprotect/mprotect04.c +3 -1
@@ -141,7 +141,7 @@ struct func_desc {uint64_t glob_pointer; }; -static __attribute__((noinline))void *get_func (void *mem) +static __attribute__((noinline)) void *get_func(void *mem, uintptr_t *func_page_offset LTP_ATTRIBUTE_UNUSED) {static struct func_desc fdesc;
@@ -275,11 +275,13 @@ static void testfunc_protexec(void)if (!func) goto out; +#ifndef __ia64__if (func_page_offset +64 > page_sz) {SAFE_MUNMAP (cleanup, p, page_sz);tst_brkm (TCONF , cleanup,"func too close to page boundary, " "maybe your compiler ignores -falign-functions?" ); } +#endif /* Change the protection to PROT_EXEC. */ TEST (mprotect (p, page_sz,PROT_EXEC ));
Signature · 1 line
2.22.0
PATCH 1/1 syscalls/mprotect04: Fix compilation error for ia64
----- Original Message -----
Quoted 9 lines
Fixes 94f5be719 ("syscalls/mprotect04: align exec_func to 64 bytes")Signed-off-by Petr Vorel <[email protected]>---
Hi,or should we drop ia64 support as the architecture is obsolete? Since we don't test this arch, there are some other build failures (at least on old SLES I tested the patch).
Thanks, I missed the ia64-specific code. RHEL dropped support for ia64 in RHEL6, and RHEL5 will likely be EOL in ~6 months, so I'm fine either way.
One note below.
Quoted 23 lines
Kind regards,
Petrtestcases/kernel/syscalls/mprotect/mprotect04.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)testcases/kernel/syscalls/mprotect/mprotect04.c +1
-1@@ -141,7 +141,7 @@ struct func_desc {uint64_t glob_pointer; }; -static __attribute__((noinline))void *get_func (void *mem) +static __attribute__((noinline))void *get_func (void *mem,uintptr_t *func_page_offset LTP_ATTRIBUTE_UNUSED) {static struct func_desc fdesc;
testcases/kernel/syscalls/mprotect/mprotect04.c static void testfunc_protexec(void) · line 278
Quoted 4 lines
testcases/kernel/syscalls/mprotect/mprotect04.c +1
-0@@ -275,11 +275,13 @@ static void testfunc_protexec(void)if (!func) goto out; +#ifndef __ia64__
If you initialize func_page_offset to 0 in ia64 get_func(), then this ifdef is not needed. Either way:
Quoted 13 lines
testcases/kernel/syscalls/mprotect/mprotect04.c +1
-1if (func_page_offset +64 > page_sz) {SAFE_MUNMAP (cleanup, p, page_sz);tst_brkm (TCONF , cleanup,"func too close to page boundary, " "maybe your compiler ignores -falign-functions?" ); } +#endif /* Change the protection to PROT_EXEC. */ TEST (mprotect (p, page_sz,PROT_EXEC )); --2.22.0
PATCH 1/1 syscalls/mprotect04: Fix compilation error for ia64
Hi Jan,
Quoted 7 lines
----- Original Message -----
Quoted 5 lines
Fixes 94f5be719 ("syscalls/mprotect04: align exec_func to 64 bytes")Signed-off-by Petr Vorel <[email protected]>---
Hi,
Quoted 6 lines
Quoted 3 lines
or should we drop ia64 support as the architecture is obsolete? Since we don't test this arch, there are some other build failures (at least on old SLES I tested the patch).
Thanks, I missed the ia64-specific code. RHEL dropped support for ia64 in RHEL6, and RHEL5 will likely be EOL in ~6 months, so I'm fine either way.
Thanks for a quick reply. So it's up to Cyril, whether keep the support or not.
Quoted 24 lines
One note below.
Quoted 20 lines
Kind regards,
Petrtestcases/kernel/syscalls/mprotect/mprotect04.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)testcases/kernel/syscalls/mprotect/mprotect04.c +1
-1@@ -141,7 +141,7 @@ struct func_desc {uint64_t glob_pointer; }; -static __attribute__((noinline))void *get_func (void *mem) +static __attribute__((noinline))void *get_func (void *mem,uintptr_t *func_page_offset LTP_ATTRIBUTE_UNUSED) {static struct func_desc fdesc;
Quoted 8 lines
testcases/kernel/syscalls/mprotect/mprotect04.c static void testfunc_protexec(void) · line 278
Quoted 5 lines
testcases/kernel/syscalls/mprotect/mprotect04.c +1
-0@@ -275,11 +275,13 @@ static void testfunc_protexec(void)if (!func) goto out; +#ifndef __ia64__If you initialize
func_page_offsetto 0 in ia64get_func(), then this ifdef is not needed. Either way:
This is obviously better, thanks!
Quoted 1 line
Acked-by Jan Stancek <[email protected]>
Kind regards,
Petr
PATCH 1/1 syscalls/mprotect04: Fix compilation error for ia64
Hi!
Quoted 5 lines
Quoted 3 lines
Thanks, I missed the ia64-specific code. RHEL dropped support for ia64 in RHEL6, and RHEL5 will likely be EOL in ~6 months, so I'm fine either way.
Thanks for a quick reply. So it's up to Cyril, whether keep the support or not.
Hmm, the last processors were made in 2017 but looking at TOP500 systems there was peek for itanim in 2004 and there were pretty nonexistent since 2012. Given that officially supported distros are going EOL soon enough I do not think that it makes sense to keep itanium specific code just so that 0.1% of our tests works on these processors.
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH 1/1 syscalls/mprotect04: Fix compilation error for ia64
Hi Cyril,
Quoted 4 lines
Hi!
Quoted 3 lines
Quoted 3 lines
Thanks, I missed the ia64-specific code. RHEL dropped support for ia64 in RHEL6, and RHEL5 will likely be EOL in ~6 months, so I'm fine either way.
Quoted 8 lines
Quoted 2 lines
Thanks for a quick reply. So it's up to Cyril, whether keep the support or not.
Hmm, the last processors were made in 2017 but looking at TOP500 systems there was peek for itanim in 2004 and there were pretty nonexistent since 2012. Given that officially supported distros are going EOL soon enough I do not think that it makes sense to keep itanium specific code just so that 0.1% of our tests works on these processors.
Agree. OK, I'll remove ia64 specific code.
Kind regards,
Petr
PATCH 1/1 syscalls/mprotect04: Fix compilation error for ia64
Hi Cyril, Jan,
Quoted 7 lines
Quoted 6 lines
Hi!
Quoted 5 lines
Quoted 3 lines
Thanks, I missed the ia64-specific code. RHEL dropped support for ia64 in RHEL6, and RHEL5 will likely be EOL in ~6 months, so I'm fine either way.
Thanks for a quick reply. So it's up to Cyril, whether keep the support or not.
Quoted 6 lines
Quoted 5 lines
Hmm, the last processors were made in 2017 but looking at TOP500 systems there was peek for itanim in 2004 and there were pretty nonexistent since 2012. Given that officially supported distros are going EOL soon enough I do not think that it makes sense to keep itanium specific code just so that 0.1% of our tests works on these processors.
Agree. OK, I'll remove ia64 specific code.
Merged as 5c60b7230. I'm sorry I forget to add your ack.
Kind regards,
Petr