Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp437436pxf; Thu, 18 Mar 2021 04:19:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwb4+qU6zjiqBE5PTP0UiIl1PFOHWpq1eNo3JmrdgFP0bmpNxa4WlLgRFcAY3gZYB9NpCdJ X-Received: by 2002:a17:906:cf90:: with SMTP id um16mr41087007ejb.389.1616066341214; Thu, 18 Mar 2021 04:19:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616066341; cv=none; d=google.com; s=arc-20160816; b=kRzB5hV04t/WiDq1JcHKWGLCIoRSiR2r2iVq7jRnw95W9MMXK9IEKBFTBZVgFE6H1M mlj6Fs9/JMkKoFArf+kxdRs4KMmEgyhov9Yer+L49KkQc9pftdGwSfdZoelXrcN6tank 8ZOLXD0q6tc6pSKKntInkAfmy7/ik4Ys0NvFB0E4mfpMMe3yrGvUYndOf8nSUkPNA3Ff CphbgNiC2kf6RP99lLIwMg3PjDKrbjHxAxxL01HA1K+qVHddSaUWM7CcWP2eZ2H+Op4n 0XNXNZk1vS/qENT9ZywarcmUueWvdwlVU5XyEgYrYZZTceTw5CWsnzAt9XVPxqi4O21X 4rOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=Ns/6ObC8O0FbuZZvmtx/IOB8gFrs8wtbSY1BarT2468=; b=bMdrp5JaiBtrBWHgXs5uo7D4XmdC247IfhJtcDCOMnLDPwvmA8mfICka8/UrTV33YE 62uupaSKbwQ6z5pMzKHMjvEoNm6U9NvOJkSLtBJ2jwdJ87uEoqJya9ezEkMYRgXyWmsi tBH84RMjEk/0OpY8axhJkjGBf6mhbuH4scLRYSn9LtL+gooQYZTa04oduWGl7G/vwaEO WkJ6s9mDqkyoWb64zBKYHuMnkt3/83YKqO3GoCASFNtKiPPTNNZTSuzbaqoBQDB3XElE 2dHzRVgS56J/TgOX+2gDKYBtIEVwbmlLmZMl00MbcYdBNwcHVPJbb2UnxDUJsuIwalcx fbgw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s16si1402009ejz.72.2021.03.18.04.18.38; Thu, 18 Mar 2021 04:19:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231162AbhCRLRQ (ORCPT + 99 others); Thu, 18 Mar 2021 07:17:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231229AbhCRLQ7 (ORCPT ); Thu, 18 Mar 2021 07:16:59 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 443A5C06174A; Thu, 18 Mar 2021 04:16:59 -0700 (PDT) Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94) (envelope-from ) id 1lMqe7-0008Rq-9w; Thu, 18 Mar 2021 12:16:55 +0100 Message-ID: <9db9d9ae751a50c9fd1da1ee3bd4c564546ce1c5.camel@sipsolutions.net> Subject: Re: systemd-rfkill regression on 5.11 and later kernels From: Johannes Berg To: Takashi Iwai Cc: Emmanuel Grumbach , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 18 Mar 2021 12:16:54 +0100 In-Reply-To: References: <54859a03b8789a2800596067e06c8adb49a107f5.camel@sipsolutions.net> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.4 (3.38.4-1.fc33) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-malware-bazaar: not-scanned Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2021-03-18 at 12:11 +0100, Takashi Iwai wrote: > > That said, we can "fix" this like this, and hope we'll not get this > > again? And if we do get it again ... well, we keep renaming the structs > > and add "struct rfkill_event_v3" next time? > > Yeah, that's a dilemma. An oft-seen trick is to add more bytes for > the future use, e.g. extend to 16 bytes and fill 0 for the remaining. Yeah, I guess I could stick a reserved[15] there, it's small enough. > In the sound driver, we introduced an ioctl to inform from user-space > which API protocol it can speak, and the kernel falls back to the old > API/ABI if it's a lower version or it's not told at all. But I'm not > sure whether such an implementation is optimal for rfkill. I thought about it, but it ... doesn't really help. Somebody's going to do ioctl(..., sizeof(ev)) == sizeof(ev) and break on older kernels, or == my_fixed_size, or ... something. It's not really going to address the issue entirely. And it's more complexity. johannes