All of lore.kernel.org
 help / color / mirror / Atom feed
* [CRIU][PATCH 2/7] criu/pie/parasite-vdso: Handle also systems without VVAR
@ 2017-06-28 16:12 Michael Holzheu
  2017-06-29 15:06 ` [CRIU] [PATCH " Dmitry Safonov
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Holzheu @ 2017-06-28 16:12 UTC (permalink / raw)
  To: linux-s390

On s390 we don't use vvar. Therefore vvar_size in not been initialized
and the value remains VVAR_BAD_SIZE.

Fix the BUG() statement to also cover this case.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
---
 criu/pie/parasite-vdso.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/criu/pie/parasite-vdso.c b/criu/pie/parasite-vdso.c
index 40b2695..ad178e9 100644
--- a/criu/pie/parasite-vdso.c
+++ b/criu/pie/parasite-vdso.c
@@ -44,9 +44,11 @@ static int vdso_remap(char *who, unsigned long from, unsigned long to, size_t si
 /* Park runtime vDSO in some safe place where it can be accessible from restorer */
 int vdso_do_park(struct vdso_maps *rt, unsigned long park_at, unsigned long park_size)
 {
+	unsigned long vvar_size;
 	int ret;
 
-	BUG_ON((rt->sym.vdso_size + rt->sym.vvar_size) < park_size);
+	vvar_size = (rt->sym.vvar_size == VVAR_BAD_SIZE) ? 0 : rt->sym.vvar_size;
+	BUG_ON((rt->sym.vdso_size + vvar_size) < park_size);
 
 	if (rt->vvar_start != VVAR_BAD_ADDR) {
 		if (rt->sym.vdso_before_vvar) {
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [CRIU] [PATCH 2/7] criu/pie/parasite-vdso: Handle also systems without VVAR
  2017-06-28 16:12 [CRIU][PATCH 2/7] criu/pie/parasite-vdso: Handle also systems without VVAR Michael Holzheu
@ 2017-06-29 15:06 ` Dmitry Safonov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Safonov @ 2017-06-29 15:06 UTC (permalink / raw)
  To: linux-s390, openvz-criu

2017-06-28 19:12 GMT+03:00 Michael Holzheu <holzheu@linux.vnet.ibm.com>:
> On s390 we don't use vvar. Therefore vvar_size in not been initialized
> and the value remains VVAR_BAD_SIZE.
>
> Fix the BUG() statement to also cover this case.
>
> Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>

Thanks,
Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com>

> ---
>  criu/pie/parasite-vdso.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/criu/pie/parasite-vdso.c b/criu/pie/parasite-vdso.c
> index 40b2695..ad178e9 100644
> --- a/criu/pie/parasite-vdso.c
> +++ b/criu/pie/parasite-vdso.c
> @@ -44,9 +44,11 @@ static int vdso_remap(char *who, unsigned long from, unsigned long to, size_t si
>  /* Park runtime vDSO in some safe place where it can be accessible from restorer */
>  int vdso_do_park(struct vdso_maps *rt, unsigned long park_at, unsigned long park_size)
>  {
> +       unsigned long vvar_size;
>         int ret;
>
> -       BUG_ON((rt->sym.vdso_size + rt->sym.vvar_size) < park_size);
> +       vvar_size = (rt->sym.vvar_size == VVAR_BAD_SIZE) ? 0 : rt->sym.vvar_size;
> +       BUG_ON((rt->sym.vdso_size + vvar_size) < park_size);
>
>         if (rt->vvar_start != VVAR_BAD_ADDR) {
>                 if (rt->sym.vdso_before_vvar) {
> --
> 2.7.4
>
> _______________________________________________
> CRIU mailing list
> CRIU@openvz.org
> https://lists.openvz.org/mailman/listinfo/criu

-- 
             Dmitry

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-29 15:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-28 16:12 [CRIU][PATCH 2/7] criu/pie/parasite-vdso: Handle also systems without VVAR Michael Holzheu
2017-06-29 15:06 ` [CRIU] [PATCH " Dmitry Safonov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.