Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp1679865lqt; Wed, 20 Mar 2024 10:42:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWeQdrGcr961BSVJ2I0YdFrSt/EQqj458nmjf3Dr8B/PwYHAnn2+DYtMs8uXelXP1e9+q9IAzeEk3KTYImfDa6NRgMcmX12oWVrXmBwyw== X-Google-Smtp-Source: AGHT+IHjYxnK9qrxTy4MfUokMudsY6HGAJp7k/yKRMwsXKyBuqen77tzHd4L1ko8+aCmuxy9QoWX X-Received: by 2002:a50:bae1:0:b0:566:72b0:286a with SMTP id x88-20020a50bae1000000b0056672b0286amr355327ede.2.1710956572274; Wed, 20 Mar 2024 10:42:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710956572; cv=pass; d=google.com; s=arc-20160816; b=kF7oDXaEokvgaz3i7ael7fpEflXQ7QZRuaPzqlP9X5bGX5va0m7JPBwWJ5AQxN1LM8 hE1eou6YPhRLNyRsY/CIwL6q9p5hbxo9Cc09ttlPcdA3n1ukEgOGoyYiivIJIXgNKNTk 7mkd200Q5w6XO9jozeUGelRnUdrlcnFVY/MgmFdNTCJeodniFuvkUEWHkP97hxUE0VCb yvTMvh0oFOW+7AqzoJYUedlr240KTygoiGhRaxZvQ3w5sE8x5HQB8Pf7Z0vyejpby//j 0AKeYq1WFYyZ00s+KvPWBmYM5Ry9QwqZ7EuQiMyC3QSTGQVCwjyyljwN4MYgfm7UpVQe PtFg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=4PNmrfeclRSaZ0piCvl3NPFSnMqmFKWwWU1pPxBzzB4=; fh=Y5Eht4kiHebEQLyvqWz9rf9VfKhHkXFlo6HiZLE4IQ4=; b=itO5o1N9djtagzcx3lfYylMU5LBfHIpvrSg0Uk7F7nx2E6g4f/VVI1so0jLo6SdACc /TuXFK+dJF6IRo8/R0dVCkEvlEV0TWDbF8eXBDfHPFrI98/q1+ni4fdNuNfBe1mHJoA2 Dvpxs+wDJtKlH89S2+YYgFwokG9mFqcTi9/gQOiZ+4c+Q+XKsxN4+UTKPs8860pOZuEV OloMI1lGX7Dr0uX8RKqrwts++THce8nGCo2h25+yzxvuBOjMvNz38sKPck/3NQaQku9N L1F+i+oBqO+G+CC0ilKDwL7Iz0/fhFX/UR5h+kEcfghpppQFKrjPxtEi4SjHypEikCXm F10A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=fGF0L05k; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-109247-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-109247-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id i13-20020a50870d000000b00568d7b0a1dbsi3627545edb.435.2024.03.20.10.42.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 10:42:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-109247-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=fGF0L05k; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-109247-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-109247-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id D451D1F2453C for ; Wed, 20 Mar 2024 17:42:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 389C26A34C; Wed, 20 Mar 2024 17:42:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fGF0L05k" Received: from mail-yb1-f172.google.com (mail-yb1-f172.google.com [209.85.219.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C2AC0524B7; Wed, 20 Mar 2024 17:42:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710956563; cv=none; b=X7s5l4mQ1GRvWgK7i19+UGHWM+6q+0liDRCAxxJdU6rG90CPaGSsjXY7FBWQY/mun8nv48srwQsIAm8PhuRJq9frO7Pj59S0Resc7bhHYjtSLzlv76oYWuTENl98FGixwcGqdA5x5NpQFZb/Gz+FmJur5hqPEPFQY8PZaz6oevY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710956563; c=relaxed/simple; bh=8L65Or9/rr57UNhiffCl+0rh3Lazf36OqwDy6Z2KAvs=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=O5znT3ZsEtsKY+l1/T7OH1NKz7+IEZXGsgcS/hL1TuMSBTP1gTBMQAG5UQ8TWZOocQXe2dWrvT2jEyAdaJFOSNxxacANqPPaSIaQ1KNG2wMSGt7Fu+rGqed4nDzHqO7pI8Yfcr/rJB4N3y1lONuMgrhbmtWUg8AsZRmEHaivoOQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=fGF0L05k; arc=none smtp.client-ip=209.85.219.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-yb1-f172.google.com with SMTP id 3f1490d57ef6-dcc6fc978ddso154427276.0; Wed, 20 Mar 2024 10:42:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710956559; x=1711561359; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=4PNmrfeclRSaZ0piCvl3NPFSnMqmFKWwWU1pPxBzzB4=; b=fGF0L05k7M08tVZj9Jq4ghWmERcf+t9Cr4RixarbEDwaj0vXy3QQ7spMgdp2gIG1Fg rs4JnDooSiRwAV5jNmkquvqwnIGslVzJMdgZGyRWMwJ0zMNNQx20in3WcQs6Vx1YC+IS gupl2txQuUt+zrTNvatq8ljNhfV6xvnyppb+HbYYPyVIsdCrLFh6WtDvGBsqUJKDdrNt GeHsN/WuixP32W4t5aTEkMtjc4IkfEBGjHfs4TET3Ofi3Vd/L+FWXeF+VcgjysR6midk XcFJ4bP70KmGgvWADFiFCa71k16OvL6kJar9cptFOT/U8CyxphY56n8bWlrL/GIxEI3H xWyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710956559; x=1711561359; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4PNmrfeclRSaZ0piCvl3NPFSnMqmFKWwWU1pPxBzzB4=; b=hNavRp/Nfh7fto4q2xrMX1Z/urLb4S+1eC1q3YSWQCAnaQNJQ2/Ni1KiLLiTmN2Nsx 9UgoRAis73nNBPPZaCqpHL3inoFhbnpxPFs577UFneo9Y9t61KQuqbOazHGGbu2gyZBR 5V09xqH4ddFF4d0L7FFNpQsDuoaxMiPSYsRdRO9l4tdBsHIkuccPWzJBdUfhQV8cn+1u v9CK+u7Sj50N1xre2weGQhH1kvhKlE4/2f/xAcpZLW20wyQwNNXi2g68GEngNVJZYFrp YIEfwQvhp5fuevaBTqR+u6CDugeLu3gwkNInHFNj1IwmjqprfgYdC/IyzWIERglLwVQ2 fPsg== X-Forwarded-Encrypted: i=1; AJvYcCUQp9sEgs/lP/TkddxXpHONsuzp9Y8r42ntoMDVxFEZC2ziSh9KQRngF37w4DaNkJpBdt3ooqU+Ls1Ma+MP+hmg2ENceCk1g/KRMtFvQNk85HgXcr8uCjf0TFti5Y0xaIYy1gE= X-Gm-Message-State: AOJu0Yx/CISFKtwAQh4KNJjDv54PcvNYJCcGVABNKLj6TOe/pzCVn9hi 6YPB88BbyBe/EsAuZvThRHInGe8WohKxHt/nQnIYIrtM1hsXgWSKs7LwMvjixjwWTAiNKy3Cov5 J+n3fgjO3LVniZGNO5bt+fMbBSIpe67U6 X-Received: by 2002:a25:c747:0:b0:dd1:6cad:8fd3 with SMTP id w68-20020a25c747000000b00dd16cad8fd3mr284023ybe.27.1710956559522; Wed, 20 Mar 2024 10:42:39 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231011193444.81254-1-jandryuk@gmail.com> In-Reply-To: From: Jason Andryuk Date: Wed, 20 Mar 2024 13:42:27 -0400 Message-ID: Subject: Re: [PATCH v3] Input: xen-kbdfront - drop keys to shrink modalias To: linux-kernel@vger.kernel.org, Dmitry Torokhov Cc: Phillip Susi , stable@vger.kernel.org, Mattijs Korpershoek , linux-input@vger.kernel.org, xen-devel , Juergen Gross Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Dmitry, Do you have any feedback, or can you pick up this patch? It solves a real issue affecting udev, which crashes the Debian installer and breaks the mouse for Gnome. Or would you be okay if this patch went in via the Xen tree? Thanks, Jason On Wed, Nov 1, 2023 at 10:11=E2=80=AFAM Jason Andryuk = wrote: > > Hi Dmitry, > > Do you have any feedback or can you pick this up? > > Thanks, > Jason > > On Wed, Oct 11, 2023 at 3:34=E2=80=AFPM Jason Andryuk wrote: > > > > xen kbdfront registers itself as being able to deliver *any* key since > > it doesn't know what keys the backend may produce. > > > > Unfortunately, the generated modalias gets too large and uevent creatio= n > > fails with -ENOMEM. > > > > This can lead to gdm not using the keyboard since there is no seat > > associated [1] and the debian installer crashing [2]. > > > > Trim the ranges of key capabilities by removing some BTN_* ranges. > > While doing this, some neighboring undefined ranges are removed to trim > > it further. > > > > An upper limit of KEY_KBD_LCD_MENU5 is still too large. Use an upper > > limit of KEY_BRIGHTNESS_MENU. > > > > This removes: > > BTN_DPAD_UP(0x220)..BTN_DPAD_RIGHT(0x223) > > Empty space 0x224..0x229 > > > > Empty space 0x28a..0x28f > > KEY_MACRO1(0x290)..KEY_MACRO30(0x2ad) > > KEY_MACRO_RECORD_START 0x2b0 > > KEY_MACRO_RECORD_STOP 0x2b1 > > KEY_MACRO_PRESET_CYCLE 0x2b2 > > KEY_MACRO_PRESET1(0x2b3)..KEY_MACRO_PRESET3(0xb5) > > Empty space 0x2b6..0x2b7 > > KEY_KBD_LCD_MENU1(0x2b8)..KEY_KBD_LCD_MENU5(0x2bc) > > Empty space 0x2bd..0x2bf > > BTN_TRIGGER_HAPPY(0x2c0)..BTN_TRIGGER_HAPPY40(0x2e7) > > Empty space 0x2e8..0x2ff > > > > The modalias shrinks from 2082 to 1550 bytes. > > > > A chunk of keys need to be removed to allow the keyboard to be used. > > This may break some functionality, but the hope is these macro keys are > > uncommon and don't affect any users. > > > > [1] https://github.com/systemd/systemd/issues/22944 > > [2] https://lore.kernel.org/xen-devel/87o8dw52jc.fsf@vps.thesusis.net/T= / > > > > Cc: Phillip Susi > > Cc: stable@vger.kernel.org > > Signed-off-by: Jason Andryuk > > Reviewed-by: Mattijs Korpershoek > > --- > > v3: > > Add Mattijs R-b > > Put /* and */ on separate lines > > --- > > drivers/input/misc/xen-kbdfront.c | 11 ++++++++++- > > 1 file changed, 10 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/input/misc/xen-kbdfront.c b/drivers/input/misc/xen= -kbdfront.c > > index 67f1c7364c95..d59ba8f9852e 100644 > > --- a/drivers/input/misc/xen-kbdfront.c > > +++ b/drivers/input/misc/xen-kbdfront.c > > @@ -256,7 +256,16 @@ static int xenkbd_probe(struct xenbus_device *dev, > > __set_bit(EV_KEY, kbd->evbit); > > for (i =3D KEY_ESC; i < KEY_UNKNOWN; i++) > > __set_bit(i, kbd->keybit); > > - for (i =3D KEY_OK; i < KEY_MAX; i++) > > + /* > > + * In theory we want to go KEY_OK..KEY_MAX, but that gr= ows the > > + * modalias line too long. There is a gap of buttons f= rom > > + * BTN_DPAD_UP..BTN_DPAD_RIGHT and KEY_ALS_TOGGLE is th= e next > > + * defined. Then continue up to KEY_BRIGHTNESS_MENU as = an upper > > + * limit. > > + */ > > + for (i =3D KEY_OK; i < BTN_DPAD_UP; i++) > > + __set_bit(i, kbd->keybit); > > + for (i =3D KEY_ALS_TOGGLE; i <=3D KEY_BRIGHTNESS_MENU; = i++) > > __set_bit(i, kbd->keybit); > > > > ret =3D input_register_device(kbd); > > -- > > 2.41.0 > >