diff mbox

[Version,3,01/16] SUNRPC handle unsupported RPC_GSS_SVC_CHANNEL_PROT

Message ID 1482509068-24516-2-git-send-email-andros@netapp.com (mailing list archive)
State New, archived
Headers show

Commit Message

Andy Adamson Dec. 23, 2016, 4:04 p.m. UTC
From: Andy Adamson <andros@netapp.com>

Signed-off-by: Andy Adamson <andros@netapp.com>
---
 net/sunrpc/auth_gss/auth_gss.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

kernel test robot Dec. 23, 2016, 6:31 p.m. UTC | #1
Hi Andy,

[auto build test ERROR on nfsd/nfsd-next]
[also build test ERROR on v4.9 next-20161223]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/andros-netapp-com/RFC-RPCSEC_GSS-Version-3-prototype-Full-Mode-MAC/20161224-014029
base:   git://linux-nfs.org/~bfields/linux.git nfsd-next
config: x86_64-acpi-redef (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

Note: the linux-review/andros-netapp-com/RFC-RPCSEC_GSS-Version-3-prototype-Full-Mode-MAC/20161224-014029 HEAD 1e08ecfb34721e70383610d313ba7b44abec0968 builds fine.
      It only hurts bisectibility.

All errors (new ones prefixed by >>):

   net/sunrpc/auth_gss/auth_gss.c: In function 'gss_wrap_req':
>> net/sunrpc/auth_gss/auth_gss.c:1867:7: error: 'RPC_GSS_SVC_CHANNEL_PROT' undeclared (first use in this function)
     case RPC_GSS_SVC_CHANNEL_PROT:
          ^~~~~~~~~~~~~~~~~~~~~~~~
   net/sunrpc/auth_gss/auth_gss.c:1867:7: note: each undeclared identifier is reported only once for each function it appears in
   net/sunrpc/auth_gss/auth_gss.c: In function 'gss_unwrap_resp':
   net/sunrpc/auth_gss/auth_gss.c:1982:7: error: 'RPC_GSS_SVC_CHANNEL_PROT' undeclared (first use in this function)
     case RPC_GSS_SVC_CHANNEL_PROT:
          ^~~~~~~~~~~~~~~~~~~~~~~~

vim +/RPC_GSS_SVC_CHANNEL_PROT +1867 net/sunrpc/auth_gss/auth_gss.c

  1861		case RPC_GSS_SVC_INTEGRITY:
  1862			status = gss_wrap_req_integ(cred, ctx, encode, rqstp, p, obj);
  1863			break;
  1864		case RPC_GSS_SVC_PRIVACY:
  1865			status = gss_wrap_req_priv(cred, ctx, encode, rqstp, p, obj);
  1866			break;
> 1867		case RPC_GSS_SVC_CHANNEL_PROT:
  1868			status = -EIO;
  1869			pr_warn("RPC    Unsupported service level %d\n",
  1870				gss_cred->gc_service);

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
Schumaker, Anna Jan. 4, 2017, 9:11 p.m. UTC | #2
Hi Andy,

On 12/23/2016 11:04 AM, andros@netapp.com wrote:
> From: Andy Adamson <andros@netapp.com>
> 
> Signed-off-by: Andy Adamson <andros@netapp.com>
> ---
>  net/sunrpc/auth_gss/auth_gss.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
> index 16cea00..96135da 100644
> --- a/net/sunrpc/auth_gss/auth_gss.c
> +++ b/net/sunrpc/auth_gss/auth_gss.c
> @@ -1869,6 +1869,11 @@ static void gss_wrap_req_encode(kxdreproc_t encode, struct rpc_rqst *rqstp,
>  	case RPC_GSS_SVC_PRIVACY:
>  		status = gss_wrap_req_priv(cred, ctx, encode, rqstp, p, obj);
>  		break;
> +	case RPC_GSS_SVC_CHANNEL_PROT:

Would it make more sense to simply use "default:" here instead?  That way we do the right thing if an invalid value is somehow set for gc_service.

> +		status = -EIO;
> +		pr_warn("RPC    Unsupported service level %d\n",
> +			gss_cred->gc_service);
> +		break;
>  	}
>  out:
>  	gss_put_ctx(ctx);
> @@ -1979,6 +1984,11 @@ static void gss_wrap_req_encode(kxdreproc_t encode, struct rpc_rqst *rqstp,
>  		if (status)
>  			goto out;
>  		break;
> +	case RPC_GSS_SVC_CHANNEL_PROT:
> +		status = -EIO;
> +		pr_warn("RPC    Unsupported service level %d\n",
> +			gss_cred->gc_service);

Same question here.

Thanks,
Anna

> +		goto out;
>  	}
>  	/* take into account extra slack for integrity and privacy cases: */
>  	cred->cr_auth->au_rslack = cred->cr_auth->au_verfsize + (p - savedp)
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
index 16cea00..96135da 100644
--- a/net/sunrpc/auth_gss/auth_gss.c
+++ b/net/sunrpc/auth_gss/auth_gss.c
@@ -1869,6 +1869,11 @@  static void gss_wrap_req_encode(kxdreproc_t encode, struct rpc_rqst *rqstp,
 	case RPC_GSS_SVC_PRIVACY:
 		status = gss_wrap_req_priv(cred, ctx, encode, rqstp, p, obj);
 		break;
+	case RPC_GSS_SVC_CHANNEL_PROT:
+		status = -EIO;
+		pr_warn("RPC    Unsupported service level %d\n",
+			gss_cred->gc_service);
+		break;
 	}
 out:
 	gss_put_ctx(ctx);
@@ -1979,6 +1984,11 @@  static void gss_wrap_req_encode(kxdreproc_t encode, struct rpc_rqst *rqstp,
 		if (status)
 			goto out;
 		break;
+	case RPC_GSS_SVC_CHANNEL_PROT:
+		status = -EIO;
+		pr_warn("RPC    Unsupported service level %d\n",
+			gss_cred->gc_service);
+		goto out;
 	}
 	/* take into account extra slack for integrity and privacy cases: */
 	cred->cr_auth->au_rslack = cred->cr_auth->au_verfsize + (p - savedp)