* [LTP] [PATCH] syscalls/mprotect04: Fix compilation error for ia64
@ 2019-07-26 9:21 Petr Vorel
2019-07-26 12:22 ` Jan Stancek
0 siblings, 1 reply; 6+ messages in thread
From: Petr Vorel @ 2019-07-26 9:21 UTC (permalink / raw)
To: ltp
Fixes: 94f5be719 ("syscalls/mprotect04: align exec_func to 64 bytes")
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
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(-)
diff --git a/testcases/kernel/syscalls/mprotect/mprotect04.c b/testcases/kernel/syscalls/mprotect/mprotect04.c
index a014ab6b4..d1991a2db 100644
--- a/testcases/kernel/syscalls/mprotect/mprotect04.c
+++ b/testcases/kernel/syscalls/mprotect/mprotect04.c
@@ -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));
--
2.22.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [LTP] [PATCH] syscalls/mprotect04: Fix compilation error for ia64
2019-07-26 9:21 [LTP] [PATCH] syscalls/mprotect04: Fix compilation error for ia64 Petr Vorel
@ 2019-07-26 12:22 ` Jan Stancek
2019-07-26 12:28 ` Petr Vorel
0 siblings, 1 reply; 6+ messages in thread
From: Jan Stancek @ 2019-07-26 12:22 UTC (permalink / raw)
To: ltp
----- Original Message -----
> Fixes: 94f5be719 ("syscalls/mprotect04: align exec_func to 64 bytes")
>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> 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.
>
> Kind regards,
> Petr
>
> testcases/kernel/syscalls/mprotect/mprotect04.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/testcases/kernel/syscalls/mprotect/mprotect04.c
> b/testcases/kernel/syscalls/mprotect/mprotect04.c
> index a014ab6b4..d1991a2db 100644
> --- a/testcases/kernel/syscalls/mprotect/mprotect04.c
> +++ b/testcases/kernel/syscalls/mprotect/mprotect04.c
> @@ -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 you initialize func_page_offset to 0 in ia64 get_func(), then this ifdef
is not needed. Either way:
Acked-by: Jan Stancek <jstancek@redhat.com>
> 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));
> --
> 2.22.0
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [LTP] [PATCH] syscalls/mprotect04: Fix compilation error for ia64
2019-07-26 12:22 ` Jan Stancek
@ 2019-07-26 12:28 ` Petr Vorel
2019-07-26 12:47 ` Cyril Hrubis
0 siblings, 1 reply; 6+ messages in thread
From: Petr Vorel @ 2019-07-26 12:28 UTC (permalink / raw)
To: ltp
Hi Jan,
> ----- Original Message -----
> > Fixes: 94f5be719 ("syscalls/mprotect04: align exec_func to 64 bytes")
> > Signed-off-by: Petr Vorel <pvorel@suse.cz>
> > ---
> > 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.
Thanks for a quick reply. So it's up to Cyril, whether keep the support or not.
> One note below.
> > Kind regards,
> > Petr
> > testcases/kernel/syscalls/mprotect/mprotect04.c | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> > diff --git a/testcases/kernel/syscalls/mprotect/mprotect04.c
> > b/testcases/kernel/syscalls/mprotect/mprotect04.c
> > index a014ab6b4..d1991a2db 100644
> > --- a/testcases/kernel/syscalls/mprotect/mprotect04.c
> > +++ b/testcases/kernel/syscalls/mprotect/mprotect04.c
> > @@ -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 you initialize func_page_offset to 0 in ia64 get_func(), then this ifdef
> is not needed. Either way:
This is obviously better, thanks!
> Acked-by: Jan Stancek <jstancek@redhat.com>
Kind regards,
Petr
^ permalink raw reply [flat|nested] 6+ messages in thread
* [LTP] [PATCH] syscalls/mprotect04: Fix compilation error for ia64
2019-07-26 12:28 ` Petr Vorel
@ 2019-07-26 12:47 ` Cyril Hrubis
2019-07-26 18:50 ` Petr Vorel
0 siblings, 1 reply; 6+ messages in thread
From: Cyril Hrubis @ 2019-07-26 12:47 UTC (permalink / raw)
To: ltp
Hi!
> > 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.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 6+ messages in thread
* [LTP] [PATCH] syscalls/mprotect04: Fix compilation error for ia64
2019-07-26 12:47 ` Cyril Hrubis
@ 2019-07-26 18:50 ` Petr Vorel
2019-07-29 14:32 ` Petr Vorel
0 siblings, 1 reply; 6+ messages in thread
From: Petr Vorel @ 2019-07-26 18:50 UTC (permalink / raw)
To: ltp
Hi Cyril,
> Hi!
> > > 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.
Agree. OK, I'll remove ia64 specific code.
Kind regards,
Petr
^ permalink raw reply [flat|nested] 6+ messages in thread
* [LTP] [PATCH] syscalls/mprotect04: Fix compilation error for ia64
2019-07-26 18:50 ` Petr Vorel
@ 2019-07-29 14:32 ` Petr Vorel
0 siblings, 0 replies; 6+ messages in thread
From: Petr Vorel @ 2019-07-29 14:32 UTC (permalink / raw)
To: ltp
Hi Cyril, Jan,
> > Hi!
> > > > 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.
> Agree. OK, I'll remove ia64 specific code.
Merged as 5c60b7230. I'm sorry I forget to add your ack.
Kind regards,
Petr
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-07-29 14:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-26 9:21 [LTP] [PATCH] syscalls/mprotect04: Fix compilation error for ia64 Petr Vorel
2019-07-26 12:22 ` Jan Stancek
2019-07-26 12:28 ` Petr Vorel
2019-07-26 12:47 ` Cyril Hrubis
2019-07-26 18:50 ` Petr Vorel
2019-07-29 14:32 ` Petr Vorel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox