Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp5421038rwp; Mon, 17 Jul 2023 04:03:11 -0700 (PDT) X-Google-Smtp-Source: APBJJlFryDMi5ujuP/8PK8AxXtaFlREGyad2IicybRDQkWwsEC0tAGQPH+MxkNBK53KXFx1b736L X-Received: by 2002:a05:6a00:1410:b0:67a:8fc7:1b4e with SMTP id l16-20020a056a00141000b0067a8fc71b4emr12189772pfu.4.1689591791380; Mon, 17 Jul 2023 04:03:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689591791; cv=none; d=google.com; s=arc-20160816; b=CfRZGVSezlHb6V9E2g5mDjawicCK5iVoVV4rGVB+9Mu12mqt3/gUdHywYEvRkp9P1d 7VszULTwad2xP9HvAHQiy3xof3SCHQlhWfNYyawvALz6gkuRHWpZVNjMINl8Zt+zPoYv 2OdRHOtQIKDvvctUPKKpA5uLsPie1likWxubrDwAqhtVg8ECyg+A9RyB4EVDQi4DYnXL mN25vKak1kwAm4WYhJ13k6oKHFkQZY+cuY3AF6Rz8tsETF3tabMTQqaet+PCInnSTLdd PB5C1KbC0lpmOvQEvhC6sGAOn6CqJx0K7wIA6Il4O9PtVXkcVVBo1+3C0Awv0YjKztYm yJvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:feedback-id:dkim-signature :dkim-signature; bh=S0E2ik2Q5WYq90hY6DPf5ttlL5ZI3LD8t/OSQKEdXvg=; fh=bGyMcezsPh2M8vI7x7+llGZMSr21oLgXqVNeghZeLBM=; b=mEgadENylpd1XRRfPV77TeNNitlP05nQFfwka/LH6vguuG/TzGUuL4+Wy67kXAsmcS 3eLbsBr8gQOp0QvNb71lU9L9iLIpbiuKcLi95Z4IwXzP0U2+SbdL8N/Dg6QUtGxUCK3K IGbpMrC1PRbWnkLOd7gKbsQNwB1wh55D9NvuflXfTGyhH1ZkaERYby4WhNv0skcp0Usy 1tSbg0uj254fMhKwqBwTHuEdJOOW6w378QbKnQxcXfnE/ilUygznHoR6+O9lhLCz1hKO o+H5VoIdLrrlc9bg8DMYIbQvd97UuNrUh/WKKjhyCtGDFJpVP3QqeEeLB4n3H99Pj0Qb vsQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=TQJqH1SA; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=RYvk0kmE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g7-20020a056a0023c700b00647514cfd36si4313291pfc.242.2023.07.17.04.02.59; Mon, 17 Jul 2023 04:03:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=TQJqH1SA; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=RYvk0kmE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230206AbjGQKo0 (ORCPT + 99 others); Mon, 17 Jul 2023 06:44:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229961AbjGQKoY (ORCPT ); Mon, 17 Jul 2023 06:44:24 -0400 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52CD411F; Mon, 17 Jul 2023 03:44:23 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 923485C00F4; Mon, 17 Jul 2023 06:44:22 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Mon, 17 Jul 2023 06:44:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1689590662; x=1689677062; bh=S0 E2ik2Q5WYq90hY6DPf5ttlL5ZI3LD8t/OSQKEdXvg=; b=TQJqH1SA0SqMkDSkPK /k/fILhxOKxIjgcVIvR78ejZ7deNC009+kGS3/gtHkocV+RIRphWLN2KP6nzw78t 8wtpI1pcFa35H95KEVb8Whm2WyGOANF5bssAO+HLanfIhE0IDP+k4Tn5OPsDPiMF Zwv47RUSSVw1H+QKc2CYR9/zTGWKaC6T+wxyXUpjJDsD7IOlARSbKDUSLQW2/Q7f x6oRHiWGDbrGujVr11wYcEBuipnOg2EHeFU/HR/iO2FNWYZ2QiHOdjKb/JMSkkcq 7YlBBpzdGO8oFeCvtMdJU24DvLmVkjlbnqYQQGPUMx7GrUNUU39L2nDBsvlLCGCT vx8w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1689590662; x=1689677062; bh=S0E2ik2Q5WYq9 0hY6DPf5ttlL5ZI3LD8t/OSQKEdXvg=; b=RYvk0kmE/jJKooZK/9/MD/wu196Tg nmvdXAumSbguMpaFVq+sEWW/Cwx0wStb2MVWJpjGbIaZd2QiAyoTAIRjYngGgl2Q ozFGBdsVr7dugcszUu9zxxL2GZwO1lhJye8hSKOLVVqb8iOFXspSC+7KisFMFd3j ctvEaSV3RV1jHlEc0OMjxKKbrU/ueHz0WBUiGA1Ql6D/1xiTQH6BX4/FSG8LsyiM rj2om6Qj+ziWCwOgRYSk6gRSOgtSdmBsB8mMiwDGij/vzG3DwNe33HjS2FQoJTbD 4mdyJlJ9545fQlXKGW0/FtLmCyEM6VPq5dl1ZIdi01DqKVT0YPMJHi9wQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrgedvgdefudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgesthdtredtreertdenucfhrhhomhepfdetrhhn ugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrghtth gvrhhnpeffheeugeetiefhgeethfejgfdtuefggeejleehjeeutefhfeeggefhkedtkeet ffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrrh hnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 8B15DB60086; Mon, 17 Jul 2023 06:44:21 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-531-gfdfa13a06d-fm-20230703.001-gfdfa13a0 Mime-Version: 1.0 Message-Id: In-Reply-To: References: <20230705140242.844167-1-arnd@kernel.org> Date: Mon, 17 Jul 2023 12:44:01 +0200 From: "Arnd Bergmann" To: "Andy Shevchenko" , "Arnd Bergmann" Cc: "Jiri Kosina" , "Benjamin Tissoires" , "K. Y. Srinivasan" , "Haiyang Zhang" , "Wei Liu" , "Dexuan Cui" , "Paulo Miguel Almeida" , "Michael Kelley (LINUX)" , "Dawei Li" , "Yang Yingliang" , =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= , linux-hyperv@vger.kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] HID: hyperv: avoid struct memcpy overrun warning Content-Type: text/plain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 17, 2023, at 11:36, Andy Shevchenko wrote: > On Wed, Jul 05, 2023 at 04:02:24PM +0200, Arnd Bergmann wrote: >> From: Arnd Bergmann >> >> A previous patch addressed the fortified memcpy warning for most >> builds, but I still see this one with gcc-9: > > JFYI: as of today I have run Linux Next with `make W=1 allmodconfig` on x86_64 > and it seems there are still tons of similar issues which break the build. It's a bit more complex: - yes, there are lots of warnings for memcpy() read overflow when you build allmodconfig kernels with W=1. I have patches for all of these and plan to submit them over time. - This particular one is a memcpy /write/ overflow, i.e. the destination type overflows with the length according to gcc's understanding of the structures. This warning is enabled even without W=1, though it may only show up in certain configurations or compiler versions. Arnd