Re: [RFC PATCH v3] parisc: Add wrapper syscalls to fix O_NONBLOCK flag usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2020-10-24 4:34 a.m., Helge Deller wrote:
> On 10/24/20 10:24 AM, Jeroen Roovers wrote:
>> On Sat, 24 Oct 2020 10:22:18 +0200
>> Jeroen Roovers <jer@xxxxxxxxx> wrote:
>>
>>> On Fri, 23 Oct 2020 20:18:47 +0200
>>> Helge Deller <deller@xxxxxx> wrote:
>>>
>>>> +static int FIX_O_NONBLOCK(int flags)
>>>> +{
>>>> +	if (flags & O_NONBLOCK_MASK_OUT) {
>>>> +		struct task_struct *tsk = current;
>>>> +		pr_warn_once("%s(%d) uses a deprecated O_NONBLOCK
>>>> value.\n",
>>>> +			tsk->comm, tsk->pid);
>>>> +	}
>>>> +	return flags & ~O_NONBLOCK_MASK_OUT;
>>>> +}
>>> Would it be interesting to additionally report the calling function in
>>> search for other syscalls that might not be covered yet?
>> Wait, that doesn't make sense, does it?
> makes no sense :-)
> The function is only called by syscalls where we know they are affected.
I tend to think the warning is annoying.  We will have to keep compatibility with old binaries forever.

Dave

-- 
John David Anglin  dave.anglin@xxxxxxxx




[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux