Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 94909
b: refs/heads/master
c: 85d6931
h: refs/heads/master
i:
  94907: ad6ce2f
v: v3
  • Loading branch information
Jean Delvare authored and Jean Delvare committed Apr 29, 2008
1 parent e30efbe commit f5f4195
Show file tree
Hide file tree
Showing 81 changed files with 586 additions and 1,228 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f12c03722045882a50c270f6332cf2c7b16a83d2
refs/heads/master: 85d6931cde5bbb80254dcd2a9f0851bd3eb8960b
8 changes: 3 additions & 5 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -752,13 +752,11 @@ W: http://atmelwlandriver.sourceforge.net/
S: Maintained

AUDIT SUBSYSTEM
P: Al Viro
M: viro@zeniv.linux.org.uk
P: Eric Paris
M: eparis@redhat.com
P: David Woodhouse
M: dwmw2@infradead.org
L: linux-audit@redhat.com (subscribers-only)
W: http://people.redhat.com/sgrubb/audit/
T: git git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current.git
T: git kernel.org:/pub/scm/linux/kernel/git/dwmw2/audit-2.6.git
S: Maintained

AUXILIARY DISPLAY DRIVERS
Expand Down
63 changes: 57 additions & 6 deletions trunk/drivers/char/tty_audit.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ static void tty_audit_buf_push(struct task_struct *tsk, uid_t loginuid,
get_task_comm(name, tsk);
audit_log_untrustedstring(ab, name);
audit_log_format(ab, " data=");
audit_log_n_untrustedstring(ab, buf->data, buf->valid);
audit_log_n_untrustedstring(ab, buf->valid, buf->data);
audit_log_end(ab);
}
buf->valid = 0;
Expand Down Expand Up @@ -151,9 +151,14 @@ void tty_audit_fork(struct signal_struct *sig)
/**
* tty_audit_push_task - Flush task's pending audit data
*/
void tty_audit_push_task(struct task_struct *tsk, uid_t loginuid, u32 sessionid)
void tty_audit_push_task(struct task_struct *tsk, uid_t loginuid)
{
struct tty_audit_buf *buf;
/* FIXME I think this is correct. Check against netlink once that is
* I really need to read this code more closely. But that's for
* another patch.
*/
unsigned int sessionid = audit_get_sessionid(tsk);

spin_lock_irq(&tsk->sighand->siglock);
buf = tsk->signal->tty_audit_buf;
Expand Down Expand Up @@ -233,10 +238,6 @@ void tty_audit_add_data(struct tty_struct *tty, unsigned char *data,
if (unlikely(size == 0))
return;

if (tty->driver->type == TTY_DRIVER_TYPE_PTY
&& tty->driver->subtype == PTY_TYPE_MASTER)
return;

buf = tty_audit_buf_get(tty);
if (!buf)
return;
Expand Down Expand Up @@ -299,3 +300,53 @@ void tty_audit_push(struct tty_struct *tty)
tty_audit_buf_put(buf);
}
}

/**
* tty_audit_opening - A TTY is being opened.
*
* As a special hack, tasks that close all their TTYs and open new ones
* are assumed to be system daemons (e.g. getty) and auditing is
* automatically disabled for them.
*/
void tty_audit_opening(void)
{
int disable;

disable = 1;
spin_lock_irq(&current->sighand->siglock);
if (current->signal->audit_tty == 0)
disable = 0;
spin_unlock_irq(&current->sighand->siglock);
if (!disable)
return;

task_lock(current);
if (current->files) {
struct fdtable *fdt;
unsigned i;

/*
* We don't take a ref to the file, so we must hold ->file_lock
* instead.
*/
spin_lock(&current->files->file_lock);
fdt = files_fdtable(current->files);
for (i = 0; i < fdt->max_fds; i++) {
struct file *filp;

filp = fcheck_files(current->files, i);
if (filp && is_tty(filp)) {
disable = 0;
break;
}
}
spin_unlock(&current->files->file_lock);
}
task_unlock(current);
if (!disable)
return;

spin_lock_irq(&current->sighand->siglock);
current->signal->audit_tty = 0;
spin_unlock_irq(&current->sighand->siglock);
}
5 changes: 4 additions & 1 deletion trunk/drivers/char/tty_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -2755,6 +2755,7 @@ static int tty_open(struct inode *inode, struct file *filp)
__proc_set_tty(current, tty);
spin_unlock_irq(&current->sighand->siglock);
mutex_unlock(&tty_mutex);
tty_audit_opening();
return 0;
}

