Received: by 10.213.65.68 with SMTP id h4csp78426imn; Fri, 30 Mar 2018 01:04:16 -0700 (PDT) X-Google-Smtp-Source: AIpwx48IebFbznlcOmzCpZAQRxwyuE0GEVT1u8gJWS2VE62hIe/dOuiYdG6u2xt0qk80XDUzvY8S X-Received: by 10.99.96.193 with SMTP id u184mr7965458pgb.103.1522397056589; Fri, 30 Mar 2018 01:04:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522397056; cv=none; d=google.com; s=arc-20160816; b=nithBhhA2OFlDq001zARNXiYVvQ8c1u5as/6JJw2QjvMjkojDCkNUxipzEfb1Ngj/r 5w8UBJ7E5cq2YfRxvy3FE8LtwPF6XAPzsm8MPrtz43/1i/o8pGaO835uWBNoUXosLNUz E2wD6LTrjbJmgbx4ceWsoynAnysMN6F3Mk9fNcEd8RxFtvEC/vybWW/Me2CQ4m4GtChE U5Q5wfJQ+koMdOSWewOO0xVydCkTE1FCbjLLlvAsMGrojLxvEvfIU9U3Fn+y6zQGZZec bZxSwxBfpnaz7JAbFDAzrcqlMvMuUQ4bv+dAxzYgIj0ZaZzxK3W2NkoqODhYUvon6ksv 2lXQ== 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:message-id:subject:cc :to:from:date:arc-authentication-results; bh=D6CI2u6uJeJrZLCAM2sbD1AC4+PkDTB1yMGnkef17wU=; b=dcRRZVolsb+IOSKz9oAPi6o4BevbFrLobmdig/eNvOQqWHn5T3TbBnu4FboOv3DBgS MQizW9GJfV7spIk9qOfAbJPmOY2AvwjJPQf6yw+9DyTucnMjDHbtokR5F6IpgMpRV0NQ 7/f/16szmHECF4Zl4y9RdjPIsBG3jsOSyoheIuSfHBlkxGXxxpH8Avju3PaR4RSz8IxG bqrRczU831SuBaplKeZrPy45+S0OKGusqN1pnDsiXqTHail/nfmxf5Lqt3M9tb1DK1M5 tyM1dWkRLCh/rs0SLuFv3tlYc0zJxte/q0guXMY6/Fc3VY6UbF2HXAF2BiR0fEd/2QCQ chYA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h6si5237307pgc.830.2018.03.30.01.04.02; Fri, 30 Mar 2018 01:04:16 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751230AbeC3ICq (ORCPT + 99 others); Fri, 30 Mar 2018 04:02:46 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:56986 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750744AbeC3ICk (ORCPT ); Fri, 30 Mar 2018 04:02:40 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 45DD2406E8B9; Fri, 30 Mar 2018 08:02:40 +0000 (UTC) Received: from dhcp-128-65.nay.redhat.com (ovpn-12-34.pek2.redhat.com [10.72.12.34]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4567B215CDC6; Fri, 30 Mar 2018 08:02:36 +0000 (UTC) Date: Fri, 30 Mar 2018 16:02:32 +0800 From: Dave Young To: Thiago Jung Bauermann Cc: linuxppc-dev@lists.ozlabs.org, Michael Ellerman , kexec@lists.infradead.org, linux-kernel@vger.kernel.org, Michal =?iso-8859-1?Q?Such=E1nek?= Subject: Re: [PATCH] powerpc: kexec_file: Fix error code when trying to load kdump kernel Message-ID: <20180330080232.GB4323@dhcp-128-65.nay.redhat.com> References: <20180329190543.25118-1-bauerman@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180329190543.25118-1-bauerman@linux.vnet.ibm.com> User-Agent: Mutt/1.9.1 (2017-09-22) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Fri, 30 Mar 2018 08:02:40 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Fri, 30 Mar 2018 08:02:40 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'dyoung@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/29/18 at 04:05pm, Thiago Jung Bauermann wrote: > kexec_file_load() on powerpc doesn't support kdump kernels yet, so it > returns -ENOTSUPP in that case. > > I've recently learned that this errno is internal to the kernel and isn't > supposed to be exposed to userspace. Therefore, change to -EOPNOTSUPP which > is defined in an uapi header. > > This does indeed make kexec-tools happier. Before the patch, on ppc64le: > > # ~bauermann/src/kexec-tools/build/sbin/kexec -s -p /boot/vmlinuz > kexec_file_load failed: Unknown error 524 > > After the patch: > > # ~bauermann/src/kexec-tools/build/sbin/kexec -s -p /boot/vmlinuz > kexec_file_load failed: Operation not supported > > Fixes: a0458284f062 ("powerpc: Add support code for kexec_file_load()") > Reported-by: Dave Young > Signed-off-by: Thiago Jung Bauermann > --- > arch/powerpc/kernel/machine_kexec_file_64.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > This is a minor issue, but since it's a simple patch it might be worth > applying it to stable branches. > > This is the kexec-tools thread where this problem was brought up: > > https://lists.infradead.org/pipermail/kexec/2018-March/020346.html > > And this is an instance of a similar fix being applied elsewhere in the > kernel, for the same reasons: > > https://patchwork.kernel.org/patch/8490791/ > > The test shown in the commit log was made using Hari Bathini's patch > adding kexec_file_load() support to kexec-tools in ppc64. > > diff --git a/arch/powerpc/kernel/machine_kexec_file_64.c b/arch/powerpc/kernel/machine_kexec_file_64.c > index e4395f937d63..45e0b7d5f200 100644 > --- a/arch/powerpc/kernel/machine_kexec_file_64.c > +++ b/arch/powerpc/kernel/machine_kexec_file_64.c > @@ -43,7 +43,7 @@ int arch_kexec_kernel_image_probe(struct kimage *image, void *buf, > > /* We don't support crash kernels yet. */ > if (image->type == KEXEC_TYPE_CRASH) > - return -ENOTSUPP; > + return -EOPNOTSUPP; > > for (i = 0; i < ARRAY_SIZE(kexec_file_loaders); i++) { > fops = kexec_file_loaders[i]; > > > _______________________________________________ > kexec mailing list > kexec@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/kexec Reviewed-by: Dave Young Thanks Dave