Commit Graph

5612 Commits

Author SHA1 Message Date
Andrew Boie 2e63e71f31 init: support longer command lines
The Linux kernel supports command lines up to 2048 bytes on x86,
see COMMAND_LINE_SIZE in asm/setup.h.

If any androidboot.xxxx arguments were past the 1024 byte limit
here, they were lost.

Change-Id: I6247c511a7de04109490fffa0125801d274a5501
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2013-09-09 13:11:34 -07:00
Colin Cross 596e9c6314 Merge "fix valgrind ioctl warning." 2013-09-05 19:54:31 +00:00
Ben Cheng 2b2f1ae86f Merge "Add -Wno-unused-parameter to suppress the warning." 2013-09-04 21:03:05 +00:00
Ben Cheng c665df33e0 Add -Wno-unused-parameter to suppress the warning.
For example in system/core/libcorkscrew/arch-arm/backtrace-arm.c:

system/core/libcorkscrew/arch-arm/backtrace-arm.c:555:49: error: unused
parameter 'siginfo' [-Werror=unused-parameter]

Change-Id: Ibe13e8761a2f57324c0f0d87d9add549a20aa37a
2013-09-04 13:51:36 -07:00
Colin Cross d171b65670 Merge "[GNSS] Add AID_GPS to property user white list" 2013-09-04 00:09:30 +00:00
Nick Kralevich 531328400e Merge "init: call restorecon on /sys" 2013-09-03 23:41:26 +00:00
Nick Kralevich 8328edb0a7 Merge "init: allow disabling selinux via a kernel command line" 2013-09-03 23:41:19 +00:00
Nick Kralevich b242339988 Merge "init: move SELinux into enforcing mode." 2013-09-03 23:41:09 +00:00
Nick Kralevich ae76f6dbcf init: call restorecon on /sys
Not all files on /sys are not getting labeled properly. Fix them.

Change-Id: I9dcff76354e7f50d41f1b6e702836cfbbc149278
2013-09-03 15:55:58 -07:00
Nick Kralevich 935bd3e315 init: allow disabling selinux via a kernel command line
Create a new "androidboot.selinux" option, to control how userspace
handles SELinux. This kernel command line can have three options:

* disabled
* permissive
* enforcing

"disabled" completely disables userspace support for SELinux. No
policy is ever loaded, nor is the SELinux filesystem /sys/fs/selinux
ever mounted.

"permissive" loads the SELinux policy, but puts SELinux into
permissive mode. SELinux policy violations are logged, but not rejected.

"enforcing", the default, loads the SELinux policy, and places
SELinux into enforcing mode. Policy violations are rejected.

This change addresses post review comments for change
b710ed21de .

Change-Id: I912583db8e6a0e9c63380de32ad8ffc47a8a440f
2013-09-03 15:55:00 -07:00
Nick Kralevich 56fa0ac6b6 init: move SELinux into enforcing mode.
When init starts up, immediately put SELinux into enforcing mode.

