From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A904C04AB6 for ; Fri, 31 May 2019 09:51:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EBC0F2669E for ; Fri, 31 May 2019 09:51:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726617AbfEaJvB (ORCPT ); Fri, 31 May 2019 05:51:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34120 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726233AbfEaJvB (ORCPT ); Fri, 31 May 2019 05:51:01 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5305230C0DCA; Fri, 31 May 2019 09:51:01 +0000 (UTC) Received: from gondolin (dhcp-192-222.str.redhat.com [10.33.192.222]) by smtp.corp.redhat.com (Postfix) with ESMTP id 349C57AB62; Fri, 31 May 2019 09:50:58 +0000 (UTC) Date: Fri, 31 May 2019 11:50:55 +0200 From: Cornelia Huck To: David Hildenbrand Cc: linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, Harald Freudenberger , Heiko Carstens , Christian Borntraeger Subject: Re: [PATCH v1] s390/pkey: Use -ENODEV instead of -EOPNOTSUPP Message-ID: <20190531115055.7f5cf64e.cohuck@redhat.com> In-Reply-To: <20190531093628.14766-1-david@redhat.com> References: <20190531093628.14766-1-david@redhat.com> Organization: Red Hat GmbH MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Fri, 31 May 2019 09:51:01 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 31 May 2019 11:36:28 +0200 David Hildenbrand wrote: > systemd-modules-load.service automatically tries to load the pkey module > on systems that have MSA. > > Pkey also requires the MSA3 facility and a bunch of subfunctions. > Failing with -EOPNOTSUPP makes "systemd-modules-load.service" fail on > any system that does not have all needed subfunctions. For example, > when running under QEMU TCG (but also on systems where protected keys > are disabled via the HMC). > > Let's use -ENODEV, so systemd-modules-load.service properly ignores > failing to load the pkey module because of missing HW functionality. > > Cc: Harald Freudenberger > Cc: Heiko Carstens > Cc: Cornelia Huck > Cc: Christian Borntraeger > Signed-off-by: David Hildenbrand > --- > drivers/s390/crypto/pkey_api.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Looking at what other modules return when needed features are missing, this looks like the right thing to do. Reviewed-by: Cornelia Huck