sdk/emulator/emulator-kernel.git
2 months agopackaging: Remove unnecessary initrd dependency 33/308233/2 accepted/tizen_unified tizen accepted/tizen/unified/20240320.152038
Seung-Woo Kim [Wed, 20 Mar 2024 05:25:40 +0000 (14:25 +0900)]
packaging: Remove unnecessary initrd dependency

In emulator-kernel, initrd is used with dummy initramfs in ramfs
path. So, no need to install initrd to build emulator-kernel.

Change-Id: I9c1f5c7deeeb897e34c6cc48d4783a766712664b
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2 months agoovl: do operations on underlying file system in mounter's context 83/307883/1 accepted/tizen/unified/20240315.032957
Vivek Goyal [Fri, 1 Jul 2016 20:34:28 +0000 (16:34 -0400)]
ovl: do operations on underlying file system in mounter's context

Given we are now doing checks both on overlay inode as well underlying
inode, we should be able to do checks and operations on underlying file
system using mounter's context.

So modify all operations to do checks/operations on underlying dentry/inode
in the context of mounter.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
[sw0312.kim: backport upstream commit 1175b6b8d96331676f1d436b089b965807f23b4a to resolve overlayfs smack deny issue]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I550e2ed212f8a3a578cc48430556fa2c7e1eb3a2

2 months agoovl: modify ovl_permission() to do checks on two inodes 82/307882/1
Vivek Goyal [Fri, 1 Jul 2016 20:34:27 +0000 (16:34 -0400)]
ovl: modify ovl_permission() to do checks on two inodes

commit c0ca3d70e8d3cf81e2255a217f7ca402f5ed0862 upstream.

Right now ovl_permission() calls __inode_permission(realinode), to do
permission checks on real inode and no checks are done on overlay inode.

Modify it to do checks both on overlay inode as well as underlying inode.
Checks on overlay inode will be done with the creds of calling task while
checks on underlying inode will be done with the creds of mounter.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
[ Srivatsa: 4.4.y backport:
  - Skipped the hunk modifying non-existent function ovl_get_acl()
  - Adjusted the error path
  - Included linux/cred.h to get prototype for revert_creds() ]
Signed-off-by: Srivatsa S. Bhat (VMware) <srivatsa@csail.mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[sw0312.kim: cherry-pick linux-4.4.y commit b24be4acd17a to fix smack deny issue on overlayfs]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I7cdf2f9136a916c844373be56f84dfc23b8d3bcf

2 months agoovl: fix uid/gid when creating over whiteout 81/307881/1
Miklos Szeredi [Wed, 15 Jun 2016 12:18:59 +0000 (14:18 +0200)]
ovl: fix uid/gid when creating over whiteout

[ Upstream commit d0e13f5bbe4be7c8f27736fc40503dcec04b7de0 ]

Fix a regression when creating a file over a whiteout.  The new
file/directory needs to use the current fsuid/fsgid, not the ones from the
mounter's credentials.

The refcounting is a bit tricky: prepare_creds() sets an original refcount,
override_creds() gets one more, which revert_cred() drops.  So

  1) we need to expicitly put the mounter's credentials when overriding
     with the updated one

  2) we need to put the original ref to the updated creds (and this can
     safely be done before revert_creds(), since we'll still have the ref
     from override_creds()).

Reported-by: Stephen Smalley <sds@tycho.nsa.gov>
Fixes: 3fe6e52f0626 ("ovl: override creds with the ones from the superblock mounter")
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Sasha Levin (Microsoft) <sashal@kernel.org>
[sw0312.kim: cherry-pick linux-4.4.y commit 54a07fff4b21 to fix smack deny issue on overlayfs]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I20e6184091fd96a3fcd9aea8c8026f5532795cd3

2 months agoovl: proper cleanup of workdir 80/307880/1
Miklos Szeredi [Thu, 1 Sep 2016 09:11:59 +0000 (11:11 +0200)]
ovl: proper cleanup of workdir

commit eea2fb4851e9dcbab6b991aaf47e2e024f1f55a0 upstream.

When mounting overlayfs it needs a clean "work" directory under the
supplied workdir.

Previously the mount code removed this directory if it already existed and
created a new one.  If the removal failed (e.g. directory was not empty)
then it fell back to a read-only mount not using the workdir.

While this has never been reported, it is possible to get a non-empty
"work" dir from a previous mount of overlayfs in case of crash in the
middle of an operation using the work directory.

In this case the left over state should be discarded and the overlay
filesystem will be consistent, guaranteed by the atomicity of operations on
moving to/from the workdir to the upper layer.

This patch implements cleaning out any files left in workdir.  It is
implemented using real recursion for simplicity, but the depth is limited
to 2, because the worst case is that of a directory containing whiteouts
under "work".

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: SZ Lin (林上智) <sz.lin@moxa.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[sw0312.kim: cherry-pick linux-4.4.y commit 89f15c6e8212 to fix smack deny issue on overlayfs]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I34bffb51bab8ce882cf6115e5de108c838bca43f

2 months agoovl: override creds with the ones from the superblock mounter 79/307879/1
Antonio Murdaca [Thu, 7 Apr 2016 13:48:25 +0000 (15:48 +0200)]
ovl: override creds with the ones from the superblock mounter

commit 3fe6e52f062643676eb4518d68cee3bc1272091b upstream.

In user namespace the whiteout creation fails with -EPERM because the
current process isn't capable(CAP_SYS_ADMIN) when setting xattr.

A simple reproducer:

$ mkdir upper lower work merged lower/dir
$ sudo mount -t overlay overlay -olowerdir=lower,upperdir=upper,workdir=work merged
$ unshare -m -p -f -U -r bash

Now as root in the user namespace:

\# touch merged/dir/{1,2,3} # this will force a copy up of lower/dir
\# rm -fR merged/*

This ends up failing with -EPERM after the files in dir has been
correctly deleted:

unlinkat(4, "2", 0)                     = 0
unlinkat(4, "1", 0)                     = 0
unlinkat(4, "3", 0)                     = 0
close(4)                                = 0
unlinkat(AT_FDCWD, "merged/dir", AT_REMOVEDIR) = -1 EPERM (Operation not
permitted)

Interestingly, if you don't place files in merged/dir you can remove it,
meaning if upper/dir does not exist, creating the char device file works
properly in that same location.

This patch uses ovl_sb_creator_cred() to get the cred struct from the
superblock mounter and override the old cred with these new ones so that
the whiteout creation is possible because overlay is wrong in assuming that
the creds it will get with prepare_creds will be in the initial user
namespace.  The old cap_raise game is removed in favor of just overriding
the old cred struct.

This patch also drops from ovl_copy_up_one() the following two lines:

override_cred->fsuid = stat->uid;
override_cred->fsgid = stat->gid;

This is because the correct uid and gid are taken directly with the stat
struct and correctly set with ovl_set_attr().

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: SZ Lin (林上智) <sz.lin@moxa.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[sw0312.kim: cherry-pick linux-4.4.y commit 121b09d30d48 to fix smack deny issue on overlayfs]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I90f9bff54b340cbcc0acc5607c62a7523c66eb92

2 months agoovl: rename is_merge to is_lowest 78/307878/1
Miklos Szeredi [Mon, 21 Mar 2016 16:31:46 +0000 (17:31 +0100)]
ovl: rename is_merge to is_lowest

commit 56656e960b555cb98bc414382566dcb59aae99a2 upstream.

The 'is_merge' is an historical naming from when only a single lower layer
could exist.  With the introduction of multiple lower layers the meaning of
this flag was changed to mean only the "lowest layer" (while all lower
layers were being merged).

So now 'is_merge' is inaccurate and hence renaming to 'is_lowest'

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: SZ Lin (林上智) <sz.lin@moxa.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[sw0312.kim: cherry-pick linux-4.4.y commit 6586f61ab5bb to fix smack deny issue on overlayfs]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I00655e4e8286d2d0e16b61e6d11e559c60ec4036

2 months agoovl: warn instead of error if d_type is not supported 77/307877/1
Vivek Goyal [Fri, 1 Jul 2016 14:02:44 +0000 (10:02 -0400)]
ovl: warn instead of error if d_type is not supported

commit e7c0b5991dd1be7b6f6dc2b54a15a0f47b64b007 upstream.

overlay needs underlying fs to support d_type. Recently I put in a
patch in to detect this condition and started failing mount if
underlying fs did not support d_type.

But this breaks existing configurations over kernel upgrade. Those who
are running docker (partially broken configuration) with xfs not
supporting d_type, are surprised that after kernel upgrade docker does
not run anymore.

https://github.com/docker/docker/issues/22937#issuecomment-229881315

So instead of erroring out, detect broken configuration and warn
about it. This should allow existing docker setups to continue
working after kernel upgrade.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Fixes: 45aebeaf4f67 ("ovl: Ensure upper filesystem supports d_type")
Cc: <stable@vger.kernel.org> 4.6
Signed-off-by: SZ Lin (林上智) <sz.lin@moxa.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[sw0312.kim: cherry-pick linux-4.4.y commit 7eaa995c75bd to fix smack deny issue on overlayfs]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I00157d6950ea475852a59259ff2dbd9cb06c9837

2 months agoovl: Do d_type check only if work dir creation was successful 76/307876/1
Vivek Goyal [Fri, 20 May 2016 13:04:26 +0000 (09:04 -0400)]
ovl: Do d_type check only if work dir creation was successful

commit 21765194cecf2e4514ad75244df459f188140a0f upstream.

