Received: by 10.223.185.116 with SMTP id b49csp2051700wrg; Thu, 22 Feb 2018 07:27:25 -0800 (PST) X-Google-Smtp-Source: AH8x224PP/QPJld5CiZkg8JDE06t48ZQjB72biGbL1/v1/q3krPD/xp2eSbK3NGUQMeoMhhDs/nP X-Received: by 10.101.100.213 with SMTP id t21mr5962175pgv.19.1519313245157; Thu, 22 Feb 2018 07:27:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519313245; cv=none; d=google.com; s=arc-20160816; b=oCBDAnUVu5l/bknsYUAcZ+5J6oQr1snkT5j3OSwQqoccr5Hg8IC7SVXvLcyrYvrrqW KVIblbqCb8ZLD3E6IfXpmjcub0Egx9ewjP0cwVWtM4VmmN86uOZsZmZ8XvL5S0Y2GXlK OFPoneJz6wSqxTi22a6uY1GZQzm6swVdfVd/6yhyClrBNbQp9r3CasPvLcGndJ99TXic SlG2CscBCDmk8e6VGeuI9sjcUn59EJoq1gUFCc7R8qjK9DZUcgZfIZwlSoGHvN8mGWLv w/NtaFZqEdBaYaxlD0EBcam0qaG27vYCocJX3M3aC1zo2i56iCg6gN2zdlqmvWqyuBOI VO7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=fMx75vq/QsWRg4jXqM1F2jggw1mEFwtKJwjARKBKqhQ=; b=JHWJzuCEC3Po+EwlaSHe0FeyM2I8MadSMJIJljZ+ZnSseZwqXI8SQtu/xl2pjyxn+U c9F5tzBfrfl0GbN46ZOZ0JzuEHw5s3kJ3INkqUCvWUtqZJ6ILS80t3vzI657BhTdYTG4 Ft0gy9plwuX1p2+Wd90gNdJ/d/DB3VUVDoQ448mk0J3vbTj165Adg6ahV5AupIT5qv2H TvENRF6XlkVlESkofw5f/FIEuwHjFJYL1yKbJOHWHP1WzlNLHP8LJRDuwVvZVf76Kek6 /B/PWhd7fLxqU5lng5G0u7IrN+zG+1s+1XsR8SA2dNAByOA3086fD+svfbP2PjlbKCtE o+zQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 31-v6si177605plj.414.2018.02.22.07.27.09; Thu, 22 Feb 2018 07:27:25 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932976AbeBVPZL (ORCPT + 99 others); Thu, 22 Feb 2018 10:25:11 -0500 Received: from mx2.suse.de ([195.135.220.15]:35453 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932785AbeBVPZJ (ORCPT ); Thu, 22 Feb 2018 10:25:09 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 1F374AECB; Thu, 22 Feb 2018 15:25:08 +0000 (UTC) Date: Thu, 22 Feb 2018 16:25:07 +0100 (CET) From: Miroslav Benes To: Petr Mladek cc: Jiri Kosina , Josh Poimboeuf , Jason Baron , Joe Lawrence , Jessica Yu , Evgenii Shatokhin , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v8 4/8] livepatch: Allow to unpatch only functions of the given type In-Reply-To: <20180221132914.4809-5-pmladek@suse.com> Message-ID: References: <20180221132914.4809-1-pmladek@suse.com> <20180221132914.4809-5-pmladek@suse.com> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 21 Feb 2018, Petr Mladek wrote: > From: Jason Baron > > We are going to add a feature called atomic replace. It will allow to > create a patch that would replace all already registered patches. > For this, we will need to dynamically create funcs and objects > for functions that are no longer patched. > > The dynamically allocated objects will not longer be needed once > the patch is applied. > > This patch allows to unpatch functions of the given type. It might > cause that the obj->patched flag is true even when some listed > functions are not longer patched. This is fine as long as the > unpatched funcs' structures are removed right after. It will > be the case. Anyway, it is safe. In the worst case, it will > not be possible to enable the disabled functions. > > Signed-off-by: Jason Baron > [pmladek@suse.com: Split and modified to use the generic ftype] > Signed-off-by: Petr Mladek > Cc: Josh Poimboeuf > Cc: Jessica Yu > Cc: Jiri Kosina > Cc: Miroslav Benes Acked-by: Miroslav Benes Miroslav