Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp6883822ybe; Wed, 18 Sep 2019 10:35:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqzo9H6KgiWUV+b88Iv7kUcrDa4iQByqQ+gMVSCa9xg/WN4jNYOeUwiioPT8qRhN0q1bT/d7 X-Received: by 2002:a17:906:b211:: with SMTP id p17mr10475726ejz.11.1568828104282; Wed, 18 Sep 2019 10:35:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568828104; cv=none; d=google.com; s=arc-20160816; b=slbYDqJuGmVCuSvZ4MJ3gSmJUtyyHYIfCc3ROPMyoxYr1MEQ9WCOzFHiiyREj419eb g+pmOB29nmacG6V+OPW6hcByOJSRiTY3j8XwPgEI90OAzUuj9s9pi3TLuwooLCuSALZa tSQl2//4InuFyMuzg1XPyLjZW0lVDf7FPIcBQIK4jDuxLr+4Jn2scHBMqLVMcDcr9FDF 8Uz2KFwS/b8TeVeNHpukUALMZ3HoFlu2RIp3FT3LOzPb7JI2N+JUo/3hcYwCoB9HRMEu OdteFtTBzVvoLskySwwF7FOo6tXAdX2AhgnWv5VHNGJR3TG6t8K73xbdXrac9KqBARnJ 8sRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Jl3xf+SlbbmgNVj3rIhprzvu6KTO4+fHOB8Vm/+azHE=; b=PE2JukTcZ1WeIBqYz2MMYekVz7sqO6hGvFXJbDq6IMr6rcPq+sabiJanFhnC2kBNRQ QDcd/O5vUTQOdKenNSVD78pS9kk+WYBs1gv6sJj/SmZUf2AuAeRsg8MiKpACSkKB65oN bilKkLjZMVOrSllC8VlbbxO6wlYgcB2AfuEEwpED2fPt3++onfR6OiUEpTZ4TH+l4EW+ AnIV377x25XZ8bLH6A/hkZyU1uunIt5Ht8G7lOG9ZTPkJ4+yNtLJvK2Ljn6erBWS6T2P 6vTQj3uu2RaAgTuXXkYr+Ra1oZH/6ILVpG51rrpoz4DpoYLqc4/U5FWtJQJQfUSQs2PI iVsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=D42nakkj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pv13si3140993ejb.79.2019.09.18.10.34.40; Wed, 18 Sep 2019 10:35:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=D42nakkj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731678AbfIRPfe (ORCPT + 99 others); Wed, 18 Sep 2019 11:35:34 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:57862 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731049AbfIRPfe (ORCPT ); Wed, 18 Sep 2019 11:35:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1568820933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Jl3xf+SlbbmgNVj3rIhprzvu6KTO4+fHOB8Vm/+azHE=; b=D42nakkj0tv+gCmACBmzDtIFSZ0gedpwg2e5eKbKlVCei3pFZp1QNmJwl2AitCOOX9rRTk zCc5+h3XY/fcgznEHbmXRWnyuQhGwVYRezQ75o3slqMAWsgYSrrQNLqvoVoxheqghRSO0T kV1DnoWZdukzgkcF3LFUb0PQ2zjkbVQ= Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-7-EkRq5__COqK0WQEf5pVX2g-1; Wed, 18 Sep 2019 11:35:31 -0400 Received: by mail-qt1-f198.google.com with SMTP id z4so494462qts.0 for ; Wed, 18 Sep 2019 08:35:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+5euqK1Uayja2/4T0pIwBXXljs7m3c7t7lzxpmy9RYE=; b=d/E3OWGPvgKAtfeVSGMqh22rOo+SVX85/gdg/ILXiz+kQAqY92ksMcasBlOUlLwian Uds+oILxKFIWpf0xxNQdIDAEaVKyuQUFvZ0NWW8/wvKHRAG61zuVbw8eh/t1nkf2v9ZH MTxN8WhsaPOagEBWsjLeg0zm3rvNdNjG1XaAXAXXgsMuXWHcwj/OUrm8+0YbLloowQDl r2JBCafXZhxukvCydDhvEbMtocx9mc80tQVmdI03KuOYrCglufzWHhC+VPcg3h56zOkI zFtHEy/Zzfoy/D8HMMgAP9vy3YP/Mkda3JSkP3apb9cCCKilW03WR82XX414yLSSclGB X8bg== X-Gm-Message-State: APjAAAUQbpnGRcfHinCB+YHnvWb4xmpZwTugSdxu2O7GaHpc2GHRY/VJ P6XVZpGF5Qror+Yip8d+lHrHv3rbc4+kcDAn3rs/eXErjJzLP3vYhj4kgGRxnwOOnURJ5VfBNP0 I4kucHIgNEqpg7r+vD6DD5yQDEPbkyvhuG4I9dl5W X-Received: by 2002:ac8:4251:: with SMTP id r17mr4751030qtm.260.1568820930807; Wed, 18 Sep 2019 08:35:30 -0700 (PDT) X-Received: by 2002:ac8:4251:: with SMTP id r17mr4751014qtm.260.1568820930584; Wed, 18 Sep 2019 08:35:30 -0700 (PDT) MIME-Version: 1.0 References: <20190812152022.27963-1-stillcompiling@gmail.com> <20190812152022.27963-4-stillcompiling@gmail.com> In-Reply-To: From: Benjamin Tissoires Date: Wed, 18 Sep 2019 17:35:19 +0200 Message-ID: Subject: Re: [PATCH v3 3/3] HID: core: fix dmesg flooding if report field larger than 32bit To: Joshua Clayton Cc: Jiri Kosina , "open list:HID CORE LAYER" , open list , Joe Perches X-MC-Unique: EkRq5__COqK0WQEf5pVX2g-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 29, 2019 at 1:26 AM Joshua Clayton w= rote: > > ping? > I'd love to see this get in. > with distro kernel I have effectively no dmesg due to this issue Apologies for the delay. I really thought we should find a better way of fixing this, until I got a laptop affected by it. This series is a must have. Applied to for-5.4/core Cheers, Benjamin > > On Mon, Aug 12, 2019 at 9:20 AM wrote: > > > > From: Joshua Clayton > > > > Only warn once of oversize hid report value field > > > > On HP spectre x360 convertible the message: > > hid-sensor-hub 001F:8087:0AC2.0002: hid_field_extract() called with n (= 192) > 32! (kworker/1:2) > > is continually printed many times per second, crowding out all else. > > Protect dmesg by printing the warning only one time. > > > > The size of the hid report field data structure should probably be incr= eased. > > The data structure is treated as a u32 in Linux, but an unlimited numbe= r > > of bits in the USB hid spec, so there is some rearchitecture needed now= that > > devices are sending more than 32 bits. > > > > Signed-off-by: Joshua Clayton > > > > diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c > > index 210b81a56e1a..3eaee2c37931 100644 > > --- a/drivers/hid/hid-core.c > > +++ b/drivers/hid/hid-core.c > > @@ -1311,8 +1311,8 @@ u32 hid_field_extract(const struct hid_device *hi= d, u8 *report, > > unsigned offset, unsigned n) > > { > > if (n > 32) { > > - hid_warn(hid, "hid_field_extract() called with n (%d) >= 32! (%s)\n", > > - n, current->comm); > > + hid_warn_once(hid, "%s() called with n (%d) > 32! (%s)\= n", > > + __func__, n, current->comm); > > n =3D 32; > > } > > > > -- > > 2.21.0 > >