d_type check requires successful creation of workdir as iterates
through work dir and expects work dir to be present in it. If that's
not the case, this check will always return d_type not supported even
if underlying filesystem might be supporting it.

So don't do this check if work dir creation failed in previous step.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: SZ Lin (林上智) <sz.lin@moxa.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[sw0312.kim: cherry-pick linux-4.4.y commit 0f9a6d88cd9f to fix smack deny issue on overlayfs]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: If7e17d5c56d0fe36762795d582971253ca7118bb

2 months agoovl: Ensure upper filesystem supports d_type 75/307875/1
Vivek Goyal [Mon, 22 Feb 2016 14:28:34 +0000 (09:28 -0500)]
ovl: Ensure upper filesystem supports d_type

commit 45aebeaf4f67468f76bedf62923a576a519a9b68 upstream.

In some instances xfs has been created with ftype=0 and there if a file
on lower fs is removed, overlay leaves a whiteout in upper fs but that
whiteout does not get filtered out and is visible to overlayfs users.

And reason it does not get filtered out because upper filesystem does
not report file type of whiteout as DT_CHR during iterate_dir().

So it seems to be a requirement that upper filesystem support d_type for
overlayfs to work properly. Do this check during mount and fail if d_type
is not supported.

Suggested-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: SZ Lin (林上智) <sz.lin@moxa.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[sw0312.kim: cherry-pick linux-4.4.y commit d5e678942de3 to fix smack deny issue on overlayfs]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I870cf090c0e52313208718fe87a3e4f7e7a3da08

2 months agoovl: filter trusted xattr for non-admin 74/307874/1
Miklos Szeredi [Mon, 29 May 2017 13:15:27 +0000 (15:15 +0200)]
ovl: filter trusted xattr for non-admin

[ Upstream commit a082c6f680da298cf075886ff032f32ccb7c5e1a ]

Filesystems filter out extended attributes in the "trusted." domain for
unprivlieged callers.

Overlay calls underlying filesystem's method with elevated privs, so need
to do the filtering in overlayfs too.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[sw0312.kim: cherry-pick linux-4.4.y commit d88cbbe7ba0c to fix smack deny issue on overlayfs]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I3d7bb51db6e57d16f05fef56d65170aab9bb63f2

2 months agoovl: fix failure to fsync lower dir 73/307873/1
Amir Goldstein [Wed, 8 Nov 2017 07:39:46 +0000 (09:39 +0200)]
ovl: fix failure to fsync lower dir

commit d796e77f1dd541fe34481af2eee6454688d13982 upstream.

As a writable mount, it is not expected for overlayfs to return
EINVAL/EROFS for fsync, even if dir/file is not changed.

This commit fixes the case of fsync of directory, which is easier to
address, because overlayfs already implements fsync file operation for
directories.

The problem reported by Raphael is that new PostgreSQL 10.0 with a
database in overlayfs where lower layer in squashfs fails to start.
The failure is due to fsync error, when PostgreSQL does fsync on all
existing db directories on startup and a specific directory exists
lower layer with no changes.

Reported-by: Raphael Hertzog <raphael@ouaza.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Tested-by: Raphaël Hertzog <hertzog@debian.org>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[sw0312.kim: cherry-pick linux-4.4.y commit 3b0104f9e21a to fix smack deny issue on overlayfs]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Ieda49c00978f4f26f062a72e83d986d5f97d7f1f

4 months agomaru: eeprom: add missed unlock for EEPROM_SET_WP ioctl 41/304841/1 accepted/tizen/unified/20240201.165108
Seung-Woo Kim [Wed, 24 Jan 2024 07:33:03 +0000 (16:33 +0900)]
maru: eeprom: add missed unlock for EEPROM_SET_WP ioctl

There was missing unlock during EEPROM_SET_WP ioctl error path.
Add the missed unlock.

Change-Id: I87c01ab81532058ae93aee10349563e4bdf92b59
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 months agomaru: eeprom: fix crash issue when using eprom ioctl on AMD CPU 40/304840/1
Jianhua Bi [Wed, 24 Jan 2024 07:32:58 +0000 (16:32 +0900)]
maru: eeprom: fix crash issue when using eprom ioctl on AMD CPU

AMD CPU has user memory protection, so direct accessing user
address causes memory segment fault. To avoid the crash, use
copy_{to/from}_user() for user addresses.

Change-Id: I11d88050bfdc712d762c72903e6ca34699b72963
Signed-off-by: Jianhua Bi <jianhua.bi@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
11 months agopackaging: Upgrade build required openssl version from 1.1 to 3 19/295119/1 accepted/tizen_8.0_unified tizen_8.0 tizen_9.0 accepted/tizen/8.0/unified/20231005.100137 accepted/tizen/unified/20230703.143020 tizen_8.0_m2_release
Seung-Woo Kim [Mon, 3 Jul 2023 04:41:12 +0000 (13:41 +0900)]
packaging: Upgrade build required openssl version from 1.1 to 3

Openssl 1.1.1 is supported until September 2023, so Tizen 8.0
upgrades Openssl 3.0.x. To meet this, change build required
openssl version. Also, required with pkgconfig.

Change-Id: Ib65cc6733aba04cde6ac94cae9086c6721979f49
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
12 months agomaru: Remove useless null checks for array address 99/292799/2 accepted/tizen_unified_dev accepted/tizen/unified/20230531.034430 accepted/tizen/unified/dev/20230726.115325
Seung-Woo Kim [Mon, 15 May 2023 03:39:38 +0000 (12:39 +0900)]
maru: Remove useless null checks for array address

The array address is always not null, so no need to check. Remove
useless null checks to fix -Waddress build warnings.

Change-Id: I3bef4644e37d8ed4a2a88fb21408ac1b4ff7a64b
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
12 months agox86/asm: Add instruction suffixes to bitops 98/292798/2
Jan Beulich [Mon, 26 Feb 2018 11:11:51 +0000 (04:11 -0700)]
x86/asm: Add instruction suffixes to bitops

commit 22636f8c9511245cb3c8412039f1dd95afb3aa59 upstream.

Omitting suffixes from instructions in AT&T mode is bad practice when
operand size cannot be determined by the assembler from register
operands, and is likely going to be warned about by upstream gas in the
future (mine does already). Add the missing suffixes here. Note that for
64-bit this means some operations change from being 32-bit to 64-bit.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/5A93F98702000078001ABACC@prv-mh.provo.novell.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[sw0312.kim: cherry-pick stable linux-4.4.y commit eea4429288d to resolve gcc-12 build issue]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I93b864a6625fcc3e424641e14925c43795b153b6

12 months agox86, asm: change the GEN_*_RMWcc() macros to not quote the condition 97/292797/2
H. Peter Anvin [Wed, 8 Jun 2016 19:38:39 +0000 (12:38 -0700)]
x86, asm: change the GEN_*_RMWcc() macros to not quote the condition

commit 18fe58229d80c7f4f138a07e84ba608e1ebd232b upstream.

Change the lexical defintion of the GEN_*_RMWcc() macros to not take
the condition code as a quoted string.  This will help support
changing them to use the new __GCC_ASM_FLAG_OUTPUTS__ feature in a
subsequent patch.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Link: http://lkml.kernel.org/r/1465414726-197858-4-git-send-email-hpa@linux.intel.com
Reviewed-by: Andy Lutomirski <luto@kernel.org>
Reviewed-by: Borislav Petkov <bp@suse.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[sw0312.kim: cherry-pick stable linux-4.4.y commit 5be66eab0bbc to resolve gcc-12 build issue]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Ic11a01ea1195d271f32a3edf038fa86dde355694

12 months agoscripts/dtc: Remove redundant YYLOC global declaration 96/292796/2
Dirk Mueller [Tue, 14 Jan 2020 17:53:41 +0000 (18:53 +0100)]
scripts/dtc: Remove redundant YYLOC global declaration

commit e33a814e772cdc36436c8c188d8c42d019fda639 upstream.

