Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp19711pxb; Wed, 14 Apr 2021 08:29:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtZPR7yVFEWsrixcYhoJhdCiOGo1sLu7QySE/4K01so9AifJg71BwmPP+Sf9SITD9TeX6C X-Received: by 2002:a17:906:4112:: with SMTP id j18mr6411693ejk.171.1618414175917; Wed, 14 Apr 2021 08:29:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618414175; cv=none; d=google.com; s=arc-20160816; b=Wv6Y5hCyMMQBYKImBFuCQ9mQK7QndbMyYGNlaFUDMXF/5GAxkGR/f07ZcDiGmjvGr3 AvT7yWYnc7SBzssqFuGvkcqkIx+BQXqZAbuSVWopRE17IPGtLZ1fuesQllfQYErC+uM9 41n+TFucc6aJbnXolw7OfhZSBoGLu1PYL/+zdzNLU3dcnzKikY+cH0NvLIVi973llFcs m3O+BRcVQtDYNWCOBeYkq4eK6pniYmBFVwXPzW+R5hP/eBpUC/1O3vzoLTfngBlwhwMD pl7RPKK/9Iky27d/LbmK5rVUwCtIaPoHhapu0zNs91xj2mEzg+UWFMZ/8p8LjWlo3teG TjVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=1ATAMsRpLHlB8fK2azocZ6Fl83mzfd2zov1aeD5yZ5w=; b=r4JaxNrOc/IQEOXsesEwpKa24Bq6apLHFHplagx0FgP9cG3zJOVvPPvKFIHV82A5wx Q68cit329MkPZ6FzYOO3/SuyNHxbTeyXEfAP9nij9NZDyshwHYkcDxu1bPU43HcylZJw PYWHVOA03V8LUVIfqZiLb2yQUFRwNckhBP89hFHcRKsOxdSOLZ93yO+nlgLKw44W0Qcx IttaA8Qkgx+CNI/nWpC2i9zVMvDaHaOxL1Uq/F4Yrca+AqnHfbOgSwDGNkrwip01GZnH Cd0zWVj8c4czc1g6+0MbbCXlb6ruZzQft0yDbaWaa8f6vfw5rNRhvDIFw+96ooWwZPi5 pWdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dEltqNwF; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-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. [23.128.96.18]) by mx.google.com with ESMTP id x22si12711075ejj.667.2021.04.14.08.29.07; Wed, 14 Apr 2021 08:29:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dEltqNwF; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-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 S1348850AbhDNLSA (ORCPT + 99 others); Wed, 14 Apr 2021 07:18:00 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:20973 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229886AbhDNLR7 (ORCPT ); Wed, 14 Apr 2021 07:17:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618399058; 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=1ATAMsRpLHlB8fK2azocZ6Fl83mzfd2zov1aeD5yZ5w=; b=dEltqNwFdsPcScpTGISeMtzYsvhRuSzckI5GuWlxfEZJ14rQnvatMzC4u5ajpLIZt+kG6b NMwdon8sItgV46qbIQ8g+WfiTIsJ661JrKxF9d7D2DS15Lx03oaL4gKt/HO1uYhxPO8TBH A3X+8cP542CiME26Qak/S25BeoDyUj4= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-290-GRVxyLSHNi-2EYccqz0KjQ-1; Wed, 14 Apr 2021 07:17:36 -0400 X-MC-Unique: GRVxyLSHNi-2EYccqz0KjQ-1 Received: by mail-ed1-f69.google.com with SMTP id l2-20020a50e8c20000b02903825413b3e0so3122906edn.10 for ; Wed, 14 Apr 2021 04:17:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=1ATAMsRpLHlB8fK2azocZ6Fl83mzfd2zov1aeD5yZ5w=; b=pmDgSFHkwzVCXSZREjFxM7Qmro5fcfNIUUqHBzErEmnGAdEjEUOojnsb/7zPi7wn2n XA4VlcX6TnV2lWEMmClISc1pKU1TdtnKYw85JZch++KYZcxjPZvD5zDEkoSo0wAmaAZK lQvdyEVebgvt/z+mveaP/wEMk6wOZ3GbCCqsz9fP+LkvI1iRXntufA7BdKV+u9y+vavz A1aGPip9C28afn3iK/E/OVkiYPfVu+E/W8mvIvN3X5OAf9S3u9TuztjF0yjAgL+jfIvZ h6EtOfLhrGf3elc/74mCr4WmOAzUGpPhXHp82jFcH4ePqzZDPi+vPZgm1NRCh9z0ZaYi MXLA== X-Gm-Message-State: AOAM5305iTOYmrIui58mqFZTTOI5ra/2C9dogbwG8YQTwptpb+8z1dmn v0j0BOuFhT3pEXjSZySeemfTuTmfY8bWPGN6TaUQBWeNEyJypCsL8Si0bL4CqX2YwTNaMfrh6VT XNsrC9D17EoFdClXCBoTuUdXQa9KYqKHm++NHOIB3NDIuR1hhegfC/j65JnaCyik62jKirhHqPT Akv50= X-Received: by 2002:aa7:dcc7:: with SMTP id w7mr39734869edu.255.1618399055074; Wed, 14 Apr 2021 04:17:35 -0700 (PDT) X-Received: by 2002:aa7:dcc7:: with SMTP id w7mr39734856edu.255.1618399054947; Wed, 14 Apr 2021 04:17:34 -0700 (PDT) Received: from x1.localdomain (2001-1c00-0c1e-bf00-1054-9d19-e0f0-8214.cable.dynamic.v6.ziggo.nl. [2001:1c00:c1e:bf00:1054:9d19:e0f0:8214]) by smtp.gmail.com with ESMTPSA id dh27sm11415347edb.28.2021.04.14.04.17.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 14 Apr 2021 04:17:34 -0700 (PDT) Subject: Re: "rfkill: add a reason to the HW rfkill state" breaks userspace To: Benjamin Berg , Johannes Berg , "Grumbach, Emmanuel" Cc: linux-wireless References: <2db76f5161be090f9fec2bc4fcb8973533e32564.camel@sipsolutions.net> From: Hans de Goede Message-ID: <5064e714-1e1e-237a-b2e4-00123f95e8bf@redhat.com> Date: Wed, 14 Apr 2021 13:17:34 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Hi, On 4/14/21 12:46 PM, Benjamin Berg wrote: > Hi, > > On Wed, 2021-04-14 at 12:29 +0200, Hans de Goede wrote: >> On 4/14/21 11:52 AM, Benjamin Berg wrote: >>> [SNIP] >>> >>> That said, the g-s-d event handler is checking the size of the read >>> against the struct size. This is obviously wrong, it should only >>> check >>> that the read was successful (or check for >= V1 size). >> >> Right this is what I was referring to a g-s-d compiled against the >> new headers with a struct size of 9 will read 8 bytes on an old >> kernel >> and that will fail the len check, so it won't work. >> >> But this will actually never happen as I just noticed that g-s-d >> uses a private rfkill.h copy with the old 8 bytes struct definition. >> >> So with the buffered-io disabled everything should work fine, >> see my other email in this thread. > > OK, so at least that part of the fix should be backported to older > release branches. Ack, that fix should be backported to fix issues with newer kernels and then everything should work fine. Regards, Hans