Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1509337ybh; Sun, 19 Jul 2020 23:13:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzeSBl767tCPuYVjYnjeMfZdDG5ygiRJTpeE5vjr/3G8RFwr4BwNMfdRBvbfSZLjA+f7khP X-Received: by 2002:aa7:dd8e:: with SMTP id g14mr20815091edv.208.1595225622272; Sun, 19 Jul 2020 23:13:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595225622; cv=none; d=google.com; s=arc-20160816; b=xmxF+ESyPAazHLXgTjz6Il0UMswljp73XyV+KpxKMtQO5+j+WfWxQSeX8MaUG2cF+u ozeSCESqthBpr0oChWPQgHP4EvNFfymG+TTfq8XEZKbd9+hjdEuShZ1BoHMrSm86TCmR x+XPIx7Sx2q5lqA1N53mF5ofdCSjnVHwK4wbdm6eu2QJe1rp5/oleY3fdQzYaML43cb7 HUhAnCxrvkROCalkXOZisWwHqcTJI2FkNenAp32M3gDOkhRgbxFq55saGGWf0D9uK/99 aBhiYw2+4VXTsTJxiw6qcc1rt1hrwYyLp0YKr1kISqNaY4KTCVgG7IXyRJWXzajo6wKo wwag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date; bh=1w+ih3G/jzR4B3QD0/5+A9auKEjkO12Bmejc6cutIwc=; b=JkK2oi3rCkrRunUiwl6wFd3Jbwgos6S9abUVDLMf0s1ACBDE3iFyrXrbo4oxHfFJhs 7IOO//tHemYxSkoC1dhJjPknGA2PkiLYuJUQbsEMEHjSuzVPa5kBcXEkK+gXOqpc3rZn 3gQ1iCRrvq3rM1SN2LQ+bojatfM4vIpiP77MItmmWMsVr+/1EAJX2vjTzxGxMkLDnnFc agksjN6CqejVvbo9MIxdhRcHAlzekb4ER+KTOVDmtmTUHjADt+ab3Zn3h2w1iw2Vbas7 ipSGDd7G3HWU9xzyWrkTHKOWpfu3onFzFDYlqbvH+prceOBTF5sjf8Kw2Aib7/lXt0iP 6MzQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id sb26si1017564ejb.343.2020.07.19.23.13.20; Sun, 19 Jul 2020 23:13:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726736AbgGTGKt (ORCPT + 99 others); Mon, 20 Jul 2020 02:10:49 -0400 Received: from verein.lst.de ([213.95.11.211]:45446 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725805AbgGTGKt (ORCPT ); Mon, 20 Jul 2020 02:10:49 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id EBB6868BFE; Mon, 20 Jul 2020 08:10:46 +0200 (CEST) Date: Mon, 20 Jul 2020 08:10:46 +0200 From: Christoph Hellwig To: Jens Axboe Cc: linux-arch@vger.kernel.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, io-uring@vger.kernel.org Subject: io_uring vs in_compat_syscall() Message-ID: <20200720061046.GA10678@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jens, I just found a (so far theoretical) issue with the io_uring submission offloading to workqueues or threads. We have lots of places using in_compat_syscall() to check if a syscall needs compat treatmenet. While the biggest users is iocttl(), we also have a fair amount of places using in_compat_task() in read and write methods, and these will not do the wrong thing when used with io_uring under certain conditions. I'm not sure how to best fix this, except for making sure in_compat_syscall() returns true one way or another for these cases.