gcc 10 will default to -fno-common, which causes this error at link
time:

  (.text+0x0): multiple definition of `yylloc'; dtc-lexer.lex.o (symbol from plugin):(.text+0x0): first defined here

This is because both dtc-lexer as well as dtc-parser define the same
global symbol yyloc. Before with -fcommon those were merged into one
defintion. The proper solution would be to to mark this as "extern",
however that leads to:

  dtc-lexer.l:26:16: error: redundant redeclaration of 'yylloc' [-Werror=redundant-decls]
   26 | extern YYLTYPE yylloc;
      |                ^~~~~~
In file included from dtc-lexer.l:24:
dtc-parser.tab.h:127:16: note: previous declaration of 'yylloc' was here
  127 | extern YYLTYPE yylloc;
      |                ^~~~~~
cc1: all warnings being treated as errors

which means the declaration is completely redundant and can just be
dropped.

Signed-off-by: Dirk Mueller <dmueller@suse.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
[robh: cherry-pick from upstream]
Cc: stable@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
[nc: Also apply to dtc-lexer.lex.c_shipped due to a lack of
     e039139be8c2, where dtc-lexer.l started being used]
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[sw0312.kim: cherry-pick stable linux-4.4.y commit ce513359d850 to resolve gcc-12 build issue]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Ica830e72c8227043995560f6f1d5f9918dc28212

14 months agox86: Treat R_X86_64_PLT32 as R_X86_64_PC32
H.J. Lu [Wed, 7 Feb 2018 22:20:09 +0000 (14:20 -0800)]
x86: Treat R_X86_64_PLT32 as R_X86_64_PC32

On i386, there are 2 types of PLTs, PIC and non-PIC.  PIE and shared
objects must use PIC PLT.  To use PIC PLT, you need to load
_GLOBAL_OFFSET_TABLE_ into EBX first.  There is no need for that on
x86-64 since x86-64 uses PC-relative PLT.

On x86-64, for 32-bit PC-relative branches, we can generate PLT32
relocation, instead of PC32 relocation, which can also be used as
a marker for 32-bit PC-relative branches.  Linker can always reduce
PLT32 relocation to PC32 if function is defined locally.   Local
functions should use PC32 relocation.  As far as Linux kernel is
concerned, R_X86_64_PLT32 can be treated the same as R_X86_64_PC32
since Linux kernel doesn't use PLT.

R_X86_64_PLT32 for 32-bit PC-relative branches has been enabled in
binutils master branch which will become binutils 2.31.

[ hjl is working on having better documentation on this all, but a few
  more notes from him:

   "PLT32 relocation is used as marker for PC-relative branches. Because
    of EBX, it looks odd to generate PLT32 relocation on i386 when EBX
    doesn't have GOT.

    As for symbol resolution, PLT32 and PC32 relocations are almost
    interchangeable. But when linker sees PLT32 relocation against a
    protected symbol, it can resolved locally at link-time since it is
    used on a branch instruction. Linker can't do that for PC32
    relocation"

  but for the kernel use, the two are basically the same, and this
  commit gets things building and working with the current binutils
  master   - Linus ]

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[backport upstream commit b21ebf2fb4cd to support R_X86_64_PLT32 relocation]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Ieba707440063ceace73758f21adf92c36c068d03

23 months agox86/build/64: Force the linker to use 2MB page size 71/277171/1 accepted/tizen_7.0_unified accepted/tizen_7.0_unified_hotfix tizen_7.0 tizen_7.0_hotfix accepted/tizen/7.0/unified/20221110.061118 accepted/tizen/7.0/unified/hotfix/20221116.112205 accepted/tizen/unified/20220701.145940 submit/tizen/20220701.081848 tizen_7.0_m2_release
H.J. Lu [Mon, 19 Mar 2018 20:57:46 +0000 (13:57 -0700)]
x86/build/64: Force the linker to use 2MB page size

commit e3d03598e8ae7d195af5d3d049596dec336f569f upstream.

Binutils 2.31 will enable -z separate-code by default for x86 to avoid
mixing code pages with data to improve cache performance as well as
security.  To reduce x86-64 executable and shared object sizes, the
maximum page size is reduced from 2MB to 4KB.  But x86-64 kernel must
be aligned to 2MB.  Pass -z max-page-size=0x200000 to linker to force
2MB page size regardless of the default page size used by linker.

Tested with Linux kernel 4.15.6 on x86-64.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/CAMe9rOp4_%3D_8twdpTyAP2DhONOCeaTOsniJLoppzhoNptL8xzA@mail.gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Change-Id: Id19a848f2d2979861bb022099a1378fdafa9c59f
[cw00.choi: Cherry-pick it from linux-stable (4.4.y branch)]
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
23 months agobuild: Set x86_64 kernel version with x86_64 instead of i386 08/276708/1
Seung-Woo Kim [Thu, 23 Jun 2022 05:50:18 +0000 (14:50 +0900)]
build: Set x86_64 kernel version with x86_64 instead of i386

From package/build.linux, it builds with build-x86.sh and then
with build-x86_64.sh. The build-x86.sh changes extraversion
as "-i386" from Makefile, so build-x86_64.sh also has same
version. Set extraversion to "-x86_64" from build-x86_64.sh.

Change-Id: I3b53a7be2ed5be1173e50ce56c43398031a9f195
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2 years agox86: tizen_emul_defconfig: Disable ANDROID_LOGGER configuration 68/269168/1 accepted/tizen/unified/20220125.121749 submit/tizen/20220111.031158 submit/tizen/20220124.062252
Chanwoo Choi [Tue, 11 Jan 2022 02:53:39 +0000 (11:53 +0900)]
x86: tizen_emul_defconfig: Disable ANDROID_LOGGER configuration

Change-Id: I01a321275320688b71be37de529f3ee652565ef0
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2 years agodrm/vigs: fix dpi allow range 72/265472/1
Seung-Woo Kim [Tue, 19 Oct 2021 06:22:49 +0000 (15:22 +0900)]
drm/vigs: fix dpi allow range

Fix dpi allow range with 1 to 1000. Also, set min or max value
for value in out of the range.

Change-Id: I89837120b1d0128f1194c86d323d35ca269ef71e
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2 years agomaru: power_supply: add operation lock 10/264410/1 accepted/tizen_6.5_unified tizen_6.5 accepted/tizen/6.5/unified/20211028.225311 accepted/tizen/unified/20210923.012133 submit/tizen/20210917.074043 submit/tizen_6.5/20211028.164101 tizen_6.5.m2_release
Seung-Woo Kim [Fri, 17 Sep 2021 04:58:58 +0000 (13:58 +0900)]
maru: power_supply: add operation lock

maru power_supply has get and set operations to qemu with virtio
queue and they can be called multiple times, but only one flag is
used to check virtio queue req & res state. This causes virtio queue
req & res wait mechanism cannot wake. Add operation lock to resolve
this.

Change-Id: Ia9c4549160df8ac86cceb7c478f7f2767c42bcf5
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2 years agox86: configs: tizen_emul_defconfig: Enable OVERLAY_FS config 42/261842/2 accepted/tizen/unified/20210728.090603 submit/tizen/20210728.051741
Chanwoo Choi [Tue, 27 Jul 2021 08:52:23 +0000 (17:52 +0900)]
x86: configs: tizen_emul_defconfig: Enable OVERLAY_FS config

Enable CONFIG_OVERLAY_FS for tizen application space.

Change-Id: I6ef15fa611c00f20a19b7324792eba73e4b8e78b
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2 years agox86: tizen_emul_defconfig: Enable CONFIG_CUSE 05/261305/1 accepted/tizen/unified/20210716.131235 submit/tizen/20210716.022043
sangwook lee [Thu, 15 Jul 2021 21:12:41 +0000 (06:12 +0900)]
x86: tizen_emul_defconfig: Enable CONFIG_CUSE

CONFIG_CUSE is required for supporting NPU feature on Tizen 6.5.

Change-Id: I369cb92c37ba9877f39a58ed7fa2a6e7ac43db7f
Signed-off-by: sangwook lee <sangwook96.lee@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
3 years agotizen: change mount option of root partion from RW to RO 85/253885/3
INSUN PYO [Fri, 19 Feb 2021 05:08:55 +0000 (14:08 +0900)]
tizen: change mount option of root partion from RW to RO

Change-Id: I60547b43b41a9f9c17673fd8d903357f5dcd8855

3 years agox86: defconfig: disable SECURITY_SMACK_NETFILTER config 26/253826/1 accepted/tizen/unified/20210219.040831 submit/tizen/20210218.095134
Chanwoo Choi [Thu, 18 Feb 2021 09:38:06 +0000 (18:38 +0900)]
x86: defconfig: disable SECURITY_SMACK_NETFILTER config

Disable SECURITY_SMACK_NETFILTER configuration.

Change-Id: Ibeb7c584618a0adc0acda97636b75638fc4c9517
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
4 years agoproc, coredump: add CoreDumping flag to /proc/pid/status 75/234475/2 accepted/tizen_6.0_unified accepted/tizen_6.0_unified_hotfix tizen_6.0 tizen_6.0_hotfix accepted/tizen/6.0/unified/20201030.103032 accepted/tizen/6.0/unified/hotfix/20201103.044956 accepted/tizen/unified/20200609.153518 submit/tizen/20200609.022747 submit/tizen_6.0/20201029.205505 submit/tizen_6.0_hotfix/20201102.192906 submit/tizen_6.0_hotfix/20201103.115106 tizen_6.0.m2_release
Roman Gushchin [Fri, 17 Nov 2017 23:26:45 +0000 (15:26 -0800)]
proc, coredump: add CoreDumping flag to /proc/pid/status

Right now there is no convenient way to check if a process is being
coredumped at the moment.

It might be necessary to recognize such state to prevent killing the
process and getting a broken coredump.  Writing a large core might take
significant time, and the process is unresponsive during it, so it might
be killed by timeout, if another process is monitoring and
killing/restarting hanging tasks.

We're getting a significant number of corrupted coredump files on
machines in our fleet, just because processes are being killed by
timeout in the middle of the core writing process.

We do have a process health check, and some agent is responsible for
restarting processes which are not responding for health check requests.
Writing a large coredump to the disk can easily exceed the reasonable
timeout (especially on an overloaded machine).

This flag will allow the agent to distinguish processes which are being
coredumped, extend the timeout for them, and let them produce a full
coredump file.

To provide an ability to detect if a process is in the state of being
coredumped, we can expose a boolean CoreDumping flag in
/proc/pid/status.

Example:
$ cat core.sh
  #!/bin/sh

  echo "|/usr/bin/sleep 10" > /proc/sys/kernel/core_pattern
  sleep 1000 &
  PID=$!

  cat /proc/$PID/status | grep CoreDumping
  kill -ABRT $PID
  sleep 1
  cat /proc/$PID/status | grep CoreDumping

$ ./core.sh
  CoreDumping: 0
  CoreDumping: 1

[guro@fb.com: document CoreDumping flag in /proc/<pid>/status]
Link: http://lkml.kernel.org/r/20170928135357.GA8470@castle.DHCP.thefacebook.com
Link: http://lkml.kernel.org/r/20170920230634.31572-1-guro@fb.com
Signed-off-by: Roman Gushchin <guro@fb.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Konstantin Khlebnikov <koct9i@gmail.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[k.lewandowsk: backport mainline commit c643401218 for userspace process managers
 (eg. resourced) to be able to avoid killing dead processes, breaking crash reports]
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
Change-Id: I5ba2fcbf4f388be752db542e80ebca367dba618c

4 years agopackage: Keep the git information after dibs build without removal 31/235131/1
Chanwoo Choi [Tue, 2 Jun 2020 02:31:20 +0000 (11:31 +0900)]
package: Keep the git information after dibs build without removal

Change-Id: Id0c825b35e6535a83cad928f85378d234305dfe1
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
4 years agomaru: rotary: Change event value 76/227876/1 accepted/tizen/unified/20200324.101627 submit/tizen/20200323.012640
Dongwoo Lee [Tue, 17 Mar 2020 02:39:31 +0000 (11:39 +0900)]
maru: rotary: Change event value

Until Tizen 5.0, for detent/bezel input device, its event value
was in between -2 and 2, but value 1, meant starting movement to
counter clockwise or clockwise, and value -1, meant moving back
to original position, never used. Change event value of the
detent/bezel device for Tizen 5.5 and later version.

It changes detent/bezel input driver event interface, so user
input framework for detent/bezel input should be also changed.

Ref: https://review.tizen.org/gerrit/#/c/platform/upstream/enlightenment/+/220346/

Change-Id: Iaa8e76de94eb4254820d93865dab9d4f7006f4e4
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
4 years agoRevert "packaging: removed %arm aarch64 support" 67/222267/1 accepted/tizen/unified/20200113.222528 submit/tizen/20200113.062453
Manish Rathod [Mon, 13 Jan 2020 06:23:48 +0000 (06:23 +0000)]
Revert "packaging: removed %arm aarch64 support"

This reverts commit d6d59e55d57a20532fcadd25d8eb061086a6c6b9.

Change-Id: Id758905c7a4cb0e8dd7a752f9a2e378c79d93fd3

4 years agopackaging: removed %arm aarch64 support 95/220995/1 submit/tizen/20200108.133605 submit/tizen/20200109.112051 submit/tizen/20200113.052006
Dongkyun Son [Thu, 26 Dec 2019 07:15:32 +0000 (16:15 +0900)]
packaging: removed %arm aarch64 support

Change-Id: I94076d97c02adb40b811ec985ad87abd0cbd74be
Signed-off-by: Dongkyun Son <dongkyun.s@samsung.com>
4 years agoFixed using dummy switch without default statement 46/220946/1
Andrey Kazmin [Mon, 16 Dec 2019 11:05:32 +0000 (14:05 +0300)]
Fixed using dummy switch without default statement

Change-Id: I83dba3f6ab98fd27e48c10f2783d5b7297323195
Signed-off-by: Andrey Kazmin <a.kazmin@partner.samsung.com>
4 years agoFixed out of the bounds memcpy in maru evdi 45/220945/1
Andrey Kazmin [Mon, 16 Dec 2019 07:25:53 +0000 (10:25 +0300)]
Fixed out of the bounds memcpy in maru evdi

Change-Id: I87565fde5a245f813dde58164220e52647647a89
Signed-off-by: Andrey Kazmin <a.kazmin@partner.samsung.com>
4 years agounifdef: use memcpy instead of strncpy 44/220944/1
Linus Torvalds [Fri, 30 Nov 2018 22:45:01 +0000 (14:45 -0800)]
unifdef: use memcpy instead of strncpy

commit 38c7b224ce22c25fed04007839edf974bd13439d upstream.

New versions of gcc reasonably warn about the odd pattern of

strncpy(p, q, strlen(q));

which really doesn't make sense: the strncpy() ends up being just a slow
and odd way to write memcpy() in this case.

There was a comment about _why_ the code used strncpy - to avoid the
terminating NUL byte, but memcpy does the same and avoids the warning.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[dongkyun.s: cherry-pick stable linux-4.9.y commit 37370fadd2da for gcc 9 build]

Change-Id: I2f005aa7c6642d76d818f1fda7722f345095b8a9

4 years agodrm/i915: fix compiler warning in drivers/gpu/drm/i915/intel_uncore.c 43/220943/1
Greg Kroah-Hartman [Thu, 31 Aug 2017 06:30:43 +0000 (08:30 +0200)]
drm/i915: fix compiler warning in drivers/gpu/drm/i915/intel_uncore.c

When building with gcc-7, the following warning happens:

drivers/gpu/drm/i915/intel_uncore.c: In function ‘hsw_unclaimed_reg_detect’:
drivers/gpu/drm/i915/intel_uncore.c:638:36: warning: decrement of a boolean expression [-Wbool-operation]
   i915.mmio_debug = mmio_debug_once--;
                                    ^~

As it's really not wise to -- on a boolean value.

Commit 7571494004d8 ("drm/i915: Do one shot unclaimed mmio detection
less frequently") which showed up in 4.6-rc1 does solve this issue, by
rewriting the mmio detection logic, but that isn't really good to
backport to 4.4-stable, so just fix up the obvious logic here to do the
right thing.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Paulo Zanoni <przanoni@gmail.com>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[dongkyun.s: cherry-pick stable linux-4.4.y commit c81c4d453edf for gcc 9 build]

Change-Id: I6094687ed5887de09f25175c1be63422651fcd03

4 years agotracing: Silence GCC 9 array bounds warning 42/220942/1
Miguel Ojeda [Thu, 23 May 2019 12:45:35 +0000 (14:45 +0200)]
tracing: Silence GCC 9 array bounds warning

Starting with GCC 9, -Warray-bounds detects cases when memset is called
starting on a member of a struct but the size to be cleared ends up
writing over further members.

Such a call happens in the trace code to clear, at once, all members
after and including `seq` on struct trace_iterator:

    In function 'memset',
        inlined from 'ftrace_dump' at kernel/trace/trace.c:8914:3:
    ./include/linux/string.h:344:9: warning: '__builtin_memset' offset
    [8505, 8560] from the object at 'iter' is out of the bounds of
    referenced subobject 'seq' with type 'struct trace_seq' at offset
    4368 [-Warray-bounds]
      344 |  return __builtin_memset(p, c, size);
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

In order to avoid GCC complaining about it, we compute the address
ourselves by adding the offsetof distance instead of referring
directly to the member.

Since there are two places doing this clear (trace.c and trace_kdb.c),
take the chance to move the workaround into a single place in
the internal header.

Link: http://lkml.kernel.org/r/20190523124535.GA12931@gmail.com
Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
[ Removed unnecessary parenthesis around "iter" ]
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
[dongkyun.s: cherry-pick mainline commit 0c97bf863efc for gcc 9 build]

Change-Id: I81e1711b2009e9b8da6f9808362e1c4376066e1f

4 years agogcc-9: silence 'address-of-packed-member' warning 41/220941/1
Linus Torvalds [Wed, 1 May 2019 18:05:41 +0000 (11:05 -0700)]
gcc-9: silence 'address-of-packed-member' warning

We already did this for clang, but now gcc has that warning too.  Yes,
yes, the address may be unaligned.  And that's kind of the point.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[a.kazmin: cherry-pick mainline commit 6f303d60534c4 for gcc 9 build]
Signed-off-by: Andrey Kazmin <a.kazmin@partner.samsung.com>
Change-Id: I43cefa7a44a5cdb299ef4a8c97d2f45d7dd999e2

4 years agoregmap: Remove attribute packed from struct 'regcache_rbtree_node' 40/220940/1
Mathieu Malaterre [Thu, 24 Jan 2019 18:06:24 +0000 (19:06 +0100)]
regmap: Remove attribute packed from struct 'regcache_rbtree_node'

On one hand commit 28644c809f44 ("regmap: Add the rbtree cache support")
added 'regcache_rbtree_node' as packed structure, while on the other hand
commit e977145aeaad ("[RBTREE] Add explicit alignment to sizeof(long)
for struct rb_node.") declared struct 'rb_node' as aligned.

Solve the ambiguity of placing aligned structure in a packed one by
removing the packed attribute from struct. This seems to be the behavior
of gcc anyway.

This removes the following warning (W=1):

  drivers/base/regmap/regcache-rbtree.c:36:1: warning: alignment 1 of 'struct regcache_rbtree_node' is less than 4 [-Wpacked-not-aligned]

Cc: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Mathieu Malaterre <malat@debian.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
[dongkyun.s: cherry-pick mainline commit 435bba0f11f0 for gcc 9 build]

Change-Id: I27907a2c60b6fd82a28fc7321c393ce0abb335fd

4 years agokconfig: Avoid format overflow warning from GCC 8.1 39/220939/1
Nathan Chancellor [Sat, 2 Jun 2018 16:02:09 +0000 (09:02 -0700)]
kconfig: Avoid format overflow warning from GCC 8.1

In file included from scripts/kconfig/zconf.tab.c:2485:
scripts/kconfig/confdata.c: In function ‘conf_write’:
scripts/kconfig/confdata.c:773:22: warning: ‘%s’ directive writing likely 7 or more bytes into a region of size between 1 and 4097 [-Wformat-overflow=]
  sprintf(newname, "%s%s", dirname, basename);
                      ^~
scripts/kconfig/confdata.c:773:19: note: assuming directive output of 7 bytes
  sprintf(newname, "%s%s", dirname, basename);
                   ^~~~~~
scripts/kconfig/confdata.c:773:2: note: ‘sprintf’ output 1 or more bytes (assuming 4104) into a destination of size 4097
  sprintf(newname, "%s%s", dirname, basename);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scripts/kconfig/confdata.c:776:23: warning: ‘.tmpconfig.’ directive writing 11 bytes into a region of size between 1 and 4097 [-Wformat-overflow=]
   sprintf(tmpname, "%s.tmpconfig.%d", dirname, (int)getpid());
                       ^~~~~~~~~~~
scripts/kconfig/confdata.c:776:3: note: ‘sprintf’ output between 13 and 4119 bytes into a destination of size 4097
   sprintf(tmpname, "%s.tmpconfig.%d", dirname, (int)getpid());
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Increase the size of tmpname and newname to make GCC happy.

Cc: stable@vger.kernel.org
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[dongkyun.s: cherry-pick mainline commit 2ae89c7a82ea for gcc 9 build]

Change-Id: Ia23bce123ec869c6030867cdf65e0cac64d43441

4 years agodisable new gcc-7.1.1 warnings for now 38/220938/1
Linus Torvalds [Thu, 13 Jul 2017 02:25:47 +0000 (19:25 -0700)]
disable new gcc-7.1.1 warnings for now

I made the mistake of upgrading my desktop to the new Fedora 26 that
comes with gcc-7.1.1.

There's nothing wrong per se that I've noticed, but I now have 1500
lines of warnings, mostly from the new format-truncation warning
triggering all over the tree.

We use 'snprintf()' and friends in a lot of places, and often know that
the numbers are fairly small (ie a controller index or similar), but gcc
doesn't know that, and sees an 'int', and thinks that it could be some
huge number.  And then complains when our buffers are not able to fit
the name for the ten millionth controller.

These warnings aren't necessarily bad per se, and we probably want to
look through them subsystem by subsystem, but at least during the merge
window they just mean that I can't even see if somebody is introducing
any *real* problems when I pull.

So warnings disabled for now.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[a.kazmin: cherry-pick mainline commit bd664f6b3e376 for gcc 9 build]
Signed-off-by: Andrey Kazmin <a.kazmin@partner.samsung.com>
Change-Id: I5d839f1b41d5a8b7977e133a28c038549bf772b0

4 years agogive up on gcc ilog2() constant optimizations 37/220937/1
Linus Torvalds [Thu, 2 Mar 2017 20:17:22 +0000 (12:17 -0800)]
give up on gcc ilog2() constant optimizations

gcc-7 has an "optimization" pass that completely screws up, and
generates the code expansion for the (impossible) case of calling
ilog2() with a zero constant, even when the code gcc compiles does not
actually have a zero constant.

And we try to generate a compile-time error for anybody doing ilog2() on
a constant where that doesn't make sense (be it zero or negative).  So
now gcc7 will fail the build due to our sanity checking, because it
created that constant-zero case that didn't actually exist in the source
code.

There's a whole long discussion on the kernel mailing about how to work
around this gcc bug.  The gcc people themselevs have discussed their
"feature" in

   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785

but it's all water under the bridge, because while it looked at one
point like it would be solved by the time gcc7 was released, that was
not to be.

So now we have to deal with this compiler braindamage.

And the only simple approach seems to be to just delete the code that
tries to warn about bad uses of ilog2().

So now "ilog2()" will just return 0 not just for the value 1, but for
any non-positive value too.

It's not like I can recall anybody having ever actually tried to use
this function on any invalid value, but maybe the sanity check just
meant that such code never made it out in public.

Reported-by: Laura Abbott <labbott@redhat.com>
Cc: John Stultz <john.stultz@linaro.org>,
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[a.kazmin: cherry-pick mainline commit 474c90156c8d for gcc 9 build]
Signed-off-by: Andrey Kazmin <a.kazmin@partner.samsung.com>
Change-Id: I4cffaa9b5dfd2064413648f22686960269a2406b

4 years agoALSA: hda/ca0132 - fix possible NULL pointer use 36/220936/1
Arnd Bergmann [Wed, 11 Jan 2017 13:39:44 +0000 (14:39 +0100)]
ALSA: hda/ca0132 - fix possible NULL pointer use

gcc-7 caught what it considers a NULL pointer dereference:

sound/pci/hda/patch_ca0132.c: In function 'dspio_scp.constprop':
sound/pci/hda/patch_ca0132.c:1487:4: error: argument 1 null where non-null expected [-Werror=nonnull]

This is plausible from looking at the function, as we compare 'reply'
to NULL earlier in it. I have not tried to analyze if there are constraints
that make it impossible to hit the bug, but adding another NULL check in
the end kills the warning and makes the function more robust.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
[dongkyun.s: cherry-pick mainline commit 46a049dae771 for gcc 9 build]

Change-Id: Id0faddb2d8b93b5b9aa522ae7ef08c34886df5e6

4 years agox86/tools: Fix gcc-7 warning in relocs.c 35/220935/1
Markus Trippelsdorf [Thu, 15 Dec 2016 12:45:13 +0000 (13:45 +0100)]
x86/tools: Fix gcc-7 warning in relocs.c

gcc-7 warns:

In file included from arch/x86/tools/relocs_64.c:17:0:
arch/x86/tools/relocs.c: In function ‘process_64’:
arch/x86/tools/relocs.c:953:2: warning: argument 1 null where non-null expected [-Wnonnull]
  qsort(r->offset, r->count, sizeof(r->offset[0]), cmp_relocs);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/x86/tools/relocs.h:6:0,
                 from arch/x86/tools/relocs_64.c:1:
/usr/include/stdlib.h:741:13: note: in a call to function ‘qsort’ declared here
 extern void qsort

This happens because relocs16 is not used for ELF_BITS == 64,
so there is no point in trying to sort it.

Make the sort_relocs(&relocs16) call 32bit only.

Signed-off-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Link: http://lkml.kernel.org/r/20161215124513.GA289@x4
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[dongkyun.s: cherry-pick mainline commit 7ebb91678294 for gcc 9 build]

Change-Id: I1d521280f297d09a8a93af70cf3039e86b2b86e5

4 years agoEnable kernel options required for security-manager iptables config 86/210986/3 accepted/tizen_5.5_unified_mobile_hotfix tizen_5.5_mobile_hotfix accepted/tizen/5.5/unified/20191031.004528 accepted/tizen/5.5/unified/mobile/hotfix/20201027.060938 accepted/tizen/unified/20190911.111606 submit/tizen/20190910.123110 submit/tizen_5.5/20191031.000009 submit/tizen_5.5_mobile_hotfix/20201026.1851010 submit/tizen_5.5_mobile_hotfix/20201027.114301 tizen_5.5.m2_release
Lukasz Pawelczyk [Fri, 26 Jul 2019 14:25:22 +0000 (16:25 +0200)]
Enable kernel options required for security-manager iptables config

security-manager is responsible for the internet privilage using
iptables and the following functionalities are required:

- iptables match owner
- iptables logging
- iptables limiting
- corresponding IPV6 equivalents, incl conntrack

Change-Id: I3ef34a69b8495f4ea0390de601b5623d55df6400

4 years agonetfilter: xt_owner: Add supplementary groups option 36/203436/6
Lukasz Pawelczyk [Fri, 10 May 2019 11:46:22 +0000 (13:46 +0200)]
netfilter: xt_owner: Add supplementary groups option

The XT_OWNER_SUPPL_GROUPS flag causes GIDs specified with XT_OWNER_GID
to be also checked in the supplementary groups of a process.

f_cred->group_info cannot be modified during its lifetime and f_cred
holds a reference to it so it's safe to use.

Signed-off-by: Lukasz Pawelczyk <l.pawelczyk@samsung.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
backport from mainline to apply supplementary groups on netfilter

Change-Id: I900d03042c82b4d5f13dec7695e4b1eba7f2aa74
(cherry picked from commit e7a26f2b0e8021c9415f0b92caf9538974720855)

4 years agoMerge "Change Kernel Configuration" into tizen
Manish Rathod [Tue, 10 Sep 2019 12:06:37 +0000 (12:06 +0000)]
Merge "Change Kernel Configuration" into tizen

4 years agonetfilter: xt_owner: bail out with EINVAL in case of unsupported flags 19/213719/1
Rahul Dadhich [Wed, 28 Aug 2019 13:08:56 +0000 (18:38 +0530)]
netfilter: xt_owner: bail out with EINVAL in case of unsupported flags

Change-Id: Ic83f49e526d564977622f69ff907fb6d928dc161
Signed-off-by: Rahul Dadhich <r.dadhich@samsung.com>
(cherry picked from commit 97424c551a9eb8f44806da4fa6f7441c88c41f01)

4 years agoChange Kernel Configuration 18/213718/1
Rahul Dadhich [Wed, 28 Aug 2019 13:14:43 +0000 (18:44 +0530)]
Change Kernel Configuration

Change-Id: I7d9d4d5a53e509c1aa7adfed6e577b6974b1c4a1
Signed-off-by: Rahul Dadhich <r.dadhich@samsung.com>
(cherry picked from commit 660cfa1e6e9470b5e96bb55f9732a2f2d4c46718)

4 years agopackaging: change dependent openssl version to 1.1 50/212550/2 accepted/tizen/unified/20190826.113200 submit/tizen/20190826.054827
Dongkyun Son [Fri, 23 Aug 2019 00:13:44 +0000 (09:13 +0900)]
packaging: change dependent openssl version to 1.1

OpenSSL 1.0.2 will be deprecated from Tizen, so, this commit is required to
migrate to version 1.1.

Change-Id: I2d698860fe585b817f958e29491b85544aeea063
Signed-off-by: Dongkyun Son <dongkyun.s@samsung.com>
4 years agoRevert "Setting GCC 4.8 as build versoin" 79/212679/1
manish.r [Mon, 26 Aug 2019 05:37:14 +0000 (11:07 +0530)]
Revert "Setting GCC 4.8 as build versoin"

This reverts commit 05b43540ba2d03ff54a81e5762ef614f4cfe2a7c.

Change-Id: I867b83d86161fd3a91a71002cbfcd9dadd9498f8
Signed-off-by: manish.r <manish.r@samsung.com>
4 years agoRevert "Removing ssl devel dependency and adding openssl 1.1 dependency" 78/212678/1
manish.r [Mon, 26 Aug 2019 05:36:27 +0000 (11:06 +0530)]
Revert "Removing ssl devel dependency and adding openssl 1.1 dependency"

This reverts commit 4664ea135fc55ef5bcfb5e255fbeabe3e3484e79.

Change-Id: Ia029c6429d4596482bd448c408d915bb3db2e89c
Signed-off-by: manish.r <manish.r@samsung.com>
4 years agoMerge "Removing ssl devel dependency and adding openssl 1.1 dependency" into tizen submit/tizen/20190822.121107
Changseok Oh [Thu, 22 Aug 2019 12:09:41 +0000 (12:09 +0000)]
Merge "Removing ssl devel dependency and adding openssl 1.1 dependency" into tizen

4 years agoRemoving ssl devel dependency and adding openssl 1.1 dependency 39/212539/1
manish.r [Thu, 22 Aug 2019 12:01:36 +0000 (17:31 +0530)]
Removing ssl devel dependency and adding openssl 1.1 dependency

Change-Id: I92d0ca690f6f34d2b4f5d4d77c0591b9fa6e5de8
Signed-off-by: manish.r <manish.r@samsung.com>
5 years agoVersion Up 25/205425/1
kumudhakn [Fri, 3 May 2019 07:24:23 +0000 (12:54 +0530)]
Version Up

Change-Id: I4d5bbbda615ad63896eeff232831b865b76bf569
Signed-off-by: kumudhakn <kumudha.n@samsung.com>
5 years agoFixed SVACE issue 82/205182/1
kumudhakn [Tue, 30 Apr 2019 05:41:34 +0000 (11:11 +0530)]
Fixed SVACE issue

Change-Id: Id48d629eed926ad6d272d55fbcd8f953fd466dd0
Signed-off-by: kumudhakn <kumudha.n@samsung.com>
5 years agoSetting GCC 4.8 as build versoin 81/193781/1
Rahul Dadhich [Mon, 26 Nov 2018 10:01:02 +0000 (15:31 +0530)]
Setting GCC 4.8 as build versoin

Change-Id: Ia41f133eedb75797d37e47d8d4995bcab643abf9
Signed-off-by: Rahul Dadhich <r.dadhich@samsung.com>
5 years agoVersion Up 98/188198/1
Karthik Bhat [Mon, 3 Sep 2018 04:12:15 +0000 (09:42 +0530)]
Version Up

Change-Id: Ibbb0012b71dc6dc302ae3fc35d96b19fd0c2f34f
Signed-off-by: Karthik Bhat <kv.bhat@samsung.com>
5 years agoFix SVACE Issues 03/188103/1
Karthik Bhat [Fri, 31 Aug 2018 08:58:21 +0000 (14:28 +0530)]
Fix SVACE Issues

Change-Id: I5acfbfef1a97a7785523b848fd7a5c3678a3261f
Signed-off-by: Karthik Bhat <kv.bhat@samsung.com>
5 years agoVersion Up 65/185865/1 submit/tizen/20180803.070629
Rahul Dadhich [Fri, 3 Aug 2018 06:09:57 +0000 (11:39 +0530)]
Version Up

Change-Id: Ib779e7096f40a8b9660cfa31e2337db2646619cc
Signed-off-by: Rahul Dadhich <r.dadhich@samsung.com>
5 years agofix deadlock in drm_mode_obj_set_property_ioctl 58/185858/1
Vladislav Andresov [Mon, 23 Apr 2018 22:11:08 +0000 (01:11 +0300)]
fix deadlock in drm_mode_obj_set_property_ioctl

Change-Id: I558a2e00c077d6c19de82acb4214d39999034c7f
Signed-off-by: Vladislav Andresov <v.andresov@partner.samsung.com>
(cherry picked from commit f6fd5336d495cf1f731c85d041e79cf3cf3a8e2b)

5 years agoVersion Up 04/185504/1 accepted/tizen_5.0_unified tizen_5.0 accepted/tizen/5.0/unified/20181102.031903 accepted/tizen/5.0/unified/20181106.201614 accepted/tizen/unified/20180803.172012 submit/tizen/20180731.081352 submit/tizen_5.0/20181101.000009 submit/tizen_5.0/20181106.000001
Karthik Bhat [Tue, 31 Jul 2018 07:44:46 +0000 (13:14 +0530)]
Version Up

Change-Id: I6108df4d6342add2b866a15c78ea3878fb1df189
Signed-off-by: Karthik Bhat <kv.bhat@samsung.com>
5 years agoVIGS: remove checking of format similarity 03/185503/1
Vladislav Andresov [Thu, 31 May 2018 05:05:50 +0000 (08:05 +0300)]
VIGS: remove checking of format similarity

Currently convert ioctl is using for
surfaces with different formats.

Change-Id: I7c4d640bd43efcd305e49aae42231556a9129181
Signed-off-by: Vladislav Andresov <v.andresov@partner.samsung.com>
5 years agoMerge "resolve DNS Packet drop issue" into tizen
Changseok Oh [Thu, 5 Jul 2018 02:07:02 +0000 (02:07 +0000)]
Merge "resolve DNS Packet drop issue" into tizen

5 years agoresolve DNS Packet drop issue 26/183326/2
Rahul Dadhich [Wed, 4 Jul 2018 11:35:02 +0000 (17:05 +0530)]
resolve DNS Packet drop issue

Change-Id: Id2c19096cd568216c54134a1b9c4ac2e16cdfa43
Signed-off-by: Rahul Dadhich <r.dadhich@samsung.com>
5 years agoVersion Up 27/183327/1
Rahul Dadhich [Wed, 4 Jul 2018 11:47:14 +0000 (17:17 +0530)]
Version Up

Change-Id: I9c2ee31d4dd1f62e07dab0d9bce20429fa55a743
Signed-off-by: Rahul Dadhich <r.dadhich@samsung.com>
6 years agoIntegrate spec files and activate emulator-kernel.spec 47/175447/7
Geunsik Lim [Mon, 9 Apr 2018 08:41:49 +0000 (17:41 +0900)]
Integrate spec files and activate emulator-kernel.spec

This PR is to remove unnecessary and duplicated spec files.
And, it is to activate the kernel image (bzImage) and System
map file (System.map) with gbs build as well as build scripts
such as build_x86.sh and build_x86_64.sh.

**Changes proposed in this PR:**

* Changelog v3:
1. Appended symbolic link with /usr/src/linux-headers for compatibility

* Changelog v2:
1. Applied the comments of @Mikhail Labiuk and @MyungJoo Ham

* Changelog v1:
1. bzImage is used to run emulator rootfs based on QEMU/KVM
2. System.map is used to do debugging kernel functions
3. Removed unnecessary spec files
4. Integrated the spec files into one spec file for consistency
5. Added kernel-headers rpm to support kernel module build of arm/aarch64

**Self assessment:**
1. GBS build: Passed
1. OBS build: Passed (manually)

**How to evaluate:**
1. x86/32bit: time gbs build -A i586    --clean --include-all --define "with emulator"
2. x86/64bit: time gbs build -A x86_64  --clean --include-all --define "with emulator"
3. arm/32bit: time gbs build -A armv7l  --clean --include-all --define "with emulator"
4. arm/64bit: time gbs build -A aarch64 --clean --include-all --define "with emulator"

**After this PR:**
$ ls -al /home/leemgs/GBS-ROOT-4.0/local/repos/tizen/i586/RPMS
drwxrwxr-x 2 invain invain     4096  4월 10 17:16 .
drwxrwxr-x 6 invain invain     4096  4월 10 17:16 ..
-rw-rw-r-- 2 invain invain  7175827  4월 10 17:15 emulator-kernel-4.4.35-0.i686.rpm
-rw-rw-r-- 2 invain invain   338716  4월 10 17:15 emulator-kernel-debugsource-4.4.35-0.i686.rpm
-rw-rw-r-- 2 invain invain 59980920  4월 10 17:15 emulator-kernel-devel-4.4.35-0.i686.rpm
-rw-rw-r-- 2 invain invain  1936999  4월 10 17:16 emulator-kernel-devel-debuginfo-4.4.35-0.i686.rpm
-rw-rw-r-- 2 invain invain   580448  4월 10 17:15 emulator-kernel-modules-4.4.35-0.i686.rpm
-rw-rw-r-- 2 invain invain  1026336  4월 10 17:15 emulator-kernel-perf-4.4.35-0.i686.rpm
-rw-rw-r-- 2 invain invain  1721079  4월 10 17:16 emulator-kernel-perf-debuginfo-4.4.35-0.i686.rpm
-rw-rw-r-- 2 invain invain   883864  4월 10 17:15 emulator-kernel-user-headers-4.4.35-0.i686.rpm

Change-Id: I80607659c6fb66ee45ccd2d683d23c9f2c642cfc
Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
6 years agoDIST: build error fix for armv7l 96/160596/5 accepted/tizen/unified/20180227.063000 submit/tizen/20180226.111421
MyungJoo Ham [Fri, 17 Nov 2017 05:47:29 +0000 (14:47 +0900)]
DIST: build error fix for armv7l

In SPIN / AD project, we are going to support arm as well.

Change-Id: Id1b509a03300e010224da077080ba5376ec3b548
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years agopackage: create new package for 5.0 platform (4.4.35.5) 20/165120/1
jihye424.kim [Tue, 26 Dec 2017 08:49:43 +0000 (17:49 +0900)]
package: create new package for 5.0 platform (4.4.35.5)

Change-Id: I9775ef977d8807d5a0ca6acb0fbf4446eebe04d4
Signed-off-by: jihye424.kim <jihye424.kim@samsung.com>
6 years agoCreate Linux 4.4 Kernel Headers for KO build 03/158803/7
MyungJoo Ham [Fri, 3 Nov 2017 06:36:49 +0000 (15:36 +0900)]
Create Linux 4.4 Kernel Headers for KO build

Kernel objects (kernel module objects) build requires
headers and Makefiles. This is to be noarch as well.

Soon, we need to create JIRA-TRE issue to make
an OBS-package for the new devices that are going
to use a lot of .ko modules out of kernel source tree.

Change-Id: Ib200a3654368c58bd0da7db6daf0ba11be5c2b38
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years agopackage: update version (4.4.35.4) 89/147189/1
Jinhyung Jo [Fri, 1 Sep 2017 09:39:38 +0000 (18:39 +0900)]
package: update version (4.4.35.4)

Change-Id: I207fc6c65d8174c7c75cc933d2ef45e2429bac00
Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
6 years agoVIGS: Add DRM_IOCTL_SURFACE_CONVERT 59/146259/1
Vladislav Andresov [Wed, 16 Aug 2017 11:55:24 +0000 (14:55 +0300)]
VIGS: Add DRM_IOCTL_SURFACE_CONVERT

This ioctl adds support of hardware surface convertion. Only y-invert
operation has been implemented so far.

Change-Id: Icf06dc84fd995eaa43c7990778d67e558c2c0274
Signed-off-by: Vladislav Andresov <v.andresov@partner.samsung.com>
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
6 years agoVIGS: add DRM_IOCTL_SDP_GA_EXEC command support 58/146258/1
Vasiliy Ulyanov [Tue, 20 Oct 2015 15:49:47 +0000 (18:49 +0300)]
VIGS: add DRM_IOCTL_SDP_GA_EXEC command support

The ioctl is needed to make ga_copy. Formely it was issued
from userspace using an execbuffer but currently it is done
directly via drmIoctl.

Aditionally it was necessary to import a device-specific
header. It has been placed to

    include/uapi/drm/sdp_drm.h

like in device kernel. The header needs to be updated
whenever the original one is changed.

Change-Id: I6d78309f38b971d5d7014b1972ff2316eee27003
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
(cherry picked from commit 48b87ee9c5f0b41e96ab0b70c00a88adc8c26648)

6 years agoFix kernel devel built 37/142337/1 submit/tizen/20170816.130518
Alexander Aksenov [Thu, 27 Jul 2017 12:55:27 +0000 (15:55 +0300)]
Fix kernel devel built

Kernel devel package is used now to build modules out-of-tree

Change-Id: I70164fae7971270b5a38274a636c67dffa627162
Signed-off-by: Alexander Aksenov <a.aksenov@samsung.com>
6 years agoMerge 'spin' into tizen
SeokYeon Hwang [Wed, 28 Jun 2017 07:57:25 +0000 (16:57 +0900)]
Merge 'spin' into tizen

7 years agopackage: update version (4.4.35.3)
Jinhyung Jo [Fri, 12 May 2017 07:04:08 +0000 (16:04 +0900)]
package: update version (4.4.35.3)

Change-Id: I041f3d12de44ef1ec1b09b4d6f79820ab749cd97
Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
7 years agoVIGS: unbind ttm bo before swapout
Vasiliy Ulyanov [Thu, 5 Nov 2015 14:43:49 +0000 (17:43 +0300)]
VIGS: unbind ttm bo before swapout

TTM BUGs if ttm_tt appears bound while being swaped out. Certain
precautions are now taken in swap_notify ttm_bo_driver callback.

Change-Id: I0c461e6d179af4b424125c1615f95738ac429d47
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
(cherry picked from commit c1d6b3e728436abaf4833abc66be8bf0f299506f)

7 years agopackage: update version (4.4.35.2)
Jinhyung Jo [Mon, 6 Mar 2017 10:13:54 +0000 (19:13 +0900)]
package: update version (4.4.35.2)

Change-Id: Ie3c42ae3bc429fbae9b9110614fc2ab4e9827b86
Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
7 years agopackage: unify packaging regardless of version
Jinhyung Jo [Thu, 2 Mar 2017 14:21:40 +0000 (23:21 +0900)]
package: unify packaging regardless of version

Change-Id: I37dd6d858e260252df75ad47a8d27d82c4f252c7
Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
7 years agoProvide a common name for all Tizen kernels 78/112278/1
MyungJoo Ham [Tue, 31 Jan 2017 03:33:29 +0000 (12:33 +0900)]
Provide a common name for all Tizen kernels

So that TIC (Tizen Image Creator) can recognize whether
a kernel is included in the target image or not.

Change-Id: Iae8808cb5af7369c5ac175963bd067de1f3281a0
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
7 years agopackage: update version (4.4.35.1)
Jinhyung Choi [Wed, 18 Jan 2017 09:29:20 +0000 (18:29 +0900)]
package: update version (4.4.35.1)

Change-Id: Ibf5773a18a748fb20fec6380d410ea9a1545ba56
Signed-off-by: Jinhyung Choi <jinh0.choi@samsung.com>
7 years agocharset: enable CONFIG_NLS_ISO8859_1
Jinhyung Choi [Wed, 18 Jan 2017 09:13:49 +0000 (18:13 +0900)]
charset: enable CONFIG_NLS_ISO8859_1

Change-Id: I88a106e8623871b047a3d9f698cd455ae831e364
Signed-off-by: Jinhyung Choi <jinh0.choi@samsung.com>
7 years agopackage: update version (4.4.35.0)
SeokYeon Hwang [Mon, 19 Dec 2016 11:23:12 +0000 (20:23 +0900)]
package: update version (4.4.35.0)

Change-Id: I085f19efe9e2006b5439e1eba289c472a46404c5
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
7 years agopackage: update kernel spec version (4.4.35) 14/105614/4 accepted/tizen_3.0.m2_mobile accepted/tizen_3.0.m2_tv accepted/tizen_3.0.m2_wearable accepted/tizen_3.0_common accepted/tizen_3.0_ivi accepted/tizen_3.0_mobile accepted/tizen_3.0_tv accepted/tizen_3.0_wearable accepted/tizen_4.0_unified accepted/tizen_common accepted/tizen_ivi accepted/tizen_mobile accepted/tizen_tv accepted/tizen_wearable tizen_3.0 tizen_3.0.m2 tizen_3.0_tv tizen_4.0 accepted/tizen/3.0.m2/mobile/20170105.025847 accepted/tizen/3.0.m2/tv/20170105.030040 accepted/tizen/3.0.m2/wearable/20170105.030247 accepted/tizen/3.0/common/20161221.180702 accepted/tizen/3.0/ivi/20161221.005421 accepted/tizen/3.0/mobile/20161221.005512 accepted/tizen/3.0/tv/20161221.005354 accepted/tizen/3.0/wearable/20161221.005409 accepted/tizen/4.0/unified/20170816.011109 accepted/tizen/4.0/unified/20170828.223137 accepted/tizen/common/20161219.152320 accepted/tizen/ivi/20161219.230221 accepted/tizen/mobile/20161219.230126 accepted/tizen/tv/20161219.230145 accepted/tizen/unified/20170309.040900 accepted/tizen/wearable/20161219.230202 submit/tizen/20161219.112149 submit/tizen_3.0.m2/20170104.093756 submit/tizen_3.0/20161219.112256 submit/tizen_4.0/20170811.094300 submit/tizen_4.0/20170828.100009 submit/tizen_unified/20170308.100420 tizen_4.0.IoT.p1_release tizen_4.0.IoT.p2_release tizen_4.0.m1_release tizen_4.0.m2_release
Sooyoung Ha [Mon, 5 Dec 2016 09:59:26 +0000 (18:59 +0900)]
package: update kernel spec version (4.4.35)

Change-Id: Ic40a9e3c4d760ba12eab2c4779951aa627cadd13
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
7 years agox86: tizen_emul_defconfig: enable SECURITY_SMACK_APPEND_SIGNALS 34/104534/3
Rafal Krypa [Tue, 13 Dec 2016 11:57:22 +0000 (12:57 +0100)]
x86: tizen_emul_defconfig: enable SECURITY_SMACK_APPEND_SIGNALS

Change-Id: I83941f8fa05825550a0cd6d8c6aee4c6a8f88082
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
7 years agoSmack: Signal delivery as an append operation 33/104533/2
Casey Schaufler [Tue, 30 Aug 2016 17:31:39 +0000 (10:31 -0700)]
Smack: Signal delivery as an append operation

Under a strict subject/object security policy delivering a
signal or delivering network IPC could be considered either
a write or an append operation. The original choice to make
both write operations leads to an issue where IPC delivery
is desired under policy, but delivery of signals is not.
This patch provides the option of making signal delivery
an append operation, allowing Smack rules that deny signal
delivery while allowing IPC. This was requested for Tizen.

Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
[mainline backport of commit c60b906673eebb4f65840fa9dc204401caf276ea]
Change-Id: If4d2821381ebb608cefe66e4ca5c3c8469f846f8

7 years agox86: tizen_emul_defconfig: enable IPV6_NF_* 43/104543/3
jooseong lee [Tue, 13 Dec 2016 12:17:06 +0000 (21:17 +0900)]
x86: tizen_emul_defconfig: enable IPV6_NF_*

Enable ipv6table options for network access control
- IP6_NF_FILTER : Add filter table
- IP6_NF_TARGET_REJECT : Reject some packets following their permission.
- IP6_NF_MANGLE : Add mangle table
- IP6_NF_RAW : Add raw table

Change-Id: Ie79ba766188f6113c96dcd5d59cde32e190cf28e
Signed-off-by: jooseong lee <jooseong.lee@samsung.com>
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
7 years agoSmack: fix d_instantiate logic for sockfs and pipefs 52/104252/2
Rafal Krypa [Tue, 13 Dec 2016 01:44:53 +0000 (10:44 +0900)]
Smack: fix d_instantiate logic for sockfs and pipefs

Since 4b936885a (v2.6.32) all inodes on sockfs and pipefs are disconnected.
It caused filesystem specific code in smack_d_instantiate to be skipped,
because all inodes on those pseudo filesystems were treated as root inodes.
As a result all sockfs inodes had the Smack label set to floor.

In most cases access checks for sockets use socket_smack data so the inode
label is not important. But there are special cases that were broken.
One example would be calling fcntl with F_SETOWN command on a socket fd.

Now smack_d_instantiate expects all pipefs and sockfs inodes to be
disconnected and has the logic in appropriate place.

Change-Id: Id83469a5b29958ec7c2cdbafbbaa014276126351
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
Signed-off-by: jooseong lee <jooseong.lee@samsung.com>
7 years agoMerge branch 'tizen' into tizen_linux_4.4.35
SeokYeon Hwang [Mon, 5 Dec 2016 06:46:01 +0000 (15:46 +0900)]
Merge branch 'tizen' into tizen_linux_4.4.35

7 years agopackage: update version (4.4.16) spin
Minkee Lee [Fri, 2 Dec 2016 02:29:50 +0000 (11:29 +0900)]
package: update version (4.4.16)

Change-Id: Iafd015fd9969e30affb44fa4d8dacd4e886523ec
Signed-off-by: Minkee Lee <minkee.lee@samsung.com>
7 years agosensor: add pedometer sensor device driver
Sooyoung Ha [Wed, 20 Jul 2016 06:13:03 +0000 (15:13 +0900)]
sensor: add pedometer sensor device driver

Change-Id: I284ce56f2f8ea9aa8909e6a3c1be044518f115b9
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
(cherry picked from commit 66ee7c4ee8cdc7afcb629ea3840eafddf5091a33)

7 years agokeyboard: fix keyboard input issue on 64bit guest
Munkyu Im [Wed, 30 Nov 2016 11:41:26 +0000 (20:41 +0900)]
keyboard: fix keyboard input issue on 64bit guest

Some keycodes do not work on 64bit guest.
So, reset previous keybit setting.

Change-Id: I3d16f9106fe79e0493369c4953272cbeb04ebb49
Signed-off-by: Munkyu Im <munkyu.im@samsung.com>
7 years agoMerge branch 'tizen' into develop
SeokYeon Hwang [Thu, 1 Dec 2016 02:05:16 +0000 (11:05 +0900)]
Merge branch 'tizen' into develop

Change-Id: I1332757228f4fdbb8ebc73bd27442772a516b34d
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
7 years agoMerge tag 'v4.4.35' into tizen tizen_linux_4.4.35
SeokYeon Hwang [Wed, 30 Nov 2016 05:52:02 +0000 (14:52 +0900)]
Merge tag 'v4.4.35' into tizen

This is the 4.4.35 stable release

Change-Id: I016616a636a1c38e276e4c1c1b4728666b34a253
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
7 years agox86, pat: workaround to force PAT usage 30/100730/1
Vasiliy Ulyanov [Tue, 11 Oct 2016 12:49:04 +0000 (15:49 +0300)]
x86, pat: workaround to force PAT usage

When run under haxm certain CPU features appear inaccesible from guest
and at the moment there seems to be no proper way to set them up from the
host side. The patch allows to forcefully enable x86 Page Attribute
Table and therefore use different memory caching policies at the page
level granularity. PAT significantly improves performance when mmaped
device buffers are accessed.

WARNING: once a proper solution is figured out for haxm case the patch
should be reverted. Currently it is more like a hack to avoid terrible
performance on certain scenarios like decoding high resolution video
directly into the mmaped video buffer.

Change-Id: Ib626a93b2ff16cc8bbdee186cfe67cff6b29e618
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
7 years agoLinux 4.4.35
Greg Kroah-Hartman [Sat, 26 Nov 2016 08:55:04 +0000 (09:55 +0100)]
Linux 4.4.35

7 years agonetfilter: nft_dynset: fix element timeout for HZ != 1000
Anders K. Pedersen [Sun, 9 Oct 2016 13:49:02 +0000 (13:49 +0000)]
netfilter: nft_dynset: fix element timeout for HZ != 1000

commit a8b1e36d0d1d6f51490e7adce35367ed6adb10e7 upstream.

With HZ=100 element timeout in dynamic sets (i.e. flow tables) is 10 times
higher than configured.

Add proper conversion to/from jiffies, when interacting with userspace.

I tested this on Linux 4.8.1, and it applies cleanly to current nf and
nf-next trees.

Fixes: 22fe54d5fefc ("netfilter: nf_tables: add support for dynamic set updates")
Signed-off-by: Anders K. Pedersen <akp@cohaesio.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoIB/cm: Mark stale CM id's whenever the mad agent was unregistered
Mark Bloch [Thu, 27 Oct 2016 13:36:27 +0000 (16:36 +0300)]
IB/cm: Mark stale CM id's whenever the mad agent was unregistered

commit 9db0ff53cb9b43ed75bacd42a89c1a0ab048b2b0 upstream.

When there is a CM id object that has port assigned to it, it means that
the cm-id asked for the specific port that it should go by it, but if
that port was removed (hot-unplug event) the cm-id was not updated.
In order to fix that the port keeps a list of all the cm-id's that are
planning to go by it, whenever the port is removed it marks all of them
as invalid.

This commit fixes a kernel panic which happens when running traffic between
guests and we force reboot a guest mid traffic, it triggers a kernel panic:

 Call Trace:
  [<ffffffff815271fa>] ? panic+0xa7/0x16f
  [<ffffffff8152b534>] ? oops_end+0xe4/0x100
  [<ffffffff8104a00b>] ? no_context+0xfb/0x260
  [<ffffffff81084db2>] ? del_timer_sync+0x22/0x30
  [<ffffffff8104a295>] ? __bad_area_nosemaphore+0x125/0x1e0
  [<ffffffff81084240>] ? process_timeout+0x0/0x10
  [<ffffffff8104a363>] ? bad_area_nosemaphore+0x13/0x20
  [<ffffffff8104aabf>] ? __do_page_fault+0x31f/0x480
  [<ffffffff81065df0>] ? default_wake_function+0x0/0x20
  [<ffffffffa0752675>] ? free_msg+0x55/0x70 [mlx5_core]
  [<ffffffffa0753434>] ? cmd_exec+0x124/0x840 [mlx5_core]
  [<ffffffff8105a924>] ? find_busiest_group+0x244/0x9f0
  [<ffffffff8152d45e>] ? do_page_fault+0x3e/0xa0
  [<ffffffff8152a815>] ? page_fault+0x25/0x30
  [<ffffffffa024da25>] ? cm_alloc_msg+0x35/0xc0 [ib_cm]
  [<ffffffffa024e821>] ? ib_send_cm_dreq+0xb1/0x1e0 [ib_cm]
  [<ffffffffa024f836>] ? cm_destroy_id+0x176/0x320 [ib_cm]
  [<ffffffffa024fb00>] ? ib_destroy_cm_id+0x10/0x20 [ib_cm]
  [<ffffffffa034f527>] ? ipoib_cm_free_rx_reap_list+0xa7/0x110 [ib_ipoib]
  [<ffffffffa034f590>] ? ipoib_cm_rx_reap+0x0/0x20 [ib_ipoib]
  [<ffffffffa034f5a5>] ? ipoib_cm_rx_reap+0x15/0x20 [ib_ipoib]
  [<ffffffff81094d20>] ? worker_thread+0x170/0x2a0
  [<ffffffff8109b2a0>] ? autoremove_wake_function+0x0/0x40
  [<ffffffff81094bb0>] ? worker_thread+0x0/0x2a0
  [<ffffffff8109aef6>] ? kthread+0x96/0xa0
  [<ffffffff8100c20a>] ? child_rip+0xa/0x20
  [<ffffffff8109ae60>] ? kthread+0x0/0xa0
  [<ffffffff8100c200>] ? child_rip+0x0/0x20

Fixes: a977049dacde ("[PATCH] IB: Add the kernel CM implementation")
Signed-off-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Erez Shitrit <erezsh@mellanox.com>
Reviewed-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>