* linux-next: manual merge of the akpm tree with the userns tree
@ 2012-05-16 9:37 Stephen Rothwell
2012-05-16 14:49 ` Eric W. Biederman
0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2012-05-16 9:37 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-next, linux-kernel, Eric W. Biederman
[-- Attachment #1: Type: text/plain, Size: 1112 bytes --]
Hi Andrew,
Today's linux-next merge of the akpm tree got a conflict in
kernel/signal.c between commit 54ba47edac90 ("userns: signal remove
unnecessary map_cred_ns") from the userns tree and commit "pidns: use
task_active_pid_ns in do_notify_parent" from the akpm tree.
Just context changes. I fixed it up (see below) and can carry the fix as
necessary.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --cc kernel/signal.c
index c5100ad,d9bcff9..0000000
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@@ -1668,9 -1677,9 +1667,9 @@@ bool do_notify_parent(struct task_struc
* correct to rely on this
*/
rcu_read_lock();
- info.si_pid = task_pid_nr_ns(tsk, tsk->parent->nsproxy->pid_ns);
+ info.si_pid = task_pid_nr_ns(tsk, task_active_pid_ns(tsk->parent));
- info.si_uid = map_cred_ns(__task_cred(tsk),
- task_cred_xxx(tsk->parent, user_ns));
+ info.si_uid = from_kuid_munged(task_cred_xxx(tsk->parent, user_ns),
+ task_uid(tsk));
rcu_read_unlock();
info.si_utime = cputime_to_clock_t(tsk->utime + tsk->signal->utime);
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: linux-next: manual merge of the akpm tree with the userns tree
2012-05-16 9:37 Stephen Rothwell
@ 2012-05-16 14:49 ` Eric W. Biederman
0 siblings, 0 replies; 6+ messages in thread
From: Eric W. Biederman @ 2012-05-16 14:49 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: Andrew Morton, linux-next, linux-kernel
Stephen Rothwell <sfr@canb.auug.org.au> writes:
> Hi Andrew,
>
> Today's linux-next merge of the akpm tree got a conflict in
> kernel/signal.c between commit 54ba47edac90 ("userns: signal remove
> unnecessary map_cred_ns") from the userns tree and commit "pidns: use
> task_active_pid_ns in do_notify_parent" from the akpm tree.
>
> Just context changes. I fixed it up (see below) and can carry the fix as
> necessary.
Thanks.
Eric
^ permalink raw reply [flat|nested] 6+ messages in thread
* linux-next: manual merge of the akpm tree with the userns tree
@ 2012-09-24 12:53 Stephen Rothwell
0 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2012-09-24 12:53 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-next, linux-kernel, Kees Cook, Eric W. Biederman
[-- Attachment #1: Type: text/plain, Size: 8219 bytes --]
Hi Andrew,
Today's linux-next merge of the akpm tree got a conflict in
include/linux/audit.h between commit e1760bd5ffae ("userns: Convert the
audit loginuid to be a kuid") from the userns tree and commit "audit.h:
replace defines with C stubs" from the akpm tree.
I fixed it up (see below) and can carry the fix as necessary (no action
is required).
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --cc include/linux/audit.h
index a7a7db9,5c186a5..0000000
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@@ -627,38 -624,95 +627,95 @@@ static inline void audit_mmap_fd(int fd
extern int audit_n_rules;
extern int audit_signals;
#else /* CONFIG_AUDITSYSCALL */
- #define audit_alloc(t) ({ 0; })
- #define audit_free(t) do { ; } while (0)
- #define audit_syscall_entry(ta,a,b,c,d,e) do { ; } while (0)
- #define audit_syscall_exit(r) do { ; } while (0)
- #define audit_dummy_context() 1
- #define audit_getname(n) do { ; } while (0)
- #define audit_putname(n) do { ; } while (0)
- #define __audit_inode(n,d) do { ; } while (0)
- #define __audit_inode_child(i,p) do { ; } while (0)
- #define audit_inode(n,d) do { (void)(d); } while (0)
- #define audit_inode_child(i,p) do { ; } while (0)
- #define audit_core_dumps(i) do { ; } while (0)
- #define audit_seccomp(i,s,c) do { ; } while (0)
- #define auditsc_get_stamp(c,t,s) (0)
+ static inline int audit_alloc(struct task_struct *task)
+ {
+ return 0;
+ }
+ static inline void audit_free(struct task_struct *task)
+ { }
+ static inline void audit_syscall_entry(int arch, int major, unsigned long a0,
+ unsigned long a1, unsigned long a2,
+ unsigned long a3)
+ { }
+ static inline void audit_syscall_exit(void *pt_regs)
+ { }
+ static inline int audit_dummy_context(void)
+ {
+ return 1;
+ }
+ static inline void audit_getname(const char *name)
+ { }
+ static inline void audit_putname(const char *name)
+ { }
+ static inline void __audit_inode(const char *name, const struct dentry *dentry)
+ { }
+ static inline void __audit_inode_child(const struct dentry *dentry,
+ const struct inode *parent)
+ { }
+ static inline void audit_inode(const char *name, const struct dentry *dentry)
+ { }
+ static inline void audit_inode_child(const struct dentry *dentry,
+ const struct inode *parent)
+ { }
+ static inline void audit_core_dumps(long signr)
+ { }
+ static inline void __audit_seccomp(unsigned long syscall, long signr, int code)
+ { }
+ static inline void audit_seccomp(unsigned long syscall, long signr, int code)
+ { }
+ static inline int auditsc_get_stamp(struct audit_context *ctx,
+ struct timespec *t, unsigned int *serial)
+ {
+ return 0;
+ }
-#define audit_get_loginuid(t) (-1)
+#define audit_get_loginuid(t) (INVALID_UID)
#define audit_get_sessionid(t) (-1)
- #define audit_log_task_context(b) do { ; } while (0)
- #define audit_log_task_info(b, t) do { ; } while (0)
- #define audit_ipc_obj(i) ((void)0)
- #define audit_ipc_set_perm(q,u,g,m) ((void)0)
- #define audit_bprm(p) ({ 0; })
- #define audit_socketcall(n,a) ((void)0)
- #define audit_fd_pair(n,a) ((void)0)
- #define audit_sockaddr(len, addr) ({ 0; })
- #define audit_mq_open(o,m,a) ((void)0)
- #define audit_mq_sendrecv(d,l,p,t) ((void)0)
- #define audit_mq_notify(d,n) ((void)0)
- #define audit_mq_getsetattr(d,s) ((void)0)
- #define audit_log_bprm_fcaps(b, ncr, ocr) ({ 0; })
- #define audit_log_capset(pid, ncr, ocr) ((void)0)
- #define audit_mmap_fd(fd, flags) ((void)0)
- #define audit_ptrace(t) ((void)0)
+ static inline void audit_log_task_context(struct audit_buffer *ab)
+ { }
+ static inline void audit_log_task_info(struct audit_buffer *ab,
+ struct task_struct *tsk)
+ { }
+ static inline void audit_ipc_obj(struct kern_ipc_perm *ipcp)
+ { }
+ static inline void audit_ipc_set_perm(unsigned long qbytes, uid_t uid,
+ gid_t gid, umode_t mode)
+ { }
+ static inline int audit_bprm(struct linux_binprm *bprm)
+ {
+ return 0;
+ }
+ static inline void audit_socketcall(int nargs, unsigned long *args)
+ { }
+ static inline void audit_fd_pair(int fd1, int fd2)
+ { }
+ static inline int audit_sockaddr(int len, void *addr)
+ {
+ return 0;
+ }
+ static inline void audit_mq_open(int oflag, umode_t mode, struct mq_attr *attr)
+ { }
+ static inline void audit_mq_sendrecv(mqd_t mqdes, size_t msg_len,
+ unsigned int msg_prio,
+ const struct timespec *abs_timeout)
+ { }
+ static inline void audit_mq_notify(mqd_t mqdes,
+ const struct sigevent *notification)
+ { }
+ static inline void audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat)
+ { }
+ static inline int audit_log_bprm_fcaps(struct linux_binprm *bprm,
+ const struct cred *new,
+ const struct cred *old)
+ {
+ return 0;
+ }
+ static inline void audit_log_capset(pid_t pid, const struct cred *new,
+ const struct cred *old)
+ { }
+ static inline void audit_mmap_fd(int fd, int flags)
+ { }
+ static inline void audit_ptrace(struct task_struct *t)
+ { }
#define audit_n_rules 0
#define audit_signals 0
#endif /* CONFIG_AUDITSYSCALL */
@@@ -705,28 -759,56 +762,56 @@@ static inline void audit_log_secctx
extern int audit_update_lsm_rules(void);
/* Private API (for audit.c only) */
-extern int audit_filter_user(struct netlink_skb_parms *cb);
+extern int audit_filter_user(void);
extern int audit_filter_type(int type);
-extern int audit_receive_filter(int type, int pid, int uid, int seq,
- void *data, size_t datasz, uid_t loginuid,
+extern int audit_receive_filter(int type, int pid, int seq,
+ void *data, size_t datasz, kuid_t loginuid,
u32 sessionid, u32 sid);
extern int audit_enabled;
- #else
- #define audit_log(c,g,t,f,...) do { ; } while (0)
- #define audit_log_start(c,g,t) ({ NULL; })
- #define audit_log_vformat(b,f,a) do { ; } while (0)
- #define audit_log_format(b,f,...) do { ; } while (0)
- #define audit_log_end(b) do { ; } while (0)
- #define audit_log_n_hex(a,b,l) do { ; } while (0)
- #define audit_log_n_string(a,c,l) do { ; } while (0)
- #define audit_log_string(a,c) do { ; } while (0)
- #define audit_log_n_untrustedstring(a,n,s) do { ; } while (0)
- #define audit_log_untrustedstring(a,s) do { ; } while (0)
- #define audit_log_d_path(b, p, d) do { ; } while (0)
- #define audit_log_key(b, k) do { ; } while (0)
- #define audit_log_link_denied(o, l) do { ; } while (0)
- #define audit_log_secctx(b,s) do { ; } while (0)
+ #else /* CONFIG_AUDIT */
+ static inline __printf(4, 5)
+ void audit_log(struct audit_context *ctx, gfp_t gfp_mask, int type,
+ const char *fmt, ...)
+ { }
+ static inline struct audit_buffer *audit_log_start(struct audit_context *ctx,
+ gfp_t gfp_mask, int type)
+ {
+ return NULL;
+ }
+ static inline __printf(2, 3)
+ void audit_log_format(struct audit_buffer *ab, const char *fmt, ...)
+ { }
+ static inline void audit_log_end(struct audit_buffer *ab)
+ { }
+ static inline void audit_log_n_hex(struct audit_buffer *ab,
+ const unsigned char *buf, size_t len)
+ { }
+ static inline void audit_log_n_string(struct audit_buffer *ab,
+ const char *buf, size_t n)
+ { }
+ static inline void audit_log_n_untrustedstring(struct audit_buffer *ab,
+ const char *string, size_t n)
+ { }
+ static inline void audit_log_untrustedstring(struct audit_buffer *ab,
+ const char *string)
+ { }
+ static inline void audit_log_d_path(struct audit_buffer *ab,
+ const char *prefix,
+ const struct path *path)
+ { }
+ static inline void audit_log_key(struct audit_buffer *ab, char *key)
+ { }
+ static inline void audit_log_link_denied(const char *string,
+ const struct path *link)
+ { }
+ static inline void audit_log_secctx(struct audit_buffer *ab, u32 secid)
+ { }
#define audit_enabled 0
- #endif
+ #endif /* CONFIG_AUDIT */
+ static inline void audit_log_string(struct audit_buffer *ab, const char *buf)
+ {
+ audit_log_n_string(ab, buf, strlen(buf));
+ }
+
#endif
#endif
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* linux-next: manual merge of the akpm tree with the userns tree
@ 2012-11-26 13:13 Stephen Rothwell
2012-11-26 18:30 ` Eric W. Biederman
0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2012-11-26 13:13 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-next, linux-kernel, Eric W. Biederman, Alan Cox
[-- Attachment #1: Type: text/plain, Size: 987 bytes --]
Hi Andrew,
Today's linux-next merge of the akpm tree got a conflict in kernel/fork.c
between commit b2e0d98705e6 ("userns: Implement unshare of the user
namespace") from the userns tree and commit ("fork: unshare: remove dead
cod") from the akpm tree.
I fixed it up (I think - see below) and can carry the fix as necessary (no action
is required).
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --cc kernel/fork.c
index 7e0dc2f,58088f9..0000000
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@@ -1867,20 -1858,8 +1865,17 @@@ SYSCALL_DEFINE1(unshare, unsigned long
}
task_unlock(current);
+
+ if (new_cred) {
+ /* Install the new user namespace */
+ commit_creds(new_cred);
+ new_cred = NULL;
+ }
}
- if (new_nsproxy)
- put_nsproxy(new_nsproxy);
-
+bad_unshare_cleanup_cred:
+ if (new_cred)
+ put_cred(new_cred);
bad_unshare_cleanup_fd:
if (new_fd)
put_files_struct(new_fd);
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: linux-next: manual merge of the akpm tree with the userns tree
2012-11-26 13:13 Stephen Rothwell
@ 2012-11-26 18:30 ` Eric W. Biederman
0 siblings, 0 replies; 6+ messages in thread
From: Eric W. Biederman @ 2012-11-26 18:30 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: Andrew Morton, linux-next, linux-kernel, Alan Cox
Stephen Rothwell <sfr@canb.auug.org.au> writes:
> Hi Andrew,
>
> Today's linux-next merge of the akpm tree got a conflict in kernel/fork.c
> between commit b2e0d98705e6 ("userns: Implement unshare of the user
> namespace") from the userns tree and commit ("fork: unshare: remove dead
> cod") from the akpm tree.
>
> I fixed it up (I think - see below) and can carry the fix as necessary (no action
> is required).
Your resolution looks correct to me. This was just of case of two patches
changing each others context.
Eric
^ permalink raw reply [flat|nested] 6+ messages in thread
* linux-next: manual merge of the akpm tree with the userns tree
@ 2015-07-02 4:26 Stephen Rothwell
0 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2015-07-02 4:26 UTC (permalink / raw)
To: Andrew Morton, Eric W. Biederman; +Cc: linux-next, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 470 bytes --]
Hi Andrew,
Today's linux-next merge of the akpm tree got a conflict in:
fs/nsfs.c
between the userns tree and patch
"nsfs: fix for seq_printf() API change"
from the akpm tree.
The commit ed2ffc74eee8 ("nsfs: Add a show_path method to fix mountinfo")
that was being fixed by the akpm tree patch was dropped from the usernsn
tree, so I dropped the akpm tree patch as well.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-07-02 4:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-24 12:53 linux-next: manual merge of the akpm tree with the userns tree Stephen Rothwell
-- strict thread matches above, loose matches on Subject: below --
2015-07-02 4:26 Stephen Rothwell
2012-11-26 13:13 Stephen Rothwell
2012-11-26 18:30 ` Eric W. Biederman
2012-05-16 9:37 Stephen Rothwell
2012-05-16 14:49 ` Eric W. Biederman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).