Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp503416ima; Wed, 24 Oct 2018 04:58:40 -0700 (PDT) X-Google-Smtp-Source: AJdET5cnqTfKTzUcpplmXQqQfeFRNZ5OLtH8wF/2+5hj8x0uZpP7xiyT/WXKHnc/pBj1/BtdBbVP X-Received: by 2002:aa7:8195:: with SMTP id g21-v6mr2353539pfi.71.1540382320425; Wed, 24 Oct 2018 04:58:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540382320; cv=none; d=google.com; s=arc-20160816; b=TXWkzDMCSljtWMJ8qykaujkLX1EGpKvWr6A6hALW256DDIKvjLSY7Mb9xeibr95sB5 Mg57NSXCfN1erwtKvcdCuVR+zWc8SVnKrIYTuaJOy1hWbfiPPdFK7m3VvSLlf7PC/aQ2 kQ6FKfjxOxtNAR5qa+5m4mQTy7xBLunmDy/xISB0+PsfHDV5BRSKq81ATzvoGlEhxljy b8k2EAcDhmHCz7Sc8h6PJnCW027AqjqxXqpTEjK35uDGGxOlohLQgn0yHnW3eNNSh9wV ErW/B1uOtmFxEftQe/DBYyOPKRlJVJ1QETYQku26QC35Vs46l6ookzBJkEvw/UurchO8 9ePA== 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; bh=GPefypgxKhxDi7jdOiBfh10n8I483QlALAJY6QTm5Hg=; b=QZdllGArIWErJiaBdXjnPhJMf71GUygI0sClaagOBzXZhVUhsvUcMESF1B6YnK7XKB zWi4ZO/3pmib7Te6etKWNbfuqWwBfxEuCLVsUzBe1cI5p3uTHUnMzvTTNOswd8L4Ll/7 zVH2viaiDcjn2diPeiJeZkV0dukcMiGHptOpNUPhklfENwMB4pTaICyMW17PbijLslcE A7zy/5XPLzfqwRSg8Lo+vowUM4Y7y9CJi92ZFsTHz6seSUnZQ0bTwi1FL1JkNHQ2jFk0 hpeb32+df9X+9ZAaIGU9fq5LR2Cmv4ElOJBZPbP74yjS3iybI2npUxavfIhTJLgrnjA6 F+6Q== 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 g23-v6si3045312pgb.150.2018.10.24.04.58.24; Wed, 24 Oct 2018 04:58:40 -0700 (PDT) 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 S1727565AbeJXUZR (ORCPT + 99 others); Wed, 24 Oct 2018 16:25:17 -0400 Received: from mx2.suse.de ([195.135.220.15]:36698 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726428AbeJXUZR (ORCPT ); Wed, 24 Oct 2018 16:25:17 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 25099AE98; Wed, 24 Oct 2018 11:57:26 +0000 (UTC) Date: Wed, 24 Oct 2018 13:57:24 +0200 (CEST) From: Miroslav Benes To: Jessica Yu cc: Torsten Duwe , Will Deacon , Catalin Marinas , Julien Thierry , Steven Rostedt , Josh Poimboeuf , Ingo Molnar , Ard Biesheuvel , Arnd Bergmann , AKASHI Takahiro , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, live-patching@vger.kernel.org Subject: Re: [PATCH] arm64/module: use mod->klp_info section header information In-Reply-To: <20181023175553.gaobskk26koft6s2@linux-8ccs> Message-ID: References: <20181001140910.086E768BC7@newverein.lst.de> <20181001141652.5478C68BE1@newverein.lst.de> <20181023175553.gaobskk26koft6s2@linux-8ccs> 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 Tue, 23 Oct 2018, Jessica Yu wrote: > diff --git a/arch/arm64/kernel/module-plts.c b/arch/arm64/kernel/module-plts.c > index f0690c2ca3e0..05067717dfc5 100644 > --- a/arch/arm64/kernel/module-plts.c > +++ b/arch/arm64/kernel/module-plts.c > @@ -210,9 +210,15 @@ int module_frob_arch_sections(Elf_Ehdr *ehdr, Elf_Shdr > *sechdrs, > * entries. Record the symtab address as well. > */ > for (i = 0; i < ehdr->e_shnum; i++) { > - if (!strcmp(secstrings + sechdrs[i].sh_name, ".plt")) > + if (!strcmp(secstrings + sechdrs[i].sh_name, ".plt")) { > mod->arch.core.plt = sechdrs + i; > - else if (!strcmp(secstrings + sechdrs[i].sh_name, > ".init.plt")) > + /* > + * Keep the section index for the .plt section for > + * livepatching. Note that .init.plt is irrelevant to > + * livepatch, so only the shndx for .plt is saved. > + */ > + mod->arch.core.plt_shndx = i; > + } else if (!strcmp(secstrings + sechdrs[i].sh_name, > ".init.plt")) Else branches should have braces now too according to the coding style. Otherwise it looks good to me. Thanks, Miroslav