Expand Down Expand Up @@ -2817,8 +2818,10 @@ static int ptmx_open(struct inode *inode, struct file *filp)

check_tty_count(tty, "tty_open");
retval = ptm_driver->open(tty, filp);
if (!retval)
if (!retval) {
tty_audit_opening();
return 0;
}
out1:
release_dev(filp);
return retval;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/i2c/busses/i2c-stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
static unsigned short chip_addr[MAX_CHIPS];
module_param_array(chip_addr, ushort, NULL, S_IRUGO);
MODULE_PARM_DESC(chip_addr,
"Chip addresses (up to 10, between 0x03 and 0x77)\n");
"Chip addresses (up to 10, between 0x03 and 0x77)");

struct stub_chip {
u8 pointer;
Expand Down
10 changes: 5 additions & 5 deletions trunk/drivers/ide/pci/alim15x3.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,14 +412,14 @@ static u8 __devinit ali_cable_detect(ide_hwif_t *hwif)
return cbl;
}

#if !defined(CONFIG_SPARC64) && !defined(CONFIG_PPC)
#ifndef CONFIG_SPARC64
/**
* init_hwif_ali15x3 - Initialize the ALI IDE x86 stuff
* @hwif: interface to configure
*
* Obtain the IRQ tables for an ALi based IDE solution on the PC
* class platforms. This part of the code isn't applicable to the
* Sparc and PowerPC systems.
* Sparc systems
*/

static void __devinit init_hwif_ali15x3 (ide_hwif_t *hwif)
Expand Down Expand Up @@ -463,9 +463,7 @@ static void __devinit init_hwif_ali15x3 (ide_hwif_t *hwif)
hwif->irq = irq;
}
}
#else
#define init_hwif_ali15x3 NULL
#endif /* !defined(CONFIG_SPARC64) && !defined(CONFIG_PPC) */
#endif

