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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPM=9tyv709j=t6k7ZvtZoqNdaFnh13fX76q3xfRf66TuLeS0A@mail.gmail.com>
Date:	Thu, 28 May 2015 13:20:55 +1000
From:	Dave Airlie <airlied@...il.com>
To:	Frediano Ziglio <fziglio@...hat.com>
Cc:	spice-devel <spice-devel@...ts.freedesktop.org>,
	Dave Airlie <airlied@...ux.ie>,
	dri-devel <dri-devel@...ts.freedesktop.org>,
	Dave Airlie <airlied@...hat.com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [Spice-devel] [PATCH 08/11] Remove format string errors

On 27 May 2015 at 20:04, Frediano Ziglio <fziglio@...hat.com> wrote:
> Enable format string checks for qxl_io_log and remove resulting warnings
> which could lead to memory errors on different platform or just printing
> wrong information.
>
> Signed-off-by: Frediano Ziglio <fziglio@...hat.com>

Reviewed-by: Dave Airlie <airlied@...hat.com>
> ---
>  qxl/qxl_cmd.c     | 2 +-
>  qxl/qxl_display.c | 2 +-
>  qxl/qxl_drv.h     | 2 +-
>  qxl/qxl_release.c | 2 +-
>  4 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/qxl/qxl_cmd.c b/qxl/qxl_cmd.c
> index b18f84c..edc1eec 100644
> --- a/qxl/qxl_cmd.c
> +++ b/qxl/qxl_cmd.c
> @@ -248,7 +248,7 @@ int qxl_garbage_collect(struct qxl_device *qdev)
>                 }
>         }
>
> -       QXL_INFO(qdev, "%s: %lld\n", __func__, i);
> +       QXL_INFO(qdev, "%s: %d\n", __func__, i);
>
>         return i;
>  }
> diff --git a/qxl/qxl_display.c b/qxl/qxl_display.c
> index 4a0a8b2..a8dbb3e 100644
> --- a/qxl/qxl_display.c
> +++ b/qxl/qxl_display.c
> @@ -67,7 +67,7 @@ static int qxl_display_copy_rom_client_monitors_config(struct qxl_device *qdev)
>         crc = crc32(0, (const uint8_t *)&qdev->rom->client_monitors_config,
>                   sizeof(qdev->rom->client_monitors_config));
>         if (crc != qdev->rom->client_monitors_config_crc) {
> -               qxl_io_log(qdev, "crc mismatch: have %X (%d) != %X\n", crc,
> +               qxl_io_log(qdev, "crc mismatch: have %X (%zd) != %X\n", crc,
>                            sizeof(qdev->rom->client_monitors_config),
>                            qdev->rom->client_monitors_config_crc);
>                 return 1;
> diff --git a/qxl/qxl_drv.h b/qxl/qxl_drv.h
> index 6745c44..62ef8be 100644
> --- a/qxl/qxl_drv.h
> +++ b/qxl/qxl_drv.h
> @@ -328,7 +328,7 @@ struct qxl_device {
>  };
>
>  /* forward declaration for QXL_INFO_IO */
> -void qxl_io_log(struct qxl_device *qdev, const char *fmt, ...);
> +__printf(2,3) void qxl_io_log(struct qxl_device *qdev, const char *fmt, ...);
>
>  extern const struct drm_ioctl_desc qxl_ioctls[];
>  extern int qxl_max_ioctl;
> diff --git a/qxl/qxl_release.c b/qxl/qxl_release.c
> index 00604ed..b66ec33 100644
> --- a/qxl/qxl_release.c
> +++ b/qxl/qxl_release.c
> @@ -153,7 +153,7 @@ qxl_release_alloc(struct qxl_device *qdev, int type,
>                 return handle;
>         }
>         *ret = release;
> -       QXL_INFO(qdev, "allocated release %lld\n", handle);
> +       QXL_INFO(qdev, "allocated release %d\n", handle);
>         release->id = handle;
>         return handle;
>  }
> --
> 2.1.0
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@...ts.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