<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/cifs/netmisc.c, branch linux-4.20.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.20.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.20.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2018-08-07T19:15:41Z</updated>
<entry>
<title>cifs: use timespec64 internally</title>
<updated>2018-08-07T19:15:41Z</updated>
<author>
<name>Arnd Bergmann</name>
</author>
<published>2018-06-19T15:27:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=95390201e7d8dd1eb764a3cbd50ae538a17fcd02'/>
<id>urn:sha1:95390201e7d8dd1eb764a3cbd50ae538a17fcd02</id>
<content type='text'>
In cifs, the timestamps are stored in memory in the cifs_fattr structure,
which uses the deprecated 'timespec' structure. Now that the VFS code
has moved on to 'timespec64', the next step is to change over the fattr
as well.

This also makes 32-bit and 64-bit systems behave the same way, and
no longer overflow the 32-bit time_t in year 2038.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Reviewed-by: Paulo Alcantara &lt;palcantara@suse.de&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>cifs: update calc_size to take a server argument</title>
<updated>2018-05-27T22:56:35Z</updated>
<author>
<name>Ronnie Sahlberg</name>
</author>
<published>2018-04-22T21:30:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9ec672bd17131fe26c966960a573a76fdb1da323'/>
<id>urn:sha1:9ec672bd17131fe26c966960a573a76fdb1da323</id>
<content type='text'>
and change the smb2 version to take heder_preamble_size into account
instead of hardcoding it as 4 bytes.

Signed-off-by: Ronnie Sahlberg &lt;lsahlber@redhat.com&gt;
Signed-off-by: Steve French &lt;smfrench@gmail.com&gt;
</content>
</entry>
<entry>
<title>cifs: small underflow in cnvrtDosUnixTm()</title>
<updated>2017-05-02T19:57:34Z</updated>
<author>
<name>Dan Carpenter</name>
</author>
<published>2017-05-01T18:43:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=564277eceeca01e02b1ef3e141cfb939184601b4'/>
<id>urn:sha1:564277eceeca01e02b1ef3e141cfb939184601b4</id>
<content type='text'>
January is month 1.  There is no zero-th month.  If someone passes a
zero month then it means we read from one space before the start of the
total_days_of_prev_months[] array.

We may as well also be strict about days as well.