/**
* init_dma_ali15x3 - set up DMA on ALi15x3
Expand Down Expand Up @@ -519,7 +517,9 @@ static const struct ide_dma_ops ali_dma_ops = {
static const struct ide_port_info ali15x3_chipset __devinitdata = {
.name = "ALI15X3",
.init_chipset = init_chipset_ali15x3,
#ifndef CONFIG_SPARC64
.init_hwif = init_hwif_ali15x3,
#endif
.init_dma = init_dma_ali15x3,
.port_ops = &ali_port_ops,
.pio_mask = ATA_PIO5,
Expand Down
9 changes: 1 addition & 8 deletions trunk/drivers/ide/pci/siimage.c
Original file line number Diff line number Diff line change
Expand Up @@ -737,15 +737,8 @@ static const struct ide_port_ops sil_sata_port_ops = {
.cable_detect = sil_cable_detect,
};

static const struct ide_dma_ops sil_dma_ops = {
.dma_host_set = ide_dma_host_set,
.dma_setup = ide_dma_setup,
.dma_exec_cmd = ide_dma_exec_cmd,
.dma_start = ide_dma_start,
.dma_end = __ide_dma_end,
static struct ide_dma_ops sil_dma_ops = {
.dma_test_irq = siimage_dma_test_irq,
.dma_timeout = ide_dma_timeout,
.dma_lost_irq = ide_dma_lost_irq,
};

#define DECLARE_SII_DEV(name_str, p_ops) \
Expand Down
18 changes: 2 additions & 16 deletions trunk/drivers/infiniband/hw/cxgb3/cxio_hal.c
Original file line number Diff line number Diff line change
Expand Up @@ -456,8 +456,7 @@ void cxio_count_scqes(struct t3_cq *cq, struct t3_wq *wq, int *count)
ptr = cq->sw_rptr;
while (!Q_EMPTY(ptr, cq->sw_wptr)) {
cqe = cq->sw_queue + (Q_PTR2IDX(ptr, cq->size_log2));
if ((SQ_TYPE(*cqe) ||
((CQE_OPCODE(*cqe) == T3_READ_RESP) && wq->oldest_read)) &&
if ((SQ_TYPE(*cqe) || (CQE_OPCODE(*cqe) == T3_READ_RESP)) &&
(CQE_QPID(*cqe) == wq->qpid))
(*count)++;
ptr++;
Expand Down Expand Up @@ -830,8 +829,7 @@ int cxio_rdma_init(struct cxio_rdev *rdev_p, struct t3_rdma_init_attr *attr)
wqe->mpaattrs = attr->mpaattrs;
wqe->qpcaps = attr->qpcaps;
wqe->ulpdu_size = cpu_to_be16(attr->tcp_emss);
wqe->rqe_count = cpu_to_be16(attr->rqe_count);
wqe->flags_rtr_type = cpu_to_be16(attr->flags|V_RTR_TYPE(attr->rtr_type));
wqe->flags = cpu_to_be32(attr->flags);
wqe->ord = cpu_to_be32(attr->ord);
wqe->ird = cpu_to_be32(attr->ird);
wqe->qp_dma_addr = cpu_to_be64(attr->qp_dma_addr);
Expand Down Expand Up @@ -1136,18 +1134,6 @@ int cxio_poll_cq(struct t3_wq *wq, struct t3_cq *cq, struct t3_cqe *cqe,
*/
if (RQ_TYPE(*hw_cqe) && (CQE_OPCODE(*hw_cqe) == T3_READ_RESP)) {

/*
* If this is an unsolicited read response, then the read
* was generated by the kernel driver as part of peer-2-peer
* connection setup. So ignore the completion.
*/
if (!wq->oldest_read) {
if (CQE_STATUS(*hw_cqe))
wq->error = 1;
ret = -1;
goto skip_cqe;
}

/*
* Don't write to the HWCQ, so create a new read req CQE
* in local memory.
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/infiniband/hw/cxgb3/cxio_hal.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
#define T3_MAX_PBL_SIZE 256
#define T3_MAX_RQ_SIZE 1024
#define T3_MAX_NUM_STAG (1<<15)
#define T3_MAX_MR_SIZE 0x100000000ULL

#define T3_STAG_UNSET 0xffffffff

Expand Down
21 changes: 4 additions & 17 deletions trunk/drivers/infiniband/hw/cxgb3/cxio_wr.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,17 +278,6 @@ enum t3_qp_caps {
uP_RI_QP_STAG0_ENABLE = 0x10
} __attribute__ ((packed));

enum rdma_init_rtr_types {
RTR_READ = 1,
RTR_WRITE = 2,
RTR_SEND = 3,
};

#define S_RTR_TYPE 2
#define M_RTR_TYPE 0x3
#define V_RTR_TYPE(x) ((x) << S_RTR_TYPE)
#define G_RTR_TYPE(x) ((((x) >> S_RTR_TYPE)) & M_RTR_TYPE)

struct t3_rdma_init_attr {
u32 tid;
u32 qpid;
Expand All @@ -304,9 +293,7 @@ struct t3_rdma_init_attr {
u32 ird;
u64 qp_dma_addr;
u32 qp_dma_size;
enum rdma_init_rtr_types rtr_type;
u16 flags;
u16 rqe_count;
u32 flags;
u32 irs;
};

Expand All @@ -322,8 +309,8 @@ struct t3_rdma_init_wr {
u8 mpaattrs; /* 5 */
u8 qpcaps;
__be16 ulpdu_size;
__be16 flags_rtr_type;
__be16 rqe_count;
__be32 flags; /* bits 31-1 - reservered */
/* bit 0 - set if RECV posted */
__be32 ord; /* 6 */
__be32 ird;
__be64 qp_dma_addr; /* 7 */
Expand All @@ -337,7 +324,7 @@ struct t3_genbit {
};

enum rdma_init_wr_flags {
MPA_INITIATOR = (1<<0),
RECVS_POSTED = (1<<0),
PRIV_QP = (1<<1),
};

Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/infiniband/hw/cxgb3/iwch.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ static void rnic_init(struct iwch_dev *rnicp)
rnicp->attr.max_phys_buf_entries = T3_MAX_PBL_SIZE;
rnicp->attr.max_pds = T3_MAX_NUM_PD - 1;
rnicp->attr.mem_pgsizes_bitmask = 0x7FFF; /* 4KB-128MB */
rnicp->attr.max_mr_size = T3_MAX_MR_SIZE;
rnicp->attr.can_resize_wq = 0;
rnicp->attr.max_rdma_reads_per_qp = 8;
rnicp->attr.max_rdma_read_resources =
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/infiniband/hw/cxgb3/iwch.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ struct iwch_rnic_attributes {
* size (4k)^i. Phys block list mode unsupported.
*/
u32 mem_pgsizes_bitmask;
u64 max_mr_size;
u8 can_resize_wq;

/*
Expand Down
Loading

0 comments on commit f5f4195

Please sign in to comment.