linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "dmitry.torokhov@gmail.com" <dmitry.torokhov@gmail.com>
To: Alexey Makhalov <amakhalov@vmware.com>
Cc: Simon Horman <horms@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"virtualization@lists.linux.dev" <virtualization@lists.linux.dev>,
	"H . Peter Anvin" <hpa@zytor.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"dave.hansen@linux.intel.co" <dave.hansen@linux.intel.co>,
	"bp@alien8.d" <bp@alien8.d>, Ingo Molnar <mingo@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Zack Rusin <zackr@vmware.com>,
	Tim Merrifield <timothym@vmware.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"daniel@ffwll.ch" <daniel@ffwll.ch>,
	"airlied@gmail.com" <airlied@gmail.com>,
	"tzimmermann@suse.de" <tzimmermann@suse.de>,
	"mripard@kernel.org" <mripard@kernel.org>,
	"maarten.lankhorst@linux.intel.com"
	<maarten.lankhorst@linux.intel.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"richardcochran@gmail.com" <richardcochran@gmail.com>,
	"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	Linux-graphics-maintainer <Linux-graphics-maintainer@vmware.com>,
	Pv-drivers <Pv-drivers@vmware.com>, Nadav Amit <namit@vmware.com>,
	Ajay Kaher <akaher@vmware.com>, Jeff Sipek <jsipek@vmware.com>
Subject: Re: [PATCH 4/6] input/vmmouse: Use vmware_hypercall API
Date: Fri, 24 Nov 2023 20:58:28 -0800	[thread overview]
Message-ID: <ZWF-9DmwakJBonmf@google.com> (raw)
In-Reply-To: <A64E0517-57D9-47DF-8DD8-040EE6843246@vmware.com>

