lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0bbd66a4-add6-7056-2fb4-c1a5cc377f7d@intel.com>
Date:   Mon, 21 Nov 2022 09:55:42 -0800
From:   Jacob Keller <jacob.e.keller@...el.com>
To:     Jakub Kicinski <kuba@...nel.org>
CC:     <netdev@...r.kernel.org>, Jiri Pirko <jiri@...dia.com>
Subject: Re: [PATCH net-next 5/8] devlink: refactor region_read_snapshot_fill
 to use a callback function



On 11/18/2022 5:48 PM, Jakub Kicinski wrote:
> On Thu, 17 Nov 2022 14:08:00 -0800 Jacob Keller wrote:
>> +	/* Allocate and re-use a single buffer */
>> +	data = kzalloc(DEVLINK_REGION_READ_CHUNK_SIZE, GFP_KERNEL);
>> +	if (!data)
>> +		return -ENOMEM;
> 
> Why zalloc? If we expect drivers may underfill we should let them
> return actual length.
> 

Probably just habit. Let me check on this one. I don't think there's a 
particular reason that drivers would under fill since they're in control 
of the region size.

Thanks,
Jake

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