From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) (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 301F237C0FB for ; Wed, 8 Apr 2026 11:10:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775646659; cv=none; b=GVMLaIcFBav4pVZzW0mHYVGlhmiKMWpKnaiKMuNFT8v88cYvza+uU3VflV1vRYmf8/kYjVQF3k1h11h5qqwFHnRCv/OGYsFW6KXFhx040wzdYASU8yi39EdYEXcG3FabWVkbNzctbnSLqc9F6tZC2O01kX5djOvpVHusFxq3cdw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775646659; c=relaxed/simple; bh=jFZjtktr1182f8BWsVbMJEHb9H4MNzz+xm/vLv4K1D8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=JkmVUilLTU6kbJoeuT8rtyqacqCYPQEFjJL61eiYXjr645dHB5ajNwR96xMzlmtMkyO96mj+bWJ+qsiuxi6VPxVhAdw1gxvXS3+SF86XBI+hEnA2ZAcBqhZe7KIZAHU/WSjsJcs8VU7B4gEUhOtYhVmcp6/jTQZkded0hv3vnoE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=Scmo/EJ+; arc=none smtp.client-ip=209.85.221.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="Scmo/EJ+" Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-43b87970468so4712333f8f.3 for ; Wed, 08 Apr 2026 04:10:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1775646656; x=1776251456; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=vfllRBgwiwa3h1YU32+J/3Xslzo7VJyKCR+sEXLOPdc=; b=Scmo/EJ+ekij29gx2CQSx27ITvBa/vg71uKIqGTyxtvEoc4ODr3I/8+pVOEglOpK5I SdoOTFP/ha9+eVfICmbo0AzaEr19G0QV/cuuk1hpEbANdcMkGMfbx+aWtl8hzDIW4BYr jh3bse40AqusVWoyFJ6OXswjb3tJ+cistJiPXnDN4VH/eeSTUcUjDVAs0thGX3gj84nM 120ormNdhG6+CXwLNBhFFxSBrOPv6HEKau4TWb+kov0R4vstoPeApF6eKOom2WziCJXg hIpV6UhWkn1RNLiIwElYZdwXLNDEqIapPndFCkO97e6UYivlHNWsGpcc6NfE1DxXokHM bd6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775646656; x=1776251456; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=vfllRBgwiwa3h1YU32+J/3Xslzo7VJyKCR+sEXLOPdc=; b=nGCe7FWZdFnGcHo5G7bZGzYjKho85/iWDk5SqH8RSE10O/5vioA1B+73efqDVX/bPx KX/APaQMsdPu8QlvLNVv7h+dK6NHKeux0ebLrtHMDHoJSZEPEOW7lgysOr0TOVLvUlGn b1mR4Nls3m2/nX8Gb1k+MlZrR594IhzTKEYK8WCN76MCtlosnxaJ4WTMf/cqkEww/Eeu j0EhoAF6qSZJ1JrStXael/YoP18ngdOXupu091ZIsKcWpk33gMY998V73eehFkxw5QfZ E5P6i02LD6fk2cg8M0jJACeyvMtJo7syn/L+JHw98eNlmkGk/rsvZkBSQ/YZh3/NRxv7 hAfg== X-Forwarded-Encrypted: i=1; AJvYcCWNfmb2hMgjRSrqibK0HkgM3K1loVlwV/lLpXEMmJwUZpD0KOeWGjdzkXb47HvwZCiJST2KdGGNJIlhf3Q=@vger.kernel.org X-Gm-Message-State: AOJu0YyADNiODxoDjhHZob9MYF3wCSZs7n3ItsQaL03p1RzjrQFJnan2 upUe4rtMs+4kKhT0mdxl3lb9a55yJUrEIU7+dify7mb8CCgmemUpiazjfVBkIH7D72o= X-Gm-Gg: AeBDieubSszIBc1DgoxVdDLlZOA/jr4iw9xE6NhC54yyMM1Wmf74BwE+Ve679pWfxp0 nZFaAl74i5egHKScCiQMAcefsOg7KMr35CHjIUiwgOgpqNT0RgT7M6RasaTtSLf+zEQIHu0ssiA Amxrri7D2M09KiMcoBs1RJ+zCS1LlnVtKIcOwWriNwXGXNE6ifTCMddN7vvN8d8bZK7iIdE/cj+ BOb1ALMWSICqVEynG4OPbP/snRTOxVBem3q9VakIH7IEPWcf5Fl4mARYo0CrsUuTrkvfhQIWOpv X+0+GLQyQbN6Lvwql98pREp9cP/BNQMAB45CyE1So2WNni4ljc41y0GBciecWtnAFUyrMmHIvrV aIJ3A5I+l2PPfAenYA3x9wQn8jt7BSAsKiUPQT17FaHKOjQq7m9irl/SYV65ga07Dvo0lfYi38W rKxiL+rk3PVDypqJf+v3Eb6qZEoQ== X-Received: by 2002:a05:6000:2282:b0:43b:54c9:85f4 with SMTP id ffacd0b85a97d-43d292df407mr31359155f8f.39.1775646656473; Wed, 08 Apr 2026 04:10:56 -0700 (PDT) Received: from pathway.suse.cz ([176.114.240.130]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43d1e2a6f73sm61649889f8f.8.2026.04.08.04.10.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Apr 2026 04:10:55 -0700 (PDT) Date: Wed, 8 Apr 2026 13:10:53 +0200 From: Petr Mladek To: Song Liu Cc: Yafang Shao , Joe Lawrence , Dylan Hatch , jpoimboe@kernel.org, jikos@kernel.org, mbenes@suse.cz, rostedt@goodmis.org, mhiramat@kernel.org, mathieu.desnoyers@efficios.com, kpsingh@kernel.org, mattbobrowski@google.com, jolsa@kernel.org, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, martin.lau@linux.dev, eddyz87@gmail.com, memxor@gmail.com, yonghong.song@linux.dev, live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, bpf@vger.kernel.org Subject: Re: [RFC PATCH 3/4] livepatch: Add "replaceable" attribute to klp_patch Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Tue 2026-04-07 16:09:39, Song Liu wrote: > On Tue, Apr 7, 2026 at 8:08 AM Petr Mladek wrote: > [...] > > > + * @replace: replace tag: > > > + * = 0: Atomic replace is disabled; however, this patch remains > > > + * eligible to be superseded by others. > > > > This is weird semantic. Which livepatch tag would be allowed to > > supersede it, please? > > > > Do we still need this category? > > > > > + * > 0: Atomic replace is enabled. Only existing patches with a > > > + * matching replace tag will be superseded. > > > * @list: list node for global list of actively used patches > > > * @kobj: kobject for sysfs resources > > > * @obj_list: dynamic list of the object entries > > > @@ -137,7 +141,7 @@ struct klp_patch { > > > struct module *mod; > > > struct klp_object *objs; > > > struct klp_state *states; > > > - bool replace; > > > + unsigned int replace; > > > > This already breaks the backward compatibility by changing the type > > and semantic of this field. > > I was thinking if replace=0 means no replace, it is still backward > compatible. Did I miss something? IMHO, the semantic of the no-replace mode would be strange if we introduce the hybrid mode. Especially, it would be strange when it can be replaced by any livepatch with random replace tag/set. Also it would just complicate the definition and detection of conflicts. I am going to provide more details in the reply to Yafang. Best Regards, Petr