On 6/8/26 15:55, Bobby Eshleman wrote:
On Sun, Jun 7, 2026 at 11:42 PM Christian König <christian.koenig@amd.com mailto:christian.koenig@amd.com> wrote:
On 6/5/26 20:44, Bobby Eshleman wrote: > On Fri, Jun 05, 2026 at 11:30:07AM +0200, Christian König wrote: >> On 6/4/26 02:42, Bobby Eshleman wrote: >>> From: Bobby Eshleman <bobbyeshleman@meta.com <mailto:bobbyeshleman@meta.com>> >>> >>> get_sg_table() emitted one PAGE_SIZE sg entry per page even when the >>> underlying folio was larger. >>> >>> Instead, walk folios[] and emit one sg entry per folio. When folios >>> represent large pages (as is for MFD_HUGETLB), each sg entry is a large >>> page. Normal PAGE_SIZE sg tables are unchanged. >>> >>> Required by net/core/devmem to support rx-buf-size > PAGE_SIZE with >>> udmabuf. >> >> That doesn't explain why this is required. > > Sure, can definitely add. Devmem currently requires dmabuf sg entries to > be length and size aligned when it allocates niovs for NIC page pools. > Though udmabuf is not violating any dmabuf contract by emitting > PAGE_SIZE entries and the above restriction is probably more a > shortfalling of devmem, by emitting a single entry per folio this patch > allows udmabuf to be used by devmem for large pages. > >> >> Please note that accessing the pages/folio of an sg-table returned by DMA-buf is illegal and strictly forbidden! >> >> Regards, >> Christian. > > It seems both devmem and io_uring zcrx at least introspect through to > the sg-table to build NIC page pools (not accessing the memory itself, > however). Is there a better way? That's an absolute NO-GO! We need to stop that immediately. Touching the underlying struct page of an DMA-buf exported sg-table is strictly forbidden. We even have code to wrap the sg_table and hide the struct pages on debug builds to catch those issues, see function dma_buf_wrap_sg_table(). My last status is that the NIC page pools are build directly from the DMA addresses exposed by the sg_table. Was there any change I'm not aware of? Regards, Christian.Oh no change, your mental model is still current. They just go through each sg and use sg_dma_address() on each.
Ah, thanks! That was a near heart attack :D
Yeah that is perfectly correct, question is do you then still really need this udmabuf change? I mean the DMA API usually merges together contiguous DMA addresses.
Regards, Christian.
Best, Bobby
> > Best, > Bobby > >> >>> Signed-off-by: Bobby Eshleman <bobbyeshleman@meta.com <mailto:bobbyeshleman@meta.com>> >>> --- >>> drivers/dma-buf/udmabuf.c | 47 ++++++++++++++++++++++++++++++++++++++++++----- >>> 1 file changed, 42 insertions(+), 5 deletions(-) >>> >>> diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c >>> index 94b8ecb892bb..f28dd3788ada 100644 >>> --- a/drivers/dma-buf/udmabuf.c >>> +++ b/drivers/dma-buf/udmabuf.c >>> @@ -141,26 +141,63 @@ static void vunmap_udmabuf(struct dma_buf *buf, struct iosys_map *map) >>> vm_unmap_ram(map->vaddr, ubuf->pagecount); >>> } >>> >>> +/* Return the number of contiguous pages backed by the folio at @i. >>> + * A udmabuf may map only part of a folio, or reference the same folio >>> + * in multiple non-contiguous runs, so folio_nr_pages() can't be used. >>> + */ >>> +static pgoff_t udmabuf_folio_nr_pages(struct udmabuf *ubuf, pgoff_t i) >>> +{ >>> + struct folio *f = ubuf->folios[i]; >>> + pgoff_t j; >>> + >>> + for (j = 1; i + j < ubuf->pagecount; j++) { >>> + if (ubuf->folios[i + j] != f) >>> + break; >>> + /* Same folio, but not a sequential offset within it. */ >>> + if (ubuf->offsets[i + j] != ubuf->offsets[i] + j * PAGE_SIZE) >>> + break; >>> + } >>> + return j; >>> +} >>> + >>> +/* Count the contiguous folio runs in @ubuf, one sg entry per run. */ >>> +static unsigned int udmabuf_sg_nents(struct udmabuf *ubuf) >>> +{ >>> + unsigned int nents = 0; >>> + pgoff_t i; >>> + >>> + for (i = 0; i < ubuf->pagecount; i += udmabuf_folio_nr_pages(ubuf, i)) >>> + nents++; >>> + return nents; >>> +} >>> + >>> static struct sg_table *get_sg_table(struct device *dev, struct dma_buf *buf, >>> enum dma_data_direction direction) >>> { >>> struct udmabuf *ubuf = buf->priv; >>> - struct sg_table *sg; >>> struct scatterlist *sgl; >>> - unsigned int i = 0; >>> + struct sg_table *sg; >>> + pgoff_t i, run; >>> + unsigned int nents; >>> int ret; >>> >>> + nents = udmabuf_sg_nents(ubuf); >>> + >>> sg = kzalloc_obj(*sg); >>> if (!sg) >>> return ERR_PTR(-ENOMEM); >>> >>> - ret = sg_alloc_table(sg, ubuf->pagecount, GFP_KERNEL); >>> + ret = sg_alloc_table(sg, nents, GFP_KERNEL); >>> if (ret < 0) >>> goto err_alloc; >>> >>> - for_each_sg(sg->sgl, sgl, ubuf->pagecount, i) >>> - sg_set_folio(sgl, ubuf->folios[i], PAGE_SIZE, >>> + sgl = sg->sgl; >>> + for (i = 0; i < ubuf->pagecount; i += run) { >>> + run = udmabuf_folio_nr_pages(ubuf, i); >>> + sg_set_folio(sgl, ubuf->folios[i], run << PAGE_SHIFT, >>> ubuf->offsets[i]); >>> + sgl = sg_next(sgl); >>> + } >>> >>> ret = dma_map_sgtable(dev, sg, direction, 0); >>> if (ret < 0) >>> >>> -- >>> 2.53.0-Meta >>> >>
(certifitasap@gmail.com) No Exam: When you buy a genuine NEBOSH Certification, there will be no need to take the exams. Convenience: Many people have tight schedules and do not have enough time to go through the exams or testing process. Buying the NEBOSH Certification will be very convenient for them. Apply for the NEBOSH certificate in Malaysia https://streamable.com/2yj6u6
To check NEBOSH results online in Kuwait or the UAE. Where can I buy the NEBOSH Diploma online? How to see my registered NEBOSH certificates? Get the NEBOSH health and safety certificate in the USA. France. Luxembourg. Switzerland. Colombia. India. Turkey. Kuwait. Qatar. Hong Kong. Bahrain. Malaysia. Russian. Japan. Ireland. Saudi Arabia. Egypt . China. Taiwan. Israel. Indonesia Lebanon. Jordan. Serbia. Iran. Thailand. United Arab Emirates. Iraq. Oman Buy original NEBOSH diplomas without exam in Saudi Arabia
We are a group of Teachers and Examiners specialized in the Acquisition of NEBOSH CERTIFICATES & all Certificates without taking the exams. https://streamable.com/2n368u
1- We provide an Official certificate with registration in the database and actual center stamps for customers interested in obtaining the certificate without taking the test.
2. We provide you with a new certificate with the updated results for you to follow your PR procedures without any risk.
3- We can provide Question papers for future tests before the actual test date. The questionnaires will be issued about 6 to 10 days before the test data and will be 100% the same questions that will appear in the test. Guaranteed at 100%. https://vimeo.com/1189663914?share=copy&fl=sv&fe=ci
4- We are teachers and examination officials working together as a team, so you can choose any of our professionals to go in for the exams on your behave.
5- You can register for your exams and go in for but we shall provide your target scores as you request because we have underground partners working at any center test, which gives us access to the system.
6- We equally assist our clients by sending recommendation letters to well-known educational institutions or enterprises offering employment abroad in Canada, the UK, the USA, Australia, New Zealand, and others to give you a kick start for your future.
NEBOSH Diplomas in countries like: USA, Australia, Belgium, Brazil, Canada, Italy, Finland, France, Germany, Israel, Mexico, Netherlands, , Spain, United Kingdom.
https://t.me/+A1TvrjQBdZc2MWRh
https://t.me/+UfhkuxkiJsw5NWEx
https://neboshigc03.wixsite.com/website/services
https://neboshigc03.wixsite.com/website/about
https://neboshigc03.wixs....com/website/book-online
https://neboshigc03.wixsite.com/website/contact
https://neboshigc03.wixsite.com/website/products
Contact us via Teams ID-- (Jacob JB)
We provide verified NEBOSH certificates with online possibilities. You are guaranteed 100% with us, as the certificate you obtain is 100% legal and accepted anywhere without any doubt. Customers interested in obtaining the certificate should contact us through the contact details listed below. Payment and prices shall be discussed upon your response to this ad. Contact Customer Care for a fast chat via Email....certifitasap@gmail.com
WhatsApp...+1 (450)912-2147
Contact us via Teams ID-- (Jacob JB)
Email (neboshigc03@yahoo.com)
NEBOSH IGC Certificate
NEBOSH Oil and Gas Safety
NEBOSH Fire Certificate
NEBOSH Diploma Contact Customer Care for a fast chat via Email....certifitasap@gmail.com
WhatsApp.....+1 (450) 912-2147
British NEBOSH certificate Obtain Real NEBOSH Diploma Acquire NEBOSH Diploma online Diploma without Exam in Tuvalu Buy NEBOSH Diploma without exam Obtain NEBOSH certificate in Dubai Acquire NEBOSH certificate in India Buy NEBOSH Fire Certificate in Nepal Obtain NEBOSH certificate in the UAE NEBOSH Fire Certificate without Exam BCSP Certification Online in Austria Obtain NEBOSH Exam in the Netherlands Get NEBOSH Diploma online without Exam Apply for NEBOSH Diploma UK without Exam Apply for the British NEBOSH Certificate Buy a NEBOSH certificate without an exam Buy British NEBOSH IGC certificates in UK Apply for the NEBOSH IGC certificate in UK NEBOSH Diploma Online in the Netherlands Acquire the NEBOSH certificate in Punjab Buy NEBOSH in New York/Islamabad/Seoul, Buy/get/order NEBOSH WITHOUT exams/test, Order NEBOSH in Tashkent/ Hanoi/Hong Kong, NEBOSH certificate without exam in Kerala Order original NEBOSH Diploma without Exam Buy CSP Certificate Without Exam in Germany Buy SMS Certificate Without Exam in Sweden Buy a CHST Certificate Without Exam in Iran NEBOSH certificate without Exam in the UAE Buy a NEBOSH certificate UK without an Exam Buy a British NEBOSH Fire certificate online Acquire NEBOSH certificates without an Exam Order NEBOSH Certificate Online Without Exam Want to Improve your NEBOSH IGC or Diplomas? Apply for the NEBOSH certificate in Malaysia. British NEBOSH Fire certificate without Exam Buy NEBOSH IGC Certificate Online in Austria NEBOSH certificate without exam in Hyderabad Buy NEBOSH Certificate Without Exam in Belgium Apply for the NEEBOSH certificate in Australia Buy a NEBOSH certificate in Karachi, Australia Buy NEBOSH certificate in Australia/Pakistan, Buy Original NEBOSH without exams in Karachi Obtain NEBOSH WITHOUT tests/exams in the UK, Buy a CET Certificate Without Exam in Belgium Buy NEBOSH Certificate Without Exam in Bulgaria Buy ASP Certificate Without Exam in Luxembourg Order NEBOSH certificate without Exam in Aruba Acquire a Diploma without an Exam in Australia Purchase NEBOSH Fire Certificate without Exam Buy NEBOSH certificate without Exam in Algeria Buy NEBOSH Diploma without exam in Martinique Buy NEBOSH Diploma without Exam in Kyrgyzstan NEBOSH IGC Certificate Without Exam in Denmark Get NEBOSH HSW Certificate Without Exam in Greece Buy Original NEBOSH Certificate Online in the UK Obtain NEBOSH certificate without exam in Punjab Order NEBOSH Certificate Without Exam in Bulgaria Purchase the NBOSH certificate without the Exam Apply for NEBOSH IGC Certificate UK without Exam Apply for NEBOSH Diploma without Exam in Mongolia NEBOSH certificate without Exam in New Caledonia NEBOSH IGC Certificate Without Exam in Seychelles Buy STSC Certificate Without Exam in Switzerland Buy NEBOSH HSW Certificate Without Exam in Croatia Buy STS Certificate Without Exam in the Netherlands Buy NEBOSH HSW Certificate Without Exam in Greece Buy NEBOSH HSW Certificate Without Exam in Norway Buy NEBOSH IDIP Certificate Without Exam in Turkey Buy NEBOSH IGC Certificate Without Exam in Poland Purchase a registered NEBOSH London/Sydney/Dubai NEBOSH Certificate Without Exam in Saudi Arabia Buy/get NEBOSH in Qatar without taking the test, Obtain a Registered NEBOSH certificate in Qatar, Buy/obtain/get NEBOSH certificate in Dubai/UAE, Get/purchase/Buy NEBOSH certificate in Qatar/ India, Original NEBOSH Certificate Without Exam in Jordan Buy NEBOSH IGC 1 Certificate Without Exam in Ukraine Buy NEBOSH IGC 2 Certificate Without Exam in Portugal Obtain NEBOSH Oil and Gas Safety without Exam in London Acquire NEBOSH Diploma without Exam in Western Sahara Purchase NEBOSH Diploma without Exam in Cote d'Ivoire Purchase NEBOSH IGC Certificate without Exam in Uganda Obtain original NEBOSH Fire Certificate without Exam Obtain NEBOSH IGC Certificate Without Exam in Poland Buy NEBOSH IGC 1 Certificate Without Exam in Ukraine Acquire NEBOSH Certificate Without Exam in Germany Acquire NEBOSH certificate without exam in Bangalore Buy a NEBOSH Certificate without an exam in Chennai Get NEBOSH Diploma Certificate Without Exam in Sweden Obtain NEBOSH Certificate Without Exam in Switzerland Acquire NEBOSH HSW Certificate Without Exam in Croatia Apply for NEBOSH HSW Certificate Without Exam in Norway Acquire NEBOSH IDIP Certificate Without Exam in Turkey Buy a NEBOSH certificate without an Exam in Bouvet Island Apply for British NEBOSH Oil and Gas Safety certificates Apply for the NEBOSH certificate without an exam in Delhi Acquire NEBOSH Certificate Without Exam in the Netherlands Apply for NEBOSH IGC Certificate Without Exam in Luxembourg Buy NEBOSH health and safety Certificate Without Exam in Iran Buy/purchase/ Acquire an original NEBOSH certificate in Karachi Order/obtain/buy NEBOSH certificate in Malaysia/Germany, Get/obtain NEBOSH certificate in Pakistan, New Zealand, Buy/Obtain/Get NEBOSH certificate in the United Kingdom (UK), Order Original NEBOSH Diploma Without Exam Online in Egypt Order Original NEBOSH course Certificate Without Exam in Jordan, Apply for Original NEBOSH Diplomas Without Exam in Saudi Arabia Apply for NEBOSH Oil and Gas Safety without Exam in Guyana Buy NEBOSH HSW Certificate Without Exam in the Czech Republic How to get the original NEBOSH Fire Certificate without Exam Get NEBOSH verification. Obtain a real NEBOSH Certificate online Acquire a NEBOSH certificate without an Exam in the United States Order original NEBOSH Oil and Gas Safety certificate without the Exam Purchase real NEBOSH Oil and Gas Safety certificates without an Exam Apply for NEBOSH Fire Certificate without Exam in Brunei Darussalam Apply for NEBOSH IGC Certificate without Exam in Antigua and Barbuda Purchase Original NEBOSH Diploma Online Without Exam in Jordan, Acquire Original NEBOSH Oil and Gas Safety Without Exam Online in Bahrain, Apply for Original NEBOSH Fire Certificate Without Exam Online in Algeria, Order Original NEBOSH Fire Certificate Online Without Exam in Saudi Arabia Obtain Original NEBOSH Diploma Without Exam Online in the Middle East, Obtain Original NEBOSH IGC Certificates Online Without Exam in Kuwait, Apply for Original NEBOSH Oil and Gas Safety Online Without Exam in Qatar, Obtain Original NEBOSH Fire Certificate Online Without Exam in Jordan, Apply for the NEBOSH certificate without an Exam in the Falkland Islands Apply for NEBOSH oil and gas Certificate Without Exam in Iran, Netherlands Buy/Get/Order Verified NEBOSH Certificates Online in South Korea, Gwangju Apply for Original NEBOSH Certificates Online in the United Arab Emirates, UAE, Dubai, Purchase the NEBOSH Oil and Gas Safety certificate without an Exam online in Antigua Obtain NEBOSH Oil and Gas Safety without an exam in the French Southern Territories Buy/Get/Order Verified NEBOSH Diplomas Certificates Online in South Korea, Seoul Apply for Original NEBOSH Certificate Without Exam in the United Arab Emirates, UAE, Dubai NEBOSH Diploma in the UAE, Qatar, Kuwait, Oman, Bahrain, Malaysia Singapore Jordan Saudi Arabia USA Ireland UK France Italy Belgium, Ukraine, Iceland, Brazil, Spain, Germany Egypt, Turkey, Morocco, Algeria, Greece)
Contact Customer Care for a fast chat via
Contact us via Teams ID-- (Jacob JB)
Email....certifitasap@gmail.com
WhatsApp.....+1 (450) 912-2147
Don't hesitate, feel free to contact us so as to get your certificates done perfectly and on time. available service 24Hs/7Ds
linaro-mm-sig@lists.linaro.org