Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp635405ybh; Tue, 10 Mar 2020 05:34:56 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuAbCB/wJs0p0FJtL6MFRfD2F3ZePXld9D3Y7L9kwJUFnHCjrqzIK2qREmY+xXymR3ONdh9 X-Received: by 2002:aca:b205:: with SMTP id b5mr962896oif.21.1583843696101; Tue, 10 Mar 2020 05:34:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583843696; cv=none; d=google.com; s=arc-20160816; b=vMr1s2uiiZEaUlb6n7oyRSisrAgReeHxZvCWDxrZoEVFASEY932VjagZqSGzyAa+sv Z/DMIXP/HxeVKAuiQ2Q4F7gJwsl/njO5HScuBFXIF10filuZiG00nh8HLs9cGGYJD3No P3lm2JAQlVBdpWkVE/3iLoukeZgTSaW1aKrMW9FR5dVJ4S4cxLWsywngxzJMWqvCEiqi R6J3EQIVBG39Hw4c8zaebaUsHUTBDwBzJvDFYthbxRQ3whwF56E6Lt+6eZ+lZu8W4tb5 YicdEonSILUbfXKqTeloMLgKLt1DY9y/7hfb4XTzs+yc6DiQaFji0Ugd0fYV8Z+YBqTl /d5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:to:from; bh=skgeEDPXXF3KvbQ4/AU7YTnLbHWQ8LoY9gE+c0UdHgk=; b=hbd0H9k6ensSMGoS8RfnhCeyudjys4OOFq/lducuPwSNmwj/KYstwj+xsqaq5fBkYa Fn3D0yFxKa41sRWHmhTE/g2xanMxhMNelM14SLGBHG5YF6qG0O4hzEvtK1G2kyZ2cFOQ iy9dV24ScfvU2NmjjIZtHw+hPxZz14/qzytIK9H8BkiXacTd4X8wPrlne1yjqkbsqL7C GJEuXTrHaD+662JWYr4G6I6zRp40KleEW6VufpZvkY+2w5hG6JGpH53p+5N0Qutaibsr 0vIvgOL3z62FjdNKTV4z/VZjvZV51TMNhj0Etrbm+tyb9V6JzcNvZNiT98RDa4m/OilZ g5AA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 5si4967812oir.130.2020.03.10.05.34.43; Tue, 10 Mar 2020 05:34:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726390AbgCJMdw (ORCPT + 99 others); Tue, 10 Mar 2020 08:33:52 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:38456 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726252AbgCJMdw (ORCPT ); Tue, 10 Mar 2020 08:33:52 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 02ACKidC106566 for ; Tue, 10 Mar 2020 08:33:51 -0400 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0b-001b2d01.pphosted.com with ESMTP id 2ynmxgk0ug-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 10 Mar 2020 08:33:50 -0400 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 10 Mar 2020 12:33:49 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 10 Mar 2020 12:33:44 -0000 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 02ACXh9i29753594 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 10 Mar 2020 12:33:43 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C05504204F; Tue, 10 Mar 2020 12:33:43 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B58D24204C; Tue, 10 Mar 2020 12:33:43 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Tue, 10 Mar 2020 12:33:43 +0000 (GMT) Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 55390) id 289ABE19C3; Tue, 10 Mar 2020 13:33:43 +0100 (CET) From: Sven Schnelle To: Kees Cook , Andy Lutomirski , Will Drewry , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org Subject: [PATCH] seccomp: add compat_ioctl for seccomp notify Date: Tue, 10 Mar 2020 13:33:32 +0100 X-Mailer: git-send-email 2.17.1 X-TM-AS-GCONF: 00 x-cbid: 20031012-0020-0000-0000-000003B24E93 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 20031012-0021-0000-0000-0000220A9A2B Message-Id: <20200310123332.42255-1-svens@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-03-10_06:2020-03-10,2020-03-10 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 priorityscore=1501 clxscore=1011 phishscore=0 impostorscore=0 adultscore=0 mlxscore=0 mlxlogscore=999 lowpriorityscore=0 spamscore=0 suspectscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2003100083 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, executing the seccomp_bpf testsuite with 32 bit userland (both s390 and x86) doesn't work because there's no compat_ioctl handler defined. Is that something that is supposed to work? Disclaimer: I don't know enough about seccomp to judge whether there would be some adjustments required in the compat ioctl handler. Just setting it to seccomp_notify_ioctl() makes the testsuite pass, but i'm not sure whether that's correct. Signed-off-by: Sven Schnelle --- kernel/seccomp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/seccomp.c b/kernel/seccomp.c index b6ea3dcb57bf..683c81e4861e 100644 --- a/kernel/seccomp.c +++ b/kernel/seccomp.c @@ -1221,6 +1221,7 @@ static const struct file_operations seccomp_notify_ops = { .poll = seccomp_notify_poll, .release = seccomp_notify_release, .unlocked_ioctl = seccomp_notify_ioctl, + .compat_ioctl = seccomp_notify_ioctl, }; static struct file *init_listener(struct seccomp_filter *filter) -- 2.17.1