Re: [PATCH 2/5] cifsd: add server-side procedures for SMB3

2021-03-24 Thread Sebastian Gottschall
Am 23.03.2021 um 08:19 schrieb Dan Carpenter: On Tue, Mar 23, 2021 at 08:17:47AM +0900, Namjae Jeon wrote: + +static int +compare_oid(unsigned long *oid1, unsigned int oid1len, + unsigned long *oid2, unsigned int oid2len) { + unsigned int i; + + if (oid1len != oid2len) +

Re: [PATCH 2/5] cifsd: add server-side procedures for SMB3

2021-03-23 Thread Dan Carpenter
On Tue, Mar 23, 2021 at 08:17:47AM +0900, Namjae Jeon wrote: > > > + > > > +static int > > > +compare_oid(unsigned long *oid1, unsigned int oid1len, > > > + unsigned long *oid2, unsigned int oid2len) { > > > + unsigned int i; > > > + > > > + if (oid1len != oid2len) > > > + return 0; > >

RE: [PATCH 2/5] cifsd: add server-side procedures for SMB3

2021-03-22 Thread Namjae Jeon
> On Mon, Mar 22, 2021 at 09:47:13AM +0300, Dan Carpenter wrote: > > On Mon, Mar 22, 2021 at 02:13:41PM +0900, Namjae Jeon wrote: > > > +static unsigned char > > > +asn1_octet_decode(struct asn1_ctx *ctx, unsigned char *ch) { > > > + if (ctx->pointer >= ctx->end) { > > > + ctx->error = AS

RE: [PATCH 2/5] cifsd: add server-side procedures for SMB3

2021-03-22 Thread Namjae Jeon
> On Mon, Mar 22, 2021 at 02:13:41PM +0900, Namjae Jeon wrote: > > +static unsigned char > > +asn1_octet_decode(struct asn1_ctx *ctx, unsigned char *ch) { > > + if (ctx->pointer >= ctx->end) { > > + ctx->error = ASN1_ERR_DEC_EMPTY; > > + return 0; > > + } > > + *ch = *(c

Re: [Linux-cifsd-devel] [PATCH 2/5] cifsd: add server-side procedures for SMB3

2021-03-22 Thread Stefan Metzmacher
Am 22.03.21 um 07:50 schrieb Christoph Hellwig: > On Mon, Mar 22, 2021 at 09:47:13AM +0300, Dan Carpenter wrote: >> On Mon, Mar 22, 2021 at 02:13:41PM +0900, Namjae Jeon wrote: >>> +static unsigned char >>> +asn1_octet_decode(struct asn1_ctx *ctx, unsigned char *ch) >>> +{ >>> + if (ctx->pointer

Re: [PATCH 2/5] cifsd: add server-side procedures for SMB3

2021-03-22 Thread Matthew Wilcox
On Mon, Mar 22, 2021 at 07:27:03PM +0900, Sergey Senozhatsky wrote: > On (21/03/22 08:34), Matthew Wilcox wrote: > > > +++ b/fs/cifsd/mgmt/ksmbd_ida.c > > > @@ -0,0 +1,69 @@ > > > +// SPDX-License-Identifier: GPL-2.0-or-later > > > +/* > > > + * Copyright (C) 2018 Samsung Electronics Co., Ltd. >

Re: [PATCH 2/5] cifsd: add server-side procedures for SMB3

2021-03-22 Thread Sergey Senozhatsky
On (21/03/22 08:34), Matthew Wilcox wrote: > > +++ b/fs/cifsd/mgmt/ksmbd_ida.c > > @@ -0,0 +1,69 @@ > > +// SPDX-License-Identifier: GPL-2.0-or-later > > +/* > > + * Copyright (C) 2018 Samsung Electronics Co., Ltd. > > + */ > > + > > +#include "ksmbd_ida.h" > > + > > +struct ksmbd_ida *ksmbd_ida_

Re: [PATCH 2/5] cifsd: add server-side procedures for SMB3

2021-03-22 Thread Matthew Wilcox
On Mon, Mar 22, 2021 at 02:13:41PM +0900, Namjae Jeon wrote: > +++ b/fs/cifsd/mgmt/ksmbd_ida.c > @@ -0,0 +1,69 @@ > +// SPDX-License-Identifier: GPL-2.0-or-later > +/* > + * Copyright (C) 2018 Samsung Electronics Co., Ltd. > + */ > + > +#include "ksmbd_ida.h" > + > +struct ksmbd_ida *ksmbd_ida_al

Re: [PATCH 2/5] cifsd: add server-side procedures for SMB3

2021-03-21 Thread Christoph Hellwig
On Mon, Mar 22, 2021 at 09:47:13AM +0300, Dan Carpenter wrote: > On Mon, Mar 22, 2021 at 02:13:41PM +0900, Namjae Jeon wrote: > > +static unsigned char > > +asn1_octet_decode(struct asn1_ctx *ctx, unsigned char *ch) > > +{ > > + if (ctx->pointer >= ctx->end) { > > + ctx->error = ASN1_ER

Re: [PATCH 2/5] cifsd: add server-side procedures for SMB3

2021-03-21 Thread Dan Carpenter
On Mon, Mar 22, 2021 at 02:13:41PM +0900, Namjae Jeon wrote: > +static unsigned char > +asn1_octet_decode(struct asn1_ctx *ctx, unsigned char *ch) > +{ > + if (ctx->pointer >= ctx->end) { > + ctx->error = ASN1_ERR_DEC_EMPTY; > + return 0; > + } > + *ch = *(ctx->p