On Sat, Nov 25, 2023 at 01:22:58AM +0000, Alexey Makhalov wrote:
> On Nov 24, 2023, at 11:46 AM, Simon Horman <horms@kernel.org> wrote:
> > 
> > On Wed, Nov 22, 2023 at 03:30:49PM -0800, Alexey Makhalov wrote:
> >> Switch from VMWARE_HYPERCALL macro to vmware_hypercall API.
> >> Eliminate arch specific code. No functional changes intended.
> >> 
> >> Signed-off-by: Alexey Makhalov <amakhalov@vmware.com>
> > 
> > Hi Alexey,
> > 
> > it is not strictly related to this patch, but I notice than an x86_64
> > allmodconfig build with W=1 using gcc-13 fails to compile this file.
> > 
> > It appears that the problem relates to both priv->phys and
> > psmouse->ps2dev.serio->phys being 32 bytes.
> > 
> > 
> > drivers/input/mouse/vmmouse.c: In function ‘vmmouse_init’:
> > drivers/input/mouse/vmmouse.c:455:53: error: ‘/input1’ directive output may be truncated writing 7 bytes into a region of size between 1 and 32 [-Werror=format-truncation=]
> >  455 |         snprintf(priv->phys, sizeof(priv->phys), "%s/input1",
> >      |                                                     ^~~~~~~
> > drivers/input/mouse/vmmouse.c:455:9: note: ‘snprintf’ output between 8 and 39 bytes into a destination of size 32
> >  455 |         snprintf(priv->phys, sizeof(priv->phys), "%s/input1",
> >      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >  456 |                  psmouse->ps2dev.serio->phys);
> >      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > 
> > ...
> 
> Hi Simon, thanks for reporting the issue.
> Zack, please take a look.

We want the truncation behavior and we do not want GCC to make noise
about these, that is why "format-truncation" is explicitly disabled for
normal compiles. I guess we should exclude it even when we compile with
W=1 instead of doing pointless changes in the drivers.

Thanks.

-- 
Dmitry

  reply	other threads:[~2023-11-25  4:58 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-22 23:30 [PATCH 0/6] VMware hypercalls enhancements Alexey Makhalov
2023-11-22 23:30 ` [PATCH 1/6] x86/vmware: Move common macros to vmware.h Alexey Makhalov
2023-11-22 23:30 ` [PATCH 2/6] x86/vmware: Introduce vmware_hypercall API Alexey Makhalov
2023-11-22 23:30 ` [PATCH 3/6] ptp/vmware: Use " Alexey Makhalov
2023-11-22 23:30 ` [PATCH 4/6] input/vmmouse: " Alexey Makhalov
2023-11-24 19:46   ` Simon Horman
2023-11-25  1:22     ` Alexey Makhalov
2023-11-25  4:58       ` dmitry.torokhov [this message]
2023-11-25  5:01   ` Dmitry Torokhov
2023-11-22 23:30 ` [PATCH 5/6] drm/vmwgfx: " Alexey Makhalov
2023-11-22 23:30 ` [PATCH 6/6] x86/vmware: Add TDX hypercall support Alexey Makhalov
2023-11-22 23:30 ` [PATCH 0/6] VMware hypercalls enhancements Alexey Makhalov
2023-12-01 23:24   ` [PATCH v2 " Alexey Makhalov
2023-12-01 23:24     ` [PATCH v2 1/6] x86/vmware: Move common macros to vmware.h Alexey Makhalov
2023-12-04 10:32       ` Borislav Petkov
2023-12-01 23:24     ` [PATCH v2 2/6] x86/vmware: Introduce vmware_hypercall API Alexey Makhalov
2023-12-04 10:35       ` Borislav Petkov
2023-12-01 23:24     ` [PATCH v2 3/6] ptp/vmware: Use " Alexey Makhalov
2023-12-01 23:24     ` [PATCH v2 4/6] input/vmmouse: " Alexey Makhalov
2023-12-01 23:24     ` [PATCH v2 5/6] drm/vmwgfx: " Alexey Makhalov
2023-12-05 20:27       ` Borislav Petkov
2023-12-05 21:18         ` Alexey Makhalov
2023-12-01 23:24     ` [PATCH v2 6/6] x86/vmware: Add TDX hypercall support Alexey Makhalov
2023-12-04 10:31       ` Borislav Petkov
2023-12-05 21:24         ` Dave Hansen
2023-12-05 21:41           ` Alexey Makhalov
2023-12-05 22:43             ` Tim Merrifield
2023-12-05 23:03             ` Dave Hansen
2023-12-06  0:11               ` Alexey Makhalov
2023-12-06  7:15                 ` [PATCH] " Alexey Makhalov
2023-12-07 17:12                   ` Dave Hansen
2023-12-08  2:27                     ` Alexey Makhalov
2023-12-08  2:32                       ` Alexey Makhalov
2023-12-05 19:57       ` [PATCH v2 6/6] " kernel test robot
2023-12-05 21:04       ` kernel test robot
2023-11-22 23:30 ` [PATCH 1/6] x86/vmware: Move common macros to vmware.h Alexey Makhalov
2023-11-22 23:30 ` [PATCH 2/6] x86/vmware: Introduce vmware_hypercall API Alexey Makhalov
2023-11-22 23:30 ` [PATCH 3/6] ptp/vmware: Use " Alexey Makhalov
2023-11-22 23:30 ` [PATCH 4/6] input/vmmouse: " Alexey Makhalov
2023-11-22 23:30 ` [PATCH 5/6] drm/vmwgfx: " Alexey Makhalov
2023-11-22 23:30 ` [PATCH 6/6] x86/vmware: Add TDX hypercall support Alexey Makhalov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZWF-9DmwakJBonmf@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=Linux-graphics-maintainer@vmware.com \
    --cc=Pv-drivers@vmware.com \
    --cc=airlied@gmail.com \
    --cc=akaher@vmware.com \
    --cc=amakhalov@vmware.com \
    --cc=bp@alien8.d \
    --cc=daniel@ffwll.ch \
    --cc=dave.hansen@linux.intel.co \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=horms@kernel.org \
    --cc=hpa@zytor.com \
    --cc=jsipek@vmware.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mingo@redhat.com \
    --cc=mripard@kernel.org \
    --cc=namit@vmware.com \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=timothym@vmware.com \
    --cc=tzimmermann@suse.de \
    --cc=virtualization@lists.linux.dev \
    --cc=x86@kernel.org \
    --cc=zackr@vmware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).