This is currently a no-op. We currently have everything in the
unconfined domain, so this should not break anything.
(if it does, I'll roll it back immediately)

If the kernel doesn't have SELinux support compiled in, then
don't try loading a policy and continue without SELinux protections.

Change-Id: Id0279cf82c545ea0f7090137b7566a5bc3ddd641
2013-09-03 15:54:15 -07:00
Jin Wei b815701247 fix valgrind ioctl warning.
Initialize local variable to avoid syscall ioctl warning.

Change-Id: Ibad5b86cd799f147c71f182d654e61318e2ac15e
Origin-Change-Id: Iedf5b128ae1743f633d2821ac3e402942ad6642b
Signed-off-by: Jin Wei <wei.a.jin@intel.com>
Signed-off-by: Jian Luo <jian.luo@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 62797
2013-08-31 18:57:46 -04:00
Dima Zavin b35f68a697 Merge "init: load factory properties" 2013-08-28 21:08:43 +00:00
Elliott Hughes a7f6e015a5 Merge "correct msi usb vendor id." 2013-08-28 15:31:51 +00:00
astonehuang 48c5d7b6cd correct msi usb vendor id.
Change-Id: I13128531b8dd7758abddce47ce1c119381773c26
2013-08-28 10:53:17 +08:00
Elliott Hughes 2e5157fa05 Merge "Fix build with gcc-4.8 and array boundaries issue" 2013-08-27 17:12:01 +00:00
Benoit Goby db71324a4f Merge "libusbhost: It's no longer assumed that "bus/usb" exists once "bus" was created" 2013-08-26 22:13:20 +00:00
Ziv Hendel 8cc80fc894 libusbhost: It's no longer assumed that "bus/usb" exists once "bus" was created
On some devices there is a slight delay between the creation of "/dev/bus"
and "/dev/bus/usb". Previously, the code assumed that both are created in the
same time which caused "watch_existing_subdirs" to fail and libusbhost to stop
working until the device is rebooted. The fix will setup an inotify event on the
creation of the "bus/usb" so it will not be missed once it's created.

Change-Id: I17f06dd167e61573307425e48898e12ebc954093
2013-08-26 14:56:39 -07:00
Nicolas SUET 841859f79f [GNSS] Add AID_GPS to property user white list
Add "gps." and "persist.gps." to property_perms white list.

Change-Id: I7177170676d774c87e08d1548f5264ac27cba3ff
Orig-Change-Id: I7a94caa26be4aefd2fe4f155908e2f8f09858bee
Signed-off-by: Nicolas SUET <nicolas.suet@intel.com>
Signed-off-by: jerome Pantaloni <jeromex.pantaloni@intel.com>
Signed-off-by: Jian Luo <jian.luo@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 118091
2013-08-26 16:20:18 -04:00
Stephen Smalley 6552f6885f Trigger a policy reload from post-fs-data.
Once userdata is available and decrypted, trigger a policy reload to pick
up any policy update files stored under /data/security.

Change-Id: Ic2b3121c3395429b108c40d1d7f5a3124a5896c5
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-08-26 10:45:05 -04:00
Colin Cross a8ba1f2f0b Merge "Add support for socket security context specification." 2013-08-24 00:12:03 +00:00
Colin Cross d8d99c45b7 Merge "Handle policy reloads within ueventd rather than restarting it." 2013-08-23 21:31:26 +00:00
Stephen Smalley 8348d279c7 Add support for socket security context specification.
Add an optional argument to the socket option for specifying
a SELinux security context for the socket.  Normally the socket
security context is automatically computed from the service security
context or set using the seclabel option, but this facility allows
dealing with two scenarios that cannot be addressed using the existing
mechanisms:
1) Use of logwrapper to wrap a service.
In this case, init cannot determine the service security context
as it does not directly execute it and we do not want logwrapper
to run in the same domain as the service.

2) Situations where a service has multiple sockets and we want to
label them distinctly.

Change-Id: I7ae9088c326a2140e56a8044bfb21a91505aea11
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-08-23 08:35:43 -04:00
Andrew Boie 3899f522f1 init: load factory properties
These properties are typically set at device provisioning time
or in the factory. They contain unit-specific data that isn't
touched by software updates or factory data reset. Only
read-only properties can be read by this mechanism.

Change-Id: Ifff9184f039072c3c0ce99f825c3075afb524514
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2013-08-20 11:47:55 -07:00
Elliott Hughes b3644d8f6b Merge "Add USB Vendor ID for WACOM" 2013-08-16 22:32:20 +00:00
Wing Tseng 64a602942e Add USB Vendor ID for WACOM
Change-Id: I3deee6d5bdfb9c5bbc0fddcfa39814d27ee281c2
Signed-off-by: Wing Tseng <Wing_Tseng@pegatroncorp.com>
2013-08-15 09:33:59 +08:00
Elliott Hughes 936032b46b Merge "Add USB Vendor ID for MSI" 2013-08-12 17:31:41 +00:00
Pavel Chupin 856b6cbd9b Fix build with gcc-4.8 and array boundaries issue
Remove unused parameters of static functions to avoid warning with 4.8.
Fix array index out of bounds issue when register number exceeds limit.
It shouldn't occur in real world, but static verifiers can detect it.

Change-Id: Id237df905b40bad02fc8cbbeac31084040f58076
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
2013-08-06 17:00:11 +04:00
astonehuang 307d96a6e6 Add USB Vendor ID for MSI
Change-Id: I4f4bfb6ef08058bf749917119a2b08952e7bc337
2013-08-01 15:23:17 +08:00
Stephen Smalley e2eb69db6d Handle policy reloads within ueventd rather than restarting it.
Restarting ueventd upon policy reloads has reportedly created
stability problems for some users and could cause events to be lost.
Stop restarting ueventd and instead handle policy reloads within ueventd.

Also stops restarting installd upon policy reloads.

Change-Id: Ic7f310d69a7c420e48fbc974000cf4a5b9ab4a3b
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-07-26 15:39:41 -04:00
Elliott Hughes 5d8554323c Merge "Add USB Vendor ID for ECS" 2013-07-25 16:50:39 +00:00
ecsgms cae8b9df5c Add USB Vendor ID for ECS
Change-Id: Ib2fa70204d37f53dc642091eb927d865ddc585b5
2013-07-24 16:13:49 +08:00
Colin Cross f987398723 am 5954ecb8: Merge "Allow more characters in partition name links"
* commit '5954ecb87b8c77425d8cc766c0cc798957a07a7d':
  Allow more characters in partition name links