Fixes: 1bd5bbcb6531 ("[CIFS] Legacy time handling for Win9x and OS/2 part 1")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Steve French &lt;smfrench@gmail.com&gt;
</content>
</entry>
<entry>
<title>Fix signed/unsigned pointer warning</title>
<updated>2014-12-14T20:55:57Z</updated>
<author>
<name>Kevin Cernekee</name>
</author>
<published>2014-11-10T21:09:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=97c7134ae22fbd2b8730211f9d4d4517264a8efe'/>
<id>urn:sha1:97c7134ae22fbd2b8730211f9d4d4517264a8efe</id>
<content type='text'>
Commit 2ae83bf93882d1 ("[CIFS] Fix setting time before epoch (negative
time values)") changed "u64 t" to "s64 t", which makes do_div() complain
about a pointer signedness mismatch:

      CC      fs/cifs/netmisc.o
    In file included from ./arch/mips/include/asm/div64.h:12:0,
                     from include/linux/kernel.h:124,
                     from include/linux/list.h:8,
                     from include/linux/wait.h:6,
                     from include/linux/net.h:23,
                     from fs/cifs/netmisc.c:25:
    fs/cifs/netmisc.c: In function ‘cifs_NTtimeToUnix’:
    include/asm-generic/div64.h:43:28: warning: comparison of distinct pointer types lacks a cast [enabled by default]
      (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
                                ^
    fs/cifs/netmisc.c:941:22: note: in expansion of macro ‘do_div’
       ts.tv_nsec = (long)do_div(t, 10000000) * 100;

Introduce a temporary "u64 abs_t" variable to fix this.

Signed-off-by: Kevin Cernekee &lt;cernekee@gmail.com&gt;
Signed-off-by: Steve French &lt;steve.french@primarydata.com&gt;
</content>
</entry>
<entry>
<title>[CIFS] Fix setting time before epoch (negative time values)</title>
<updated>2014-09-14T22:06:36Z</updated>
<author>
<name>Steve French</name>
</author>
<published>2014-09-14T22:06:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2ae83bf93882d1ec0cd775c489bd1bee611f792e'/>
<id>urn:sha1:2ae83bf93882d1ec0cd775c489bd1bee611f792e</id>
<content type='text'>
xfstest generic/258 sets the time on a file to a negative value
(before 1970) which fails since do_div can not handle negative
numbers.  In addition 'normal' division of 64 bit values does
not build on 32 bit arch so have to workaround this by special
casing negative values in cifs_NTtimeToUnix

Samba server also has a bug with this (see samba bugzilla 7771)
but it works to Windows server.

Signed-off-by: Steve French &lt;smfrench@gmail.com&gt;
</content>
</entry>
<entry>
<title>fs/cifs/netmisc.c: convert printk to pr_foo()</title>
<updated>2014-05-21T17:18:05Z</updated>
<author>
<name>Fabian Frederick</name>
</author>
<published>2014-05-13T17:30:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=179d61839bafa924ff6f1960436339abdc911650'/>
<id>urn:sha1:179d61839bafa924ff6f1960436339abdc911650</id>
<content type='text'>
Also fixes array checkpatch warning and converts it to static const
(suggested by Joe Perches).

Cc: Joe Perches &lt;joe@perches.com&gt;
Cc: Steve French &lt;sfrench@samba.org&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;
Signed-off-by: Steve French &lt;smfrench@gmail.com&gt;
</content>
</entry>
<entry>
<title>cifs: change ERRnomem error mapping from ENOMEM to EREMOTEIO</title>
<updated>2013-11-11T22:33:25Z</updated>
<author>
<name>Jeff Layton</name>
</author>
<published>2013-11-07T20:02:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cce0244ab0af78f8f01ad826d2f9813a9580b105'/>
<id>urn:sha1:cce0244ab0af78f8f01ad826d2f9813a9580b105</id>
<content type='text'>
Sometimes, the server will report an error that basically indicates
that it's running out of resources. These include these under SMB1:

NT_STATUS_NO_MEMORY
NT_STATUS_SECTION_TOO_BIG
NT_STATUS_TOO_MANY_PAGING_FILES

...and this one under SMB2:

STATUS_NO_MEMORY

Currently, this gets mapped to ENOMEM by the client, but that's
confusing as an ENOMEM error is typically an indicator that the
client is out of memory.

Change these errors to instead map to EREMOTEIO to indicate that
the problem is actually server-side and not on the client.

Reported-by: "ISHIKAWA,chiaki" &lt;ishikawa@yk.rim.or.jp&gt;
Signed-off-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Signed-off-by: Steve French &lt;smfrench@gmail.com&gt;
</content>
</entry>
<entry>
<title>cifs: ntstatus_to_dos_map[] is not terminated</title>
<updated>2013-10-14T17:14:01Z</updated>
<author>
<name>Tim Gardner</name>
</author>
<published>2013-10-13T19:29:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0c26606cbe4937f2228a27bb0c2cad19855be87a'/>
<id>urn:sha1:0c26606cbe4937f2228a27bb0c2cad19855be87a</id>
<content type='text'>
Functions that walk the ntstatus_to_dos_map[] array could
run off the end. For example, ntstatus_to_dos() loops
while ntstatus_to_dos_map[].ntstatus is not 0. Granted,
this is mostly theoretical, but could be used as a DOS attack
if the error code in the SMB header is bogus.

[Might consider adding to stable, as this patch is low risk - Steve]

Reviewed-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Signed-off-by: Tim Gardner &lt;tim.gardner@canonical.com&gt;
Signed-off-by: Steve French &lt;smfrench@gmail.com&gt;
</content>
</entry>
<entry>
<title>[CIFS] cifs: Rename cERROR and cFYI to cifs_dbg</title>
<updated>2013-05-05T03:17:23Z</updated>
<author>
<name>Joe Perches</name>
</author>
<published>2013-05-05T03:12:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f96637be081141d6f8813429499f164260b49d70'/>
<id>urn:sha1:f96637be081141d6f8813429499f164260b49d70</id>
<content type='text'>
It's not obvious from reading the macro names that these macros
are for debugging.  Convert the names to a single more typical
kernel style cifs_dbg macro.

	cERROR(1, ...)   -&gt; cifs_dbg(VFS, ...)
	cFYI(1, ...)     -&gt; cifs_dbg(FYI, ...)
	cFYI(DBG2, ...)  -&gt; cifs_dbg(NOISY, ...)

Move the terminating format newline from the macro to the call site.

Add CONFIG_CIFS_DEBUG function cifs_vfs_err to emit the
"CIFS VFS: " prefix for VFS messages.

Size is reduced ~ 1% when CONFIG_CIFS_DEBUG is set (default y)

$ size fs/cifs/cifs.ko*
   text    data     bss     dec     hex filename
 265245	   2525	    132	 267902	  4167e	fs/cifs/cifs.ko.new
 268359    2525     132  271016   422a8 fs/cifs/cifs.ko.old

Other miscellaneous changes around these conversions:

o Miscellaneous typo fixes
o Add terminating \n's to almost all formats and remove them
  from the macros to be more kernel style like.  A few formats
  previously had defective \n's
o Remove unnecessary OOM messages as kmalloc() calls dump_stack
o Coalesce formats to make grep easier,
  added missing spaces when coalescing formats
o Use %s, __func__ instead of embedded function name
o Removed unnecessary "cifs: " prefixes
o Convert kzalloc with multiply to kcalloc
o Remove unused cifswarn macro

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Signed-off-by: Steve French &lt;smfrench@gmail.com&gt;
</content>
</entry>
<entry>
<title>cifs: map NT_STATUS_SHARING_VIOLATION to EBUSY instead of ETXTBSY</title>
<updated>2013-03-13T19:09:20Z</updated>
<author>
<name>Sachin Prabhu</name>
</author>
<published>2013-03-11T13:08:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=47c78f4a70d791ff44cab3254b489605a52e3181'/>
<id>urn:sha1:47c78f4a70d791ff44cab3254b489605a52e3181</id>
<content type='text'>
NT_SHARING_VIOLATION errors are mapped to ETXTBSY which is unexpected
for operations such as unlink where we can hit these errors.

The patch maps the error NT_SHARING_VIOLATION to EBUSY instead. The
patch also replaces all instances of ETXTBSY in
cifs_rename_pending_delete() with EBUSY.

Signed-off-by: Sachin Prabhu &lt;sprabhu@redhat.com&gt;
Reviewed-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Signed-off-by: Steve French &lt;sfrench@us.ibm.com&gt;
</content>
</entry>
</feed>
