Received: by 10.223.185.116 with SMTP id b49csp3226645wrg; Sun, 25 Feb 2018 17:23:13 -0800 (PST) X-Google-Smtp-Source: AH8x224ARX99o0+4P9Dgus7PRSYEobod4mIiZgXxY9zf354vHfu4JtTa3Di7x3Vm8XKC83exesAQ X-Received: by 10.99.96.200 with SMTP id u191mr7104489pgb.252.1519608192970; Sun, 25 Feb 2018 17:23:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519608192; cv=none; d=google.com; s=arc-20160816; b=SH3GgzCflLaWkBgB+8jMPUHS2ptkbkrAXe9ACjqC/xHLKbJMHw2XQlnlC9g4iDpc5w D04UASXTxDMZprNcFK3khUAIQAgXCLW2XC6ymHQ/nceXsRIf/htBvWnLvldU7Sg3+ASa p3TpoScz2qmtfR3GcAvxY/8PV6z1KSYI17bKJjDgXyQmXiunf95zP8Kh8uF0qjdnwQNR EnHfEnlkYP0oNYkBWEkd2YLcpBtm2CJEo/24ILT9oRDXA006QVkLncLbnLQ2ZdQ1gfso 9xeJ+zC1NQQkgrpBjyDPSkocPefx5qC7aCEgggqRNH9uzYaT/MkJNJbfd9/48NZxYr9D bjhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=pjVr19AheVoUChRjO9QNr7qZE1aZy6MrNmDvCXEAFt0=; b=tv41/Ya29BNbXkvXhp1V7ZIlhAd61nu2O5I05Nm5MOxWSt9VeeqapyUFZ/WlM+2ncl n14GRDN/EAq1iTansTKHGHIsK6ucOgePF5Is24jA54UPB3wKH9aO1QD6EoSwQ8AUrT3P EWpMBoE3eoEAR7H4rdHJidVd1a+IGrdeO0U2ni07T/CTwJecfLZgXjKNg8A6selEU08y 8c91gVTB9syJlK7V37chyJUppwjzymOm7gLqLcjL8A4ZTPmSQWd2+ywbAllpEq4wgi5h cTSGqUDv54UtxMsHFZ7S4ZlMnFZfW0fgK7N/dW9SZcwanug7xNWhmdk+YkShK/KiizJw mCNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BQn0LD97; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i4-v6si5908545plk.771.2018.02.25.17.22.58; Sun, 25 Feb 2018 17:23:12 -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; dkim=pass header.i=@linaro.org header.s=google header.b=BQn0LD97; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751978AbeBZBVH (ORCPT + 99 others); Sun, 25 Feb 2018 20:21:07 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:43453 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751915AbeBZBVC (ORCPT ); Sun, 25 Feb 2018 20:21:02 -0500 Received: by mail-pf0-f195.google.com with SMTP id z14so5858170pfe.10 for ; Sun, 25 Feb 2018 17:21:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=pjVr19AheVoUChRjO9QNr7qZE1aZy6MrNmDvCXEAFt0=; b=BQn0LD974/UWt6+rI2JC9aR+YTW6ALLBNNYuwgIc/0AUqmOYCW35OiRg6KPO0Z0RbQ BsViSVEXDNxU//TEKnurZSE41bqZa6LCdEEQooiW5d1CEeRJQkuID0W907+KjfTQspe8 q5CFlfadK5EHMyOj7NaLina6mEhD2QourmAEI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=pjVr19AheVoUChRjO9QNr7qZE1aZy6MrNmDvCXEAFt0=; b=VJjAv2N9v5h8hb5Ict6V4RB4N4srMATXWZTXhPDShoO4iTZkntC4XFVMiIJxyP281E TnhXwK8zObZcoiZuDCBDxfcy6lOAIqJawKbMNG+E/WJ/Vt4FT396296kh+/+WClgEKEA kKxJ+behkEr2mZK9CrVZyveytD6Kll78aLSGCmYVI5be47aGPzmv033MAzUvBXglZURX GRJziJMC3kge1u8FZwyr4NO1Kqy/AuKspb8bTvza+zZL4t3lImR8MquU+ehoymUZ0Sfn ClyR/0PDwhHB2ArCWUqKYTJeZELhvHKZem2rZUSnRKMG174TjfUKxgdGsYyaa5xeNsRD otkA== X-Gm-Message-State: APf1xPBUb448gIfeBNggPM/Vleu/NaWrTnL6c6gnTyZEhgnOWmqrdB69 bVfjqtRbZNIAJfpkGWqfTjnFeg== X-Received: by 10.101.76.204 with SMTP id n12mr7149549pgt.249.1519608061697; Sun, 25 Feb 2018 17:21:01 -0800 (PST) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id n24sm17147458pfi.175.2018.02.25.17.20.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 17:21:01 -0800 (PST) Date: Mon, 26 Feb 2018 10:21:02 +0900 From: AKASHI Takahiro To: Dave Young Cc: Philipp Rudo , linux-s390@vger.kernel.org, Heiko Carstens , x86@kernel.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, Thiago Jung Bauermann , Eric Biederman , Michael Ellerman , Martin Schwidefsky , Andrew Morton , Vivek Goyal Subject: Re: [PATCH 00/17] Add kexec_file_load support to s390 Message-ID: <20180226012100.GA6019@linaro.org> Mail-Followup-To: AKASHI Takahiro , Dave Young , Philipp Rudo , linux-s390@vger.kernel.org, Heiko Carstens , x86@kernel.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, Thiago Jung Bauermann , Eric Biederman , Michael Ellerman , Martin Schwidefsky , Andrew Morton , Vivek Goyal References: <20180212100754.55121-1-prudo@linux.vnet.ibm.com> <20180214073543.GA12328@dhcp-128-65.nay.redhat.com> <20180214105449.1325bfbe@ThinkPad> <20180223083405.GA29498@dhcp-128-65.nay.redhat.com> <20180223110143.1747fb3f@ThinkPad> <20180224015956.GA11191@dhcp-128-65.nay.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180224015956.GA11191@dhcp-128-65.nay.redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 24, 2018 at 09:59:56AM +0800, Dave Young wrote: > On 02/23/18 at 11:01am, Philipp Rudo wrote: > > Hi Dave > > > > On Fri, 23 Feb 2018 16:34:05 +0800 > > Dave Young wrote: > > > > > On 02/14/18 at 10:54am, Philipp Rudo wrote: > > > > Hi Dave, > > > > > > > > I just browsed AKASHI's patches (v7). The way I see it the common code changes > > > > are on different areas of kexec_file and shouldn't get in conflict. Only in the > > > > arch code (s390 and arm64) some function calls might need an update. But I have > > > > to take a closer look on the patches first. > > > > > > I'm tring both in local branch with both series (V8 from AKASHI and this series), > > > but there are indeed some conflicts, may because AKASHI factored out some arch > > > code from ppc/x86 to common code. > > > > I feared this would happen. I didn't have time to look at AKASHI's v8 > > yesterday but hope to find some today. How do you think i should handle > > conflicts with his patches? I don't think it is wise to include the changes > > into my patches as that would make AKASHI's patches a prereq for mine. Is adding > > one (multiple?) fixup patches on top of my series ok for you? > > Arch code need arch maintainer to review, maybe either of you can send > the common part first before the arch code, eg. AKASHI can split the common > cleanup patches and post them as a separate series, after these prep > series are reviewed then other patches can be refreshed based on it. > > Seems in AKASHI's series, only patch 2, 3 ,4 ,5 is needed if split out > as a common change series. Yeah, all of those are touching kernel/kexec_file.c and in turn they can conflict if being applied with 390 patches, but none of changes that I made on kexec_file.c are overlapped with Phillips', I suppose that merging these two patch sets is rather straightforward. @Phillips: I hope that your patch#14 and #17 be aligned with my patch#3 as it is factoring out arch_kexec_{image_probe, image_load, verify_sig}() and arch_kimage_file_post_load_cleanup(). Thanks, -Takahiro AKASHI > What do you think? > > > > Thanks > > Philipp > > > > > > > > > > @AKASHI: Welcome to the list. While browsing I couldn't find any > > > > arch_apply_relocation function for arm64. These require the biggest changes in > > > > my patch set. Did I just miss it or does arm64 work differently? > > > > > > > > @Dave: Happy holiday > > > > > > Thank you! > > > > > > > > > > > Thanks > > > > Philipp > > > > > > > > On Wed, 14 Feb 2018 15:35:43 +0800 > > > > Dave Young wrote: > > > > > > > > > Hi Philipp, > > > > > > > > > > I added AKASHI in cc, he posted arm64 kexec_file series previously. > > > > > I would like to read both series especially the general part, but > > > > > maybe at the end of this month because of a holiday.. > > > > > > > > > > From the patch log the cleanup looks nice, but still need read the > > > > > details. > > > > > > > > > > On 02/12/18 at 11:07am, Philipp Rudo wrote: > > > > > > Hi everybody > > > > > > > > > > > > resending the series as there was no reaction, yet. Furthermore i was told > > > > > > that Andrew and the x86 list should also be CCed, so welcome. > > > > > > > > > > > > No changes made to the patches since first time i sent them. The patches > > > > > > apply to the current master (v4.16-rc1). > > > > > > > > > > > > Thanks > > > > > > Philipp > > > > > > > > > > > > --- > > > > > > > > > > > > this series adds the kexec_file_load system call to s390. Before the system > > > > > > call is added there are some preparations/clean ups to common > > > > > > kexec_file_load. In detail this series contains: > > > > > > > > > > > > Patch #1&2: Minor cleanups/fixes. > > > > > > > > > > > > Patch #3-9: Clean up the purgatory load/relocation code. Especially remove > > > > > > the mis-use of the purgatory_info->sechdrs->sh_offset field, currently > > > > > > holding a pointer into either kexec_purgatory (ro) or purgatory_buf (rw) > > > > > > depending on the section. With these patches the section address will be > > > > > > calculated verbosely and sh_offset will contain the offset of the section > > > > > > in the stripped purgatory binary (purgatory_buf). > > > > > > > > > > > > Patch #10: Allows architectures to set the purgaory load address. This > > > > > > patch is important for s390 as the kernel and purgatory have to be loaded > > > > > > to fixed addresses. In current code this is impossible as the purgatory > > > > > > load is opaque to the architecture. > > > > > > > > > > > > Patch #11: Moves x86 purgatories sha implementation to common lib/ > > > > > > directory. > > > > > > > > > > > > Patches #12-17 finally adds the kexec_file_load system call to s390. > > > > > > > > > > > > Please note that I had to touch arch code for x86 and power a little. In > > > > > > theory this should not change the behavior but I don't have a way to test > > > > > > it. Cross-compiling with defconfig(*) works fine for both. > > > > > > > > > > > > Thanks > > > > > > Philipp > > > > > > > > > > > > (*) On x86 with the orc unwinder turned off. objtool SEGFAULTs on s390... > > > > > > > > > > > > Philipp Rudo (17): > > > > > > kexec_file: Silence compile warnings > > > > > > kexec_file: Remove checks in kexec_purgatory_load > > > > > > kexec_file: Make purgatory_info->ehdr const > > > > > > kexec_file: Search symbols in read-only kexec_purgatory > > > > > > kexec_file: Use read-only sections in arch_kexec_apply_relocations* > > > > > > kexec_file: Split up __kexec_load_puragory > > > > > > kexec_file: Simplify kexec_purgatory_setup_sechdrs 1 > > > > > > kexec_file: Simplify kexec_purgatory_setup_sechdrs 2 > > > > > > kexec_file: Remove mis-use of sh_offset field > > > > > > kexec_file: Allow archs to set purgatory load address > > > > > > kexec_file: Move purgatories sha256 to common code > > > > > > s390/kexec_file: Prepare setup.h for kexec_file_load > > > > > > s390/kexec_file: Add purgatory > > > > > > s390/kexec_file: Add kexec_file_load system call > > > > > > s390/kexec_file: Add image loader > > > > > > s390/kexec_file: Add crash support to image loader > > > > > > s390/kexec_file: Add ELF loader > > > > > > > > > > > > arch/powerpc/kernel/kexec_elf_64.c | 9 +- > > > > > > arch/s390/Kbuild | 1 + > > > > > > arch/s390/Kconfig | 4 + > > > > > > arch/s390/include/asm/kexec.h | 23 ++ > > > > > > arch/s390/include/asm/purgatory.h | 17 ++ > > > > > > arch/s390/include/asm/setup.h | 40 ++- > > > > > > arch/s390/kernel/Makefile | 1 + > > > > > > arch/s390/kernel/asm-offsets.c | 5 + > > > > > > arch/s390/kernel/compat_wrapper.c | 1 + > > > > > > arch/s390/kernel/kexec_elf.c | 149 ++++++++++ > > > > > > arch/s390/kernel/kexec_image.c | 78 +++++ > > > > > > arch/s390/kernel/machine_kexec_file.c | 291 +++++++++++++++++++ > > > > > > arch/s390/kernel/syscalls/syscall.tbl | 1 + > > > > > > arch/s390/purgatory/Makefile | 37 +++ > > > > > > arch/s390/purgatory/head.S | 279 ++++++++++++++++++ > > > > > > arch/s390/purgatory/purgatory.c | 42 +++ > > > > > > arch/x86/kernel/kexec-bzimage64.c | 8 +- > > > > > > arch/x86/kernel/machine_kexec_64.c | 66 ++--- > > > > > > arch/x86/purgatory/Makefile | 3 + > > > > > > arch/x86/purgatory/purgatory.c | 2 +- > > > > > > include/linux/kexec.h | 38 +-- > > > > > > {arch/x86/purgatory => include/linux}/sha256.h | 10 +- > > > > > > kernel/kexec_file.c | 375 ++++++++++++------------- > > > > > > {arch/x86/purgatory => lib}/sha256.c | 4 +- > > > > > > 24 files changed, 1200 insertions(+), 284 deletions(-) > > > > > > create mode 100644 arch/s390/include/asm/purgatory.h > > > > > > create mode 100644 arch/s390/kernel/kexec_elf.c > > > > > > create mode 100644 arch/s390/kernel/kexec_image.c > > > > > > create mode 100644 arch/s390/kernel/machine_kexec_file.c > > > > > > create mode 100644 arch/s390/purgatory/Makefile > > > > > > create mode 100644 arch/s390/purgatory/head.S > > > > > > create mode 100644 arch/s390/purgatory/purgatory.c > > > > > > rename {arch/x86/purgatory => include/linux}/sha256.h (63%) > > > > > > rename {arch/x86/purgatory => lib}/sha256.c (99%) > > > > > > > > > > > > -- > > > > > > 2.13.5 > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > kexec mailing list > > > > > > kexec@lists.infradead.org > > > > > > http://lists.infradead.org/mailman/listinfo/kexec > > > > > > > > > > Thanks > > > > > Dave > > > > > > > > > > > > > > > _______________________________________________ > > > kexec mailing list > > > kexec@lists.infradead.org > > > http://lists.infradead.org/mailman/listinfo/kexec > > > > >