Commit Graph

251742 Commits

Author SHA1 Message Date
jmcneill f9e49c4ca9 Build exynos5422 .dtb files with this kernel. 2017-06-18 15:57:16 +00:00
hannken a94bf97d25 Make the fast path of fstrans_get_lwp_info() "static inline". 2017-06-18 14:00:17 +00:00
hannken 90e2dee24a Clear fstrans entries whose mount is gone from the last fstrans_done() only. 2017-06-18 13:59:45 +00:00
kre f72bc19e74 NFC: DEBUG mode only change. Fix botched cleanup of one TRACE(). 2017-06-18 07:50:46 +00:00
pgoyette cb952c82da wsbellmux.c doesn't need a needs-flag 2017-06-18 05:57:58 +00:00
manu f9489ea006 Include IPv6 global variable in USE_INET6=no libc
This ensures a binary built with USE_INET6=yes libc can still link at
runtime with a USE_INET6=no libc. Of course IPv6 functionnality is not
available, but dynamic linking is not killed by missing symbols such
as in6addr_any.
2017-06-18 04:03:44 +00:00
manu 6a05c304af Make shared -DSMALL libc buildable without breaking libhack
We used -DSMALL to exclude code from libc in order to build
libhack. Introduce -DLIBHACK to do this without so that
-DSMALL does not remove code necessary for building a shared libc
2017-06-18 03:56:39 +00:00
christos 365765ad32 no need for debug printing. 2017-06-18 02:43:43 +00:00
christos fef4b4b661 put the dtb files with their kernels. 2017-06-18 01:03:30 +00:00
jmcneill cd132ffd02 Enable UART0 (PL011) on GPIO header for Raspberry Pi 3 / Zero W 2017-06-17 22:50:23 +00:00
jmcneill 886d34925a Interrupts are enabled before the timer is configured. Ensure that the
timer is disabled when attaching so it doesn't go crazy between the time
interrupts are enabled and clocks are initialized. My RPI3 makes it
multi-user now.
2017-06-17 22:49:37 +00:00
mlelstv 3c54dead22 The atapibus detach path did hold the channel mutex while calling into autoconf,
which would trigger a panic when unplugging a USB ATAPI CDROM.

Align detach code for scsibus and atapibus to fix this.

