Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp167183rdb; Fri, 5 Jan 2024 06:15:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IFsuGEvOWk/cSsLib4c1QetIh9wxw/T6nOVNX+ImXVwihbp7Uz9amHHeSRXc8AYhI6n7TMa X-Received: by 2002:a17:902:a50a:b0:1d4:be53:ac54 with SMTP id s10-20020a170902a50a00b001d4be53ac54mr1827666plq.79.1704464125808; Fri, 05 Jan 2024 06:15:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704464125; cv=none; d=google.com; s=arc-20160816; b=dPbYVpLRm9tgapHRSqypsck68ebLfukyHgFwhrJ8CxxQ65V7rHNgeurHdO6bBhgimj wKKps/WpWHPpFsS+CXStgHe/tzDOgyehyKetNrQM4YKlzgqBzKuvV+tomlq/AqBz4ySK frmPOeL/7iZdI812jf9VNu9FpDo/7X6buG78+ds+uAYYMx7Qc9f/bKtNx8gMNhicCEiv 6pbrtsJkMfr7PYfEHn5F3mpEDG662veaYpHtfu1gI7RKNJ6EFZg/S4AWFhzZT5fouoEh moiQSF86uXK9h5b9O1TDJXKVcK1SLHznDK6BpnF4Un+kDlL/cdanSMfnyskSdbKF/YDc CONw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=3MJaHAszdZUSCF8RvYD7/rtww+NTICg/HaM50PxxxFg=; fh=7v4a8OMXGkreBrEjRBGQ96OJiHSwqAhxvhBZx8vDeV0=; b=VmYbRPy5XkCwy04reQpTmusLALboVGsklfsgTzscoDWorHFJxguxqwrQN5fYFjlnlP fLZyxVIHi0ejgBSXneDpfbr8uuYJ6elBuJDUjKfXLjyxgm9nK/9qdNe91ReteyEttnNe wZbuEDfbRRwp/RqN4u0wg7JqYsv8iUSp8sHLIuBFYg/1NbqSx5XxNxmnLYW2A7AsR8vA l+47vjNlLzJ7OGKcqdSQV01+7+nuI7UdziAzaNCA8cEFv04C5o9BUXw3pWkteqhMmoUu xIrPNU1oaTA2IOmoMTtxGV2e2YAS1Mi+8rfOO8z+nraSYzG2isRRVtS8ysUYqa13Ccun vG8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=google header.b=KrIM+16U; spf=pass (google.com: domain of linux-kernel+bounces-17913-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17913-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id t17-20020a170902e85100b001d40ca98b6esi1296220plg.8.2024.01.05.06.15.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 06:15:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-17913-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=google header.b=KrIM+16U; spf=pass (google.com: domain of linux-kernel+bounces-17913-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17913-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 03BD5B220EB for ; Fri, 5 Jan 2024 14:14:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D515D2DF62; Fri, 5 Jan 2024 14:14:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="KrIM+16U" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) (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 23B532D78D for ; Fri, 5 Jan 2024 14:14:08 +0000 (UTC) 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 Received: by mail-lf1-f41.google.com with SMTP id 2adb3069b0e04-50e7abe4be4so2046054e87.2 for ; Fri, 05 Jan 2024 06:14:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1704464047; x=1705068847; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=3MJaHAszdZUSCF8RvYD7/rtww+NTICg/HaM50PxxxFg=; b=KrIM+16UDatjqps6jvuMQntnN4fQsBi505x73hvgiKO6tPmfHScprXweNqNskNlsEK 3F+jsTE4Y3SxSsyYu6937WkLAeUVWScJI/U2zN3BW451PZ1ltZfVR5JN4XaHHMVgXu1c 3la2oQX7ZVDW0g/yTAcXIxjpYLKLjk/tWO72eKGq7nNgNdYIV+3MzC3bW/zxW0D2YqfY uhjiRTpWznQSX3B7gZfsBxXSGkGEo8Zfg8DdDqf2z1FBHAEaQexZz64dpdvB697Zlq1p fNHx+0wfuHR4NHVFNiTmj/zUfbMYqDNzHoViDSPgeJa1A7JQ6HTEPo4ITlsWP+dF+eFW ZSBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704464047; x=1705068847; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=3MJaHAszdZUSCF8RvYD7/rtww+NTICg/HaM50PxxxFg=; b=KkowGntEC0GREY9/Sh+cbDPedslfslbHlLTDl9HgJc197M0Ka2MvmYWgEQyFkUSRbb rfyXsA7Jh2TT/3PkCyI9NEDsmjsK4ws6E2PSiYVvpKiN5Ew5hr2MQrBNhBlZjlv4huIp VF2GnKrGUKjv35Y0uQ4LsVCD6jl+J7oxrbfOWzVkB0p0gWFBwG4aX0MemSCb+VzGEmYn VppamyG0jpYUWPQr4cg6+uBv/Xkqai2iAzBt4y01tVgJuMSuW2uOK9x8N1paP7iUPftk 3DdN6Nn2Xbcqm9jQIbhq7cSJQ8h2bNPaJIpEd7eZeS0rG2JrBJ//4kFwBf+MANSWw6iW 0PLQ== X-Gm-Message-State: AOJu0Yy7XdM5Y7/bAYnsWBflwAzZPI2lmPukuXc3twxL/P/Fn3y14Gn1 0pndXQ/WTuAWs67ZnuXO0v3x5xjnGnzPkQ== X-Received: by 2002:a05:6512:3f0e:b0:50e:7fb5:a07e with SMTP id y14-20020a0565123f0e00b0050e7fb5a07emr1430322lfa.56.1704464047235; Fri, 05 Jan 2024 06:14:07 -0800 (PST) Received: from alley ([176.114.240.50]) by smtp.gmail.com with ESMTPSA id q10-20020a17090609aa00b00a27b4e1b189sm907164eje.209.2024.01.05.06.14.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 06:14:07 -0800 (PST) Date: Fri, 5 Jan 2024 15:14:05 +0100 From: Petr Mladek To: Lukas Hruska Cc: Miroslav Benes , Josh Poimboeuf , Joe Lawrence , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, Marcos Paulo de Souza , Josh Poimboeuf Subject: Re: [PATCH v1 4/5] livepatch: Add sample livepatch module Message-ID: References: <20231106162513.17556-1-lhruska@suse.cz> <20231106162513.17556-5-lhruska@suse.cz> 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=us-ascii Content-Disposition: inline In-Reply-To: <20231106162513.17556-5-lhruska@suse.cz> On Mon 2023-11-06 17:25:12, Lukas Hruska wrote: > From: Josh Poimboeuf > > Add a new livepatch sample in samples/livepatch/ to make use of symbols > that must be post-processed to enable load-time relocation resolution. > As the new sample is to be used as an example, it is annotated with > KLP_RELOC_SYMBOL macro. > > The livepatch sample updates the function cmdline_proc_show to print the > string referenced by the symbol saved_command_line appended by the > string "livepatch=1". > > Signed-off-by: Josh Poimboeuf > Signed-off-by: Lukas Hruska > --- > samples/livepatch/Makefile | 1 + > .../livepatch/livepatch-annotated-sample.c | 84 +++++++++++++++++++ The name is ambiguous. I would use something like livepatch-extern-symbol.c Also it would be great to prepare a selftest. In this case, I would suggest to livepatch a symbol from another test module so that it does not modify the running system and the result is predictable. Otherwise it looks good. With a better module name: Reviewed-by: Petr Mladek Best Regards, Petr