Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp2333601pxy; Tue, 3 Aug 2021 04:00:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWoPYV/OBwVgrNnP/9I55l5cioZwv3EDQTFvUotLqysPiPemwthKbyIlR4urmwdaN/jtOi X-Received: by 2002:a92:cf07:: with SMTP id c7mr1503610ilo.214.1627988430287; Tue, 03 Aug 2021 04:00:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627988430; cv=none; d=google.com; s=arc-20160816; b=XPpiPa/2YxD+nhGYEAZVmMZpZfrjVkhA7Bs0EXpyDO2gnGScFTzOI4BoBUNtJ8A4vu 1l4xjQ4RP1CS2+vzQgzUMcR1bpnp38vpuHL4OVmeGlZZCeOapKW4p1HLXx+MSr9S85+T 3cNjguJhOVPgxoX7aTxuIeUfFAgxCbcVQx+C2O6uHmVfrRqU5abZze5Q4PXV5Xk3srqY +xpVZ4tM1cKNfnwe/jAfps7oP8EQwL8KW4/ka1RISmpTO9+tG8UhjhtPbdmg/j4Wai2s XaAxlDlun7tFRJC7h3mPF840Lu9xaGiLZ4zqdPbKiSpqudd0ugOvkCG0b752lzvlcd/z yQ0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=lK2SfIHZ2Ac99hQ34j8+KB0YK297k6V7x/Zwpz7e1/A=; b=YBeBQY7UUPQc62HVBIMLxkW/VWgIk44agM8Sh6WRaVMpEZp1EguyM8VUvIvI4tij5n DJlyfMktPn5sE8W4blI+jeUciw8sfssCQBGZO0FEzveWfmWHRhDfyc43YrJSJzaRBwWr V2mGj3A5yus4YrGqZq0eYt6ggMGsTGHLCOuyKg62ARxLlUxtE+WduQhCFE5XG8XI8enT hfR0XMpgv0PyGWtwuqnlbjevXQV+lp9S5CtWH7IITPTu+9cRrX5o2DiTEJ15BC+TAmbr 6QQpsyeNcWvrqijR5Cz/IOhIB3Twd18bHE4taNGB8QDOxVx5dINy+SLYPxPCWsBr+ocv osKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=G6ZULVAE; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f16si17210829ilc.93.2021.08.03.04.00.07; Tue, 03 Aug 2021 04:00:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=G6ZULVAE; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235474AbhHCLAD (ORCPT + 99 others); Tue, 3 Aug 2021 07:00:03 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:53725 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235425AbhHCLAC (ORCPT ); Tue, 3 Aug 2021 07:00:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1627988391; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=lK2SfIHZ2Ac99hQ34j8+KB0YK297k6V7x/Zwpz7e1/A=; b=G6ZULVAEktl0AIIICypbh0m/t5OX2dAUJDshjjOwLb1iXfAGUWBHvPuTbKfzwZwneEUl6R ve0VzG8am2a/yrSn8FSJXJ0XMXe1PXf2zTxRGMf1oZWAyFEpkFzLV7sJSsTztHO8c2mnwp ph2cagmm82X+QIUuVBGC/9MWcsKGuAA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-448-imAsvqABNjigDaIHhUijNg-1; Tue, 03 Aug 2021 06:59:47 -0400 X-MC-Unique: imAsvqABNjigDaIHhUijNg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EF2228799E0; Tue, 3 Aug 2021 10:59:45 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.110]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6B5AA60C05; Tue, 3 Aug 2021 10:59:42 +0000 (UTC) From: Thomas Huth To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org Cc: "J. Bruce Fields" , Chuck Lever , Trond Myklebust , Anna Schumaker , Luis Chamberlain , Kees Cook , Iurii Zaikin , linux-s390@vger.kernel.org, Jia He , Pan Xinhui Subject: [PATCH 0/2] Fix /proc/sys/fs/nfs/nsm_use_hostnames on big endian machines Date: Tue, 3 Aug 2021 12:59:35 +0200 Message-Id: <20210803105937.52052-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org There is an endianess problem with /proc/sys/fs/nfs/nsm_use_hostnames (which can e.g. be seen on an s390x host) : # modprobe lockd nsm_use_hostnames=1 # cat /proc/sys/fs/nfs/nsm_use_hostnames 16777216 The nsm_use_hostnames variable is declared as "bool" which is required for the correct type for the module parameter. However, this does not work correctly with the entry in the /proc filesystem since this currently requires "int". Jia He already provided patches for this problem a couple of years ago, but apparently they felt through the cracks and never got merged. So here's a rebased version to finally fix this issue. Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1764075 Jia He (2): sysctl: introduce new proc handler proc_dobool lockd: change the proc_handler for nsm_use_hostnames fs/lockd/svc.c | 2 +- include/linux/sysctl.h | 2 ++ kernel/sysctl.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 1 deletion(-) -- 2.27.0