2013-07-22 15:40:55 -07:00
Colin Cross 5954ecb87b Merge "Allow more characters in partition name links" 2013-07-22 22:39:37 +00:00
Johan Redestig 93ca79b445 Allow more characters in partition name links
We have several partitions with underscores in their names
which would not be properly linked in:
/dev/block/platform/msm_sdcc.1/by-name/

With this change more characters (_-.) are allowed in
partition name links. Also, any other character is
replaced with '_' so the resulting link names have the
same length as the partition name.

Change-Id: I746566c03db98b10326c755692362d2c10e528ae
2013-07-18 10:06:01 +02:00
Elliott Hughes a570312a56 am f265426f: am 596ee9ea: Merge "Improve the crasher stack-overflow command."
* commit 'f265426f020162b9e8c20fb051f613de3640254b':
  Improve the crasher stack-overflow command.
2013-07-16 10:23:03 -07:00
Elliott Hughes f265426f02 am 596ee9ea: Merge "Improve the crasher stack-overflow command."
* commit '596ee9ea8ae37b17fbdff91508f55250d528f1d2':
  Improve the crasher stack-overflow command.
2013-07-16 10:21:22 -07:00
Elliott Hughes 596ee9ea8a Merge "Improve the crasher stack-overflow command." 2013-07-16 17:19:58 +00:00
Elliott Hughes b1be27e29b Improve the crasher stack-overflow command.
Runs a lot quicker, with no intermediate noise.

Change-Id: Icd911ff305da2e0889029dc78d5c2b39f32111c5
2013-07-15 17:19:02 -07:00
Nick Kralevich 9a4913d422 init.rc: remove "on fs" section
This was only ever used by the emulator. Now the emulator
uses an fstab file.

Change-Id: I1a071e567e1f1a379f9c8079cc2dc17660d8455f
2013-07-12 13:48:50 -07:00
Nick Kralevich 7d6ddc7d39 am 2713be91: am fb1c9cf6: Merge "use ext4 instead of yaffs"
* commit '2713be91a84078e8b0b9b755ce17881b750e85a7':
  use ext4 instead of yaffs
2013-07-12 11:20:15 -07:00
Nick Kralevich 2713be91a8 am fb1c9cf6: Merge "use ext4 instead of yaffs"
* commit 'fb1c9cf6fa4efafb3e0c6b0bc93c7f087d926a48':
  use ext4 instead of yaffs
2013-07-12 11:18:26 -07:00
Nick Kralevich fb1c9cf6fa Merge "use ext4 instead of yaffs" 2013-07-12 18:16:48 +00:00
Elliott Hughes 6b78fad147 am a9396549: Fix my incorrect merge resolution for 132b7d750e harder.
* commit 'a9396549b37d13c518c662c04f6ff42e9ae47c24':
  Fix my incorrect merge resolution for 132b7d750e harder.
2013-07-11 19:10:01 -07:00
Elliott Hughes a9396549b3 Fix my incorrect merge resolution for 132b7d750e harder.
Change-Id: I3f8bc955f035b49407540053462e53b3f262d381
2013-07-11 19:07:06 -07:00
Elliott Hughes 435640312c am 7b9c33b1: Fix my incorrect merge resolution for 132b7d750e.
* commit '7b9c33b1e0e47f72d0af35d8a948900697da5871':
  Fix my incorrect merge resolution for 132b7d750e.
2013-07-11 19:01:36 -07:00
Elliott Hughes 7b9c33b1e0 Fix my incorrect merge resolution for 132b7d750e.
The conflict was the actual intended change.

Change-Id: Icc9493e4b24b7b53a18e2c7406ef24a81e4d4a7b
2013-07-11 18:58:07 -07:00
Elliott Hughes dccd777307 am 786b1232: resolved conflicts for merge of 42031e0e to stage-aosp-master
* commit '786b1232d201d46f59bd9da84bfcfcb9ad80bb6c':
  fs_mgr_priv: Extend fs wait timeout to 20 seconds
2013-07-11 18:50:25 -07:00
Elliott Hughes 786b1232d2 resolved conflicts for merge of 42031e0e to stage-aosp-master
Change-Id: I3e6337c258b3e7fb6eee4ed8e3664a69ae219fd6
2013-07-11 18:48:30 -07:00
Ken Sumrall 42031e0ed7 Merge "fs_mgr_priv: Extend fs wait timeout to 20 seconds" 2013-07-10 22:42:37 +00:00