Also avoid races when detaching devices by replacing callout_stop with
callout_halt.
2017-06-17 22:35:50 +00:00
christos 4ba33fc811 new expat 2017-06-17 22:06:54 +00:00
christos d8705ae787 merge conflicts 2017-06-17 22:05:19 +00:00
christos 4c74f82dc2 Release 2.2.1 Sat June 17 2017
Security fixes:
                  CVE-2017-9233 -- External entity infinite loop DoS
                    Details: https://libexpat.github.io/doc/cve-2017-9233/
                    Commit c4bf96bb51dd2a1b0e185374362ee136fe2c9d7f
   [MOX-002]      CVE-2016-9063 -- Detect integer overflow; commit
                    d4f735b88d9932bd5039df2335eefdd0723dbe20
                    (Fixed version of existing downstream patches!)
   (SF.net) #539  Fix regression from fix to CVE-2016-0718 cutting off
                    longer tag names; commits
                    * 896b6c1fd3b842f377d1b62135dccf0a579cf65d
                    * af507cef2c93cb8d40062a0abe43a4f4e9158fb2
             #16    * 0dbbf43fdb20f593ddf4fa1ff67288000dd4a7fd
             #25  More integer overflow detection (function poolGrow); commits
                    * 810b74e4703dcfdd8f404e3cb177d44684775143
                    * 44178553f3539ce69d34abee77a05e879a7982ac
   [MOX-002]      Detect overflow from len=INT_MAX call to XML_Parse; commits
                    * 4be2cb5afcc018d996f34bbbce6374b7befad47f
                    * 7e5b71b748491b6e459e5c9a1d090820f94544d8
   [MOX-005] #30  Use high quality entropy for hash initialization:
                    * arc4random_buf on BSD, systems with libbsd
                      (when configured with --with-libbsd), CloudABI
                    * RtlGenRandom on Windows XP / Server 2003 and later
                    * getrandom on Linux 3.17+
                    In a way, that's still part of CVE-2016-5300.
                    https://github.com/libexpat/libexpat/pull/30/commits
   [MOX-005]      For the low quality entropy extraction fallback code,
                    the parser instance address can no longer leak, commit
                    04ad658bd3079dd15cb60fc67087900f0ff4b083
   [MOX-003]      Prevent use of uninitialised variable; commit
   [MOX-004]        a4dc944f37b664a3ca7199c624a98ee37babdb4b
                  Add missing parameter validation to public API functions
                    and dedicated error code XML_ERROR_INVALID_ARGUMENT:
   [MOX-006]        * NULL checks; commits
                      * d37f74b2b7149a3a95a680c4c4cd2a451a51d60a (merge/many)
                      * 9ed727064b675b7180c98cb3d4f75efba6966681
                      * 6a747c837c50114dfa413994e07c0ba477be4534
                    * Negative length (XML_Parse); commit
   [MOX-002]          70db8d2538a10f4c022655d6895e4c3e78692e7f
   [MOX-001] #35  Change hash algorithm to William Ahern's version of SipHash
                    to go further with fixing CVE-2012-0876.
                    https://github.com/libexpat/libexpat/pull/39/commits

        Bug fixes:
             #32  Fix sharing of hash salt across parsers;
                    relevant where XML_ExternalEntityParserCreate is called
                    prior to XML_Parse, in particular (e.g. FBReader)
             #28  xmlwf: Auto-disable use of memory-mapping (and parsing
                    as a single chunk) for files larger than ~1 GB (2^30 bytes)
                    rather than failing with error "out of memory"
              #3  Fix double free after malloc failure in DTD code; commit
                    7ae9c3d3af433cd4defe95234eae7dc8ed15637f
             #17  Fix memory leak on parser error for unbound XML attribute
                    prefix with new namespaces defined in the same tag;
                    found by Google's OSS-Fuzz; commits
                    * 16f87daae5a16132e479e4f71862128c7a915c73
                    * b47dbc9745932c160893d433220e462bd605f8cd
                  xmlwf on Windows: Add missing calls to CloseHandle

        New features:
             #30  Introduced environment switch EXPAT_ENTROPY_DEBUG=1
                    for runtime debugging of entropy extraction

        Other changes:
                  Increase code coverage
             #33  Reject use of XML_UNICODE_WCHAR_T with sizeof(wchar_t) != 2;
                    XML_UNICODE_WCHAR_T was never meant to be used outside
                    of Windows; 4-byte wchar_t is common on Linux
   (SF.net) #538  Start using -fno-strict-aliasing
   (SF.net) #540  Support compilation against cloudlibc of CloudABI
                  Allow MinGW cross-compilation
   (SF.net) #534  CMake: Introduce option "BUILD_doc" (enabled by default)
                    to bypass compilation of the xmlwf.1 man page
   (SF.net)  pr2  CMake: Introduce option "INSTALL" (enabled by default)
                    to bypass installation of expat files
                  CMake: Fix ninja support
                  Autotools: Add parameters --enable-xml-context [COUNT]
                    and --disable-xml-context; default of context of 1024
                    bytes enabled unchanged
             #14  Drop AmigaOS 4.x code and includes
             #14  Drop ancient build systems:
                    * Borland C++ Builder
                    * OpenVMS
                    * Open Watcom
                    * Visual Studio 6.0
                    * Pre-X Mac OS (MPW Makefile)
                    If you happen to rely on some of these, please get in
                    touch for joining with maintenance.
             #10  Move from WIN32 to _WIN32
             #13  Fix "make run-xmltest" order instability
                  Address compile warnings
                  Bump version info from 7:2:6 to 7:3:6
                  Add AUTHORS file

        Infrastructure:
              #1  Migrate from SourceForge to GitHub (except downloads):
                    https://github.com/libexpat/
              #1  Re-create http://libexpat.org/ project website
                  Start utilizing Travis CI

        Special thanks to:
            Andy Wang
            Don Lewis
            Ed Schouten
            Karl Waclawek
            Pascal Cuoq
            Rhodri James
            Sergei Nikulov
            Tobias Taschner
            Viktor Szakats
                 and
            Core Infrastructure Initiative
            Mozilla Foundation (MOSS Track 3: Secure Open Source)
            Radically Open Security
2017-06-17 21:59:01 +00:00
jdolecek 42769464d5 add Adaptec 1220SA 2017-06-17 20:40:59 +00:00
jdolecek 27b6057659 match Adaptec 1220SA; that card actually uses Silicon Image 3132, and works
well with the siisata(4) driver
2017-06-17 20:36:46 +00:00
jdolecek 96882a391f regen 2017-06-17 20:25:26 +00:00
jdolecek 29b4ad3b0b add entry for Adaptec 1220SA 2017-06-17 20:25:06 +00:00
christos a8ded88f7a a variable that starts with \\ is not expanded. 2017-06-17 19:59:28 +00:00
mrg 781c4b6a03 native-gcc for all platforms (only m68000 has a real change.) 2017-06-17 17:12:03 +00:00
christos 20db6eee6d Assign DTB files to a variable so we can make -V DTB 2017-06-17 17:08:49 +00:00
jmcneill db54ab3515 Disable BSC0 on Raspberry Pi 3 and Zero W boards. 2017-06-17 17:03:40 +00:00
christos 72acc73554 simplify 2017-06-17 16:34:07 +00:00
macallan 9cc47b11c1 moar registers 2017-06-17 16:11:14 +00:00
christos bd56310bf6 -V: try to expand the variable again if the value contains a variable. 2017-06-17 15:49:56 +00:00
christos 20a3c31620 move some code out of the gigantic main function; no functional change. 2017-06-17 15:26:50 +00:00
joerg 54eae2a123 PR 51654: Don't initialize _dlauxinfo for static binaries.
Emacs likes save all memory of the main binary and the first run of
_libc_init via .init will get the wrong (old) value of __ps_strings.
By avoiding the initialization of _dlauxinfo for shared applications,
it will be touched only by the _libc_init call from crt0.o itself,
at which point __ps_strings is correct.
2017-06-17 15:26:44 +00:00
kre 765053c5be NFC: DEBUG related comment change - catch up with reality. 2017-06-17 12:41:20 +00:00
kre 0ed8885aea NFC - DEBUG mode only change - complete a change made earlier (marking
the line number when included in the trace line tag to show whether it
comes from the parser, or the elsewhere as they tend to be quite different).
Initially only one case was changed, while I pondered whether I liked it
or not.  Now it is all done...   Also when there is a line tag at all,
always include the root/sub-shell indicator character, not only when the
pid is included.
2017-06-17 12:16:16 +00:00
kre 16bbc7c6f2 NFC - DEBUG mode only change - convert this to the new TRACE() format. 2017-06-17 12:12:50 +00:00
kre 200131770d NFC - DEBUG changes, update this to new TRACE method.
KNF - white space and comment formatting.
2017-06-17 11:53:24 +00:00
abhinav 9cda1315ff Remove names from the NAME section which have their own man pages.
This is similar to the changes made in string(3) and memory(3) man pages previously.

The reasin being that, when you do `whatis ffs', an extra entry will be there in
the output for this page, which is confusing and unncessary.

Bump date for changes in the NAME section.
2017-06-17 10:48:09 +00:00
kre ad0b72d9e9 Cosmetic changes to variable flags - make their values more suited
to my delicate sensibilities...  (NFC).

Arrange not to barf (ever) if some turkey makes _ readonly.  Do this
by adding a VNOERROR flag that causes errors in var setting to be
ignored (intended use is only for internal shell var setting, like of "_").
(nb: invalid var name errors ignore this flag, but those should never
occur on a var set by the shell itself.)

From FreeBSD: don't simply discard memory if a variable is not set for
any reason (including because it is readonly) if the var's value had
been malloc'd.  Free it instead...
2017-06-17 10:46:34 +00:00
maxv dea541e9f3 Remove dead and broken code. It is not a bad idea to implement USER_LDT on
Xen, but it certainly shouldn't be done this way.
2017-06-17 09:32:53 +00:00
maxv 6ea553014e Increase the kernel heap size from 512GB to 32TB, in such a way that it
is able to map the maximum amount of ram supported twice (16TB x 2).
2017-06-17 08:40:46 +00:00
maxv 272f3596cf Actually, use slot 456 instead, so that it fits a cache line. 2017-06-17 08:07:03 +00:00
kre cf8ba701af Changed the long name for the -L option from lineno_fn_relative
to local_lineno as the latter seemed to be marginally more popular,
and perhaps more importantly, is the same length as the peviously
existing quietprofile option, which means the man page indentation
for the list of options can return to (about) what it was before...
(That is, less indented, which means more data/line, which means less
lines of man page - a good thing!)
2017-06-17 07:50:35 +00:00
maxv e7c1e1cc5b Check (inside), not (!outside). It explains the two install failures
reported between pmap.h::r1.65 and vmparam.h::r1.40.
2017-06-17 07:45:13 +00:00
kre ee3b307fc5 Many internal memory management type fixes.
PR bin/52302   (core dump with interactive shell, here doc and error
on same line) is fixed.   (An old bug.)

echo "$( echo x; for a in $( seq 1000 ); do printf '%s\n'; done; echo y )"
consistently prints 1002 lines (x, 1000 empty ones, then y) as it should
(And you don't want to know what it did before, or why.) (Another old one.)

(Recently added) Problems with ~ expansion fixed (mem management related).

Proper fix for the cwrappers configure problem (which includes the quick
fix that was done earlier, but extends upon that to be correct). (This was
another newly added problem.)

And the really devious (and rare) old bug - if STACKSTRNUL() needs to
allocate a new buffer in which to store the \0, calculate the size of
the string space remaining correctly, unlike when SPUTC() grows the
buffer, there is no actual data being stored in the STACKSTRNUL()
case - the string space remaining was calculated as one byte too few.
That would be harmless, unless the next buffer also filled, in which
case it was assumed that it was really full, not one byte less, meaning
one junk char (a nul, or anything) was being copied into the next (even
bigger buffer) corrupting the data.

Consistent use of stalloc() to allocate a new block of (stack) memory,
and grabstackstr() to claim a block of (stack) memory that had already
been occupied but not claimed as in use.  Since grabstackstr is implemented
as just a call to stalloc() this is a no-op change in practice, but makes
it much easier to comprehend what is really happening.  Previous code
sometimes used stalloc() when the use case was really for grabstackstr().
Change grabstackstr() to actually use the arg passed to it, instead of
(not much better than) guessing how much space to claim,

More care when using unstalloc()/ungrabstackstr() to return space, and in
particular when the stack must be returned to its previous state, rather than
just returning no-longer needed space, neither of those work.  They also don't
work properly if there have been (really, even might have been) any stack mem
allocations since the last stalloc()/grabstackstr().   (If we know there
cannot have been then the alloc/release sequence is kind of pointless.)
To work correctly in general we must use setstackmark()/popstackmark() so
do that when needed.  Have those also save/restore the top of stack string
space remaining.

	[Aside: for those reading this, the "stack" mentioned is not
	in any way related to the thing used for maintaining the C
	function call state, ie: the "stack segment" of the program,
	but the shell's internal memory management strategy.]

More comments to better explain what is happening in some cases.
Also cleaned up some hopelessly broken DEBUG mode data that were
recently added (no effect on anyone but the poor semi-human attempting
to make sense of it...).

User visible changes:

Proper counting of line numbers when a here document is delimited
by a multi-line end-delimiter, as in

	cat << 'REALLY
	END'
	here doc line 1
	here doc line 2
	REALLY
	END

(which is an obscure case, but nothing says should not work.)  The \n
in the end-delimiter of the here doc (the last one) was not incrementing
the line number, which from that point on in the script would be 1 too
low (or more, for end-delimiters with more than one \n in them.)

With tilde expansion:
	unset HOME; echo ~
changed to return getpwuid(getuid())->pw_home instead of failing (returning ~)

POSIX says this is unspecified, which makes it difficult for a script to
compensate for being run without HOME set (as in env -i sh script), so
while not able to be used portably, this seems like a useful extension
(and is implemented the same way by some other shells).

Further, with
	HOME=; printf %s ~
we now write nothing (which is required by POSIX - which requires ~ to
expand to the value of $HOME if it is set) previously if $HOME (in this
case) or a user's directory in the passwd file (for ~user) were a null
STRING, We failed the ~ expansion and left behind '~' or '~user'.
2017-06-17 07:22:12 +00:00
kre 9038bdca03 Free stack memory in a couple of obscure cases where it wasn't
being done (one in probably dead code that is never compiled, the other
in a very rare error case.)   Since it is stack memory it wasn't lost
in any case, just held longer than needed.
2017-06-17 04:19:12 +00:00
kre 6f4f36666c NFC (normal use) - DEBUG only change, when showing empty arg list don't
omit terminating \n.
2017-06-17 04:16:33 +00:00
kre 354d46cb96 s/volatile/const/ -- wonderful how opposites attract like this. 2017-06-17 04:12:06 +00:00
christos 49ec0324b7 add missing pam items (cron, racoon) 2017-06-16 22:58:38 +00:00
jmcneill 5aa651b153 Add entry for dts 2017-06-16 22:51:34 +00:00
jmcneill c9b5b227bd Update the dtc version string to match the imported version and note that
version_gen.h should be updated when importing a new version.
2017-06-16 22:47:22 +00:00
pgoyette 1cbdf74a3e Add gpio support for Xscale
From Stephan Meisenger in PR/52163
2017-06-16 22:39:34 +00:00
pgoyette f92ba8936d Oooppss, pxagpio.4 isn't ready yet. 2017-06-16 22:13:25 +00:00
pgoyette e59be5848b Split a couple of over-long lines. NFC 2017-06-16 22:10:54 +00:00
jmcneill 19633d88b4 Add a note warning against including dt-bindings headers in the kernel. 2017-06-16 21:45:05